v1

latestSwagger 2.02026-07-13137761.0 MB
Category

Get a category

This endpoint allows you to get the information about a given category.

get/api/rest/v1/categories/{code}

Path parameters

codestring required

Code of the resource

Query parameters

with_positionboolean

Return information about category position into its category tree (only available since the 7.0 version)

Response

OK

codestring required

Category code

parentstring

Category code of the parent's category

updatedstring dateTime

Date of the last update

positioninteger

Position of the category in its level, start from 1 (only available since the 7.0 version and when query parameter "with_position" is set to "true")

channel_requirementsstring[]

List of <a href='api-reference-paas.html#Channel'>Channel</a> codes on which the category tree is required for products completeness. Only category trees can be required, not child categories.

Example response

{
  "code": "winter_collection",
  "parent": null,
  "updated": "2021-05-22T12:48:00+02:00",
  "position": 1,
  "labels": {
    "en_US": "Winter collection",
    "fr_FR": "Collection hiver"
  },
  "values": {
    "description|96b88bf4-c2b7-4b64-a1f9-5d4876c02c26|ecommerce|en_US": {
      "data": "<p>Winter collection description</p>\n",
      "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"
    }
  },
  "channel_requirements": [
    "ecommerce",
    "mobile"
  ]
}