v1
latestSwagger 2.02026-07-13137761.0 MBCategory
Update/create a category
This endpoint allows you to update a given category. Know more about <a href="/documentation/update.html#update-behavior">Update behavior</a>. Note that if no category exists for the given code, it creates it.
patch/api/rest/v1/categories/{code}
Path parameters
codestring required
Code of the resource
Request body
Example request
{
"code": "winter_collection",
"parent": null,
"labels": {
"en_US": "Winter collection",
"fr_FR": "Collection hiver"
},
"values": [
{
"data": "<p>Winter collection description</p>",
"channel": "ecommerce",
"locale": "en_US",
"attribute_code": "a_text_area_attribute"
},
{
"data": false,
"channel": "ecommerce",
"locale": null,
"attribute_code": "a_boolean_attribute"
},
{
"data": null,
"channel": null,
"locale": null,
"attribute_code": "an_image_attribute"
}
],
"validations": {
"max_categories_per_product": 42,
"only_leaves": false,
"is_mandatory": true
},
"channel_requirements": [
"ecommerce",
"mobile"
]
}Response
Created