Description: Adds an allocation limit, or changes the one that already exists for the same product or attribute value and who. One row per limit, with the same columns as the admin's CSV import. Answers the limit's rule_id, or a 400 saying why it was refused.
Authentication: Admin
Default Format: JSON
A store with allocation limits off answers 403. Team members over OAuth 2 need access to the Products page to read limits and the "Can Manage Allocation Limits" permission to change them. A team member limited to some accounts (Account Access) only sees and changes those accounts' limits: other accounts' and their locations' limits are left out of the lists, reading, changing, counting or the history of one answers 404, and creating one is refused ("This account isn't available to you."). Customer group limits aren't affected.
Limit Parameters:
| Name | Description | Required | Type | Example Value |
|---|---|---|---|---|
| sku | What it limits: a product, by SKU (exact, case-sensitive). Or product_id. | one of sku, product_id, attribute_code + attribute_value, option_id | string | toaster |
| product_id | What it limits: a product, by ID. | see sku | int | 10 |
| attribute_code | What it limits: a drop-down attribute value (a pool), with attribute_value. | see sku | string | color |
| attribute_value | The attribute's value (its admin label; matched exactly first, then ignoring case if only one value matches). | with attribute_code | string | Aqua |
| option_id | The attribute value by its option ID, instead of attribute_code + attribute_value. | see sku | int | 66 |
| how_it_applies | For an attribute value: each (a limit per product) or combined (all its products together). Empty or each for a product. | required for an attribute value | string | combined |
| customer_group | Who: every account in a customer group (its code, any casing). Or customer_group_id. | one of customer_group, customer_group_id, account_id, account_location_id | string | Wholesale |
| customer_group_id | Who: a customer group by ID. | see customer_group | int | 2 |
| account_id | Who: an account. With account_location_id, it must be that location's account. | see customer_group | int | 16 |
| account_location_id | Who: one of an account's locations, by the location's own ID (as the admin shows it). | see customer_group | int | 231 |
| limit_per_period | How much may be ordered each period. 0 or more; decimals allowed. | required unless removing | number | 10 |
| reset_every | The period length, with reset_unit and reset_start_date (all three or none). | all three or none | int | 1 |
| reset_unit | day, week or month (singular or plural). | all three or none | string | month |
| reset_start_date | The first period's start, a store day (YYYY-MM-DD). | all three or none | string | 2026-12-01 |
| remove | yes removes the limit (its other values are ignored). | optional | string | yes |
Without the reset fields, an existing limit keeps its reset, and a new product limit uses the product's Default reset (refused if it has none); a new attribute value limit is refused. The name, account, account_location, used, quoted, left and next_reset fields of a GET are ignored, so a limit read can be sent back as is.
Variant: Create (Bulk)
Description: The same rows as Create, as a JSON array of up to 500. Valid rows are saved together; refused rows don't stop the others. For more than 500 rows, send several requests.
Authentication: Admin
Default Format: JSON
A store with allocation limits off answers 403. Team members over OAuth 2 need access to the Products page to read limits and the "Can Manage Allocation Limits" permission to change them. A team member limited to some accounts (Account Access) only sees and changes those accounts' limits: other accounts' and their locations' limits are left out of the lists, reading, changing, counting or the history of one answers 404, and creating one is refused ("This account isn't available to you."). Customer group limits aren't affected.
Response (result.data): counts (added, changed, removed, unchanged, failed) and results: every row by its 0-based index, with its action (add, change, remove, unchanged; null when refused), rule_id and errors (why it was refused; empty when saved). A Get All row sent back as is comes back unchanged.
Limit Parameters (per row):
| Name | Description | Required | Type | Example Value |
|---|---|---|---|---|
| sku | What it limits: a product, by SKU (exact, case-sensitive). Or product_id. | one of sku, product_id, attribute_code + attribute_value, option_id | string | toaster |
| product_id | What it limits: a product, by ID. | see sku | int | 10 |
| attribute_code | What it limits: a drop-down attribute value (a pool), with attribute_value. | see sku | string | color |
| attribute_value | The attribute's value (its admin label; matched exactly first, then ignoring case if only one value matches). | with attribute_code | string | Aqua |
| option_id | The attribute value by its option ID, instead of attribute_code + attribute_value. | see sku | int | 66 |
| how_it_applies | For an attribute value: each (a limit per product) or combined (all its products together). Empty or each for a product. | required for an attribute value | string | combined |
| customer_group | Who: every account in a customer group (its code, any casing). Or customer_group_id. | one of customer_group, customer_group_id, account_id, account_location_id | string | Wholesale |
| customer_group_id | Who: a customer group by ID. | see customer_group | int | 2 |
| account_id | Who: an account. With account_location_id, it must be that location's account. | see customer_group | int | 16 |
| account_location_id | Who: one of an account's locations, by the location's own ID (as the admin shows it). | see customer_group | int | 231 |
| limit_per_period | How much may be ordered each period. 0 or more; decimals allowed. | required unless removing | number | 10 |
| reset_every | The period length, with reset_unit and reset_start_date (all three or none). | all three or none | int | 1 |
| reset_unit | day, week or month (singular or plural). | all three or none | string | month |
| reset_start_date | The first period's start, a store day (YYYY-MM-DD). | all three or none | string | 2026-12-01 |
| remove | yes removes the limit (its other values are ignored). | optional | string | yes |
Without the reset fields, an existing limit keeps its reset, and a new product limit uses the product's Default reset (refused if it has none); a new attribute value limit is refused. The name, account, account_location, used, quoted, left and next_reset fields of a GET are ignored, so a limit read can be sent back as is.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
