Menu
Get Category By Code
Get a category
GET
/api/rest/v1/categories/{code}Use it in a workflow
- Add a step and choose the Akeneo connector.
- Pick the Get Category By Code action (under Category).
- Fill in the fields below, then reference the result from later steps as
{{getCategoryByCode.response.data}}.
Request
Path parameters
Query parameters
Response
Returns 200 with an object. Read it in later steps with {{getCategoryByCode.response.data.<field>}}.
{
"code": "winter_collection",
"parent": "root_category",
"updated": "2021-05-21T11:32:00+02:00",
"position": 1,
"labels": {
"en_US": "Winter collection",
"fr_FR": "Collection hiver",
"de_DE": "Winter-Kollektion"
},
"channel_requirements": [
"ecommerce",
"mobile"
],
"values": {
"description|96b88bf4-c2b7-4b64-a1f9-5d4876c02c26|ecommerce|en_US": {
"data": "<p>Winter collection description</p>",
"type": "textarea",
"channel": "ecommerce",
"locale": "en_US",
"attribute_code": "description|96b88bf4-c2b7-4b64-a1f9-5d4876c02c26"
},
"image_1|871b8686-79b5-415c-9c6f-a38f8732dfb7|ecommerce|en_US": {
"data": {
"size": 1401359,
"extension": "jpg",
"file_path": "2/d/c/7/2dc791671d726e7438219d5dc7fd51a53d6bf2bb_IMG_7860.jpg",
"mime_type": "image/jpeg",
"original_filename": "IMG_7860.jpg"
},
"type": "image",
"channel": "ecommerce",
"locale": "en_US",
"attribute_code": "image_1|871b8686-79b5-415c-9c6f-a38f8732dfb7"
}
},
"validations": {
"max_categories_per_product": 5,
"only_leaves": true,
"is_mandatory": false
}
}
Need more? See the Akeneo guide for connection setup and behaviour shared by every action.
Was this page helpful?