Purpose: get the allowed values of an attribute with a fixed list of values.
Send the code of an option as the attribute value of your product.
Most used:
| Attribute | Request |
|---|---|
| Brand | GET /api/rest/v1/retailer/attributes/manufacturer/options |
| Colour | GET /api/rest/v1/retailer/attributes/color/options |
| Size | GET /api/rest/v1/retailer/attributes/size/options |
| Season | GET /api/rest/v1/retailer/attributes/season/options |
| Condition | GET /api/rest/v1/retailer/attributes/condition_type/options |
Returns all options in one response (no pagination), sorted by code. Only attributes
of type pim_catalog_simpleselect and pim_catalog_multiselect have options.
GET
/api/rest/v1/retailer/attributes/{code}/options
curl \
--request GET 'https://content.winkelstraat.nl/api/rest/v1/retailer/attributes/{code}/options' \
--header "Authorization: $API_KEY"
Response examples (200)
{
"items": [
{
"code": "black",
"attribute": "color",
"sort_order": 2,
"labels": {
"en_US": "Black",
"nl_NL": "Zwart"
}
},
{
"code": "purple",
"attribute": "color",
"sort_order": 3,
"labels": {
"en_US": "Purple",
"nl_NL": "Paars"
}
},
{
"code": "red",
"attribute": "color",
"sort_order": 1,
"labels": {
"en_US": "Red",
"nl_NL": "Rood"
}
}
]
}
Response examples (200)
{
"items": [
{
"code": "string",
"attribute": "string",
"sort_order": 42,
"labels": {}
}
]
}
Response examples (401)
{
"code": 401,
"message": "The access token provided is invalid."
}
Response examples (401)
{
"code": 42,
"message": "string"
}
Response examples (403)
{
"code": 403,
"message": "No valid retailer found"
}
Response examples (403)
{
"code": 42,
"message": "string"
}
Response examples (404)
{
"code": 404,
"message": "Attribute \"colour\" does not exist."
}
Response examples (404)
{
"code": 42,
"message": "string"
}
Response examples (406)
{
"code": 406,
"message": "\"xxx\" in \"Accept\" header is not valid. Only \"application/json\" is allowed."
}
Response examples (406)
{
"code": 42,
"message": "string"
}