v1

latestSwagger 2.02026-07-13137761.0 MB
Attribute option

Update/create several attribute options

This endpoint allows you to update several attribute options at once. Please note that this endpoint applies a rate limit of 3 concurrent API requests per second.

patch/api/rest/v1/attributes/{attribute_code}/options

Path parameters

attribute_codestring required

Code of the attribute

Request body

codestring required

Code of option

attributestring

Code of attribute related to the attribute option

sort_orderinteger

Order of attribute option

Example request

{
  "code": "black",
  "attribute": "a_simple_select",
  "sort_order": 2,
  "labels": {
    "en_US": "Black",
    "fr_FR": "Noir"
  }
}

Response

OK

lineinteger

Line number

identifierstring

Resource identifier, only filled when the resource is a product

codestring

Resource code, only filled when the resource is not a product

status_codeinteger

HTTP status code, see <a href="/documentation/responses.html#client-errors">Client errors</a> to understand the meaning of each code

messagestring

Message explaining the error