Purpose: find the category code to send in the category field of a product.
Returns all categories in one response (no pagination), in tree order. Send the
code of the category that fits the product best.
hierarchy lists the path from the root (master) down to the category itself.
No parameters.
GET
/api/rest/v1/retailer/categories/codes
curl \
--request GET 'https://content.winkelstraat.nl/api/rest/v1/retailer/categories/codes' \
--header "Authorization: $API_KEY"
Response examples (200)
{
"items": [
{
"code": "master",
"parent": null,
"labels": {
"en_US": "Root",
"nl_NL": "Root"
},
"hierarchy": [
"master"
]
},
{
"code": "17",
"parent": "master",
"labels": {
"en_US": "Men",
"nl_NL": "Heren"
},
"hierarchy": [
"master",
"17"
]
}
]
}
Response examples (200)
{
"items": [
{
"code": "string",
"parent": "string",
"labels": {},
"hierarchy": [
"string"
]
}
]
}
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": "Access forbidden. You are not allowed to list products."
}
Response examples (403)
{
"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"
}
Response examples (422)
{
"code": 422,
"message": "Invalid category code \"999999\""
}
Response examples (422)
{
"code": 42,
"message": "string"
}