{
"id": "a1xcgrXw",
"title": "Dining room",
"description": "<p>This is your product category description. Use it to get store visitors excited about this category.</p>",
"parent_id": "ROOT",
"image": {
"alt": "",
"url": "https://irp.cdn-website.com/md/dmtmpl/3aab5dd2-0715-4745-b747-f971788f6128/dms3rep/multi/dining-room-table-chairs-zoom.jpg"
},
"seo": null,
"subcategories": [],
"products": [
{
"id": "sQ0KvBRq",
"name": "Plain Design Cutlery",
"order": 0
},
{
"id": "VkmaT2AL",
"name": "Ceramic Design Vase",
"order": 1
},
{
"id": "EDqAcSiU",
"name": "Grey Ceramic plate",
"order": 2
},
{
"id": "d7D7xzPj",
"name": "Recycle Wood Stool",
"order": 3
},
{
"id": "9GKhf8CC",
"name": "Handmade Wooden Bowl",
"order": 4
},
{
"id": "mDapqtlv",
"name": "Glass Coffee Cup",
"order": 5
}
]
}
Category Details
Property | Description |
---|---|
id string | System identifier of the category. Read only. |
title | The name of the category that's displayed on the website. Max length of 250 characters. Required for create. |
description
| The description of the category. Supports standard HTML. Max length of 2000 characters. |
parent_id | If there is a parent category assigned. If there is no parent category (it's not a sub-category), it will be the special constant of "ROOT". |
image.alt | The alt text of the image that is associated with the category. |
image.url | The URL for the image associated with the category. |
seo.title | Set the SEO meta title of the category. |
seo.description | The meta description for the category |
seo.url | The URL slug associated with the category. |
products array (products[])
Control which products are associated with the category. Expects an array of objects. The array of objects only accepts the ID of the product to set the products and the order. The order is taken from the order in which they are passed into the array, not the order ID value.
Full Array of Objects
The patch endpoint expects a full array of objects when updating which products are associated with the category.
Property | Description |
---|---|
products[].id string | The ID of the product that should be within this category. |
products[].name | Currently always set to 'CART'. Read-only |
products[].order | The order they are displayed on the website. Read-only. |
subcategories[]
Set which categories should be set as sub-categories of this category.
Property | Description |
---|---|
subcategories array | Accepts an array of objects of which categories should be assigned as sub-categories. |
subcategories[].id | The ID of the sub-category |
subcategories[].title | The title of the category. Read only. |
subcategories[].order | The order that the subcategory is presented in. Read only. |