Skip to main content

Categories

Organises items into categories and subcategory hierarchies.

Top-level structure:

{
"categories": {
"<categoryId>": { ... }
}
}

Category fields​

PropertyTypeRequiredDescription
namestringYesInternal name used for administration purposes; not displayed to guests.
titletranslatableContentYesDisplay title.
descriptiontranslatableContentNoDisplay description.
images.default.urltranslatableContentYes (if images is present)URL for the default category image.
itemsarray of { referencedItemId }YesItems in this category, in display order. The same item can appear in multiple categories.
subcategoriesarray of { referencedCategoryId }NoChild categories, in display order. A category listed here is not treated as a root category in menus that also include its parent.
uiPropertiesobjectNoControls how the category is displayed.

Category uiProperties fields​

PropertyTypeRequiredDescription
isVisibleOnCategoryListsbooleanNoWhen false, hides the category from ordinary category listings. Use for upsell-only categories. Defaults to true.
heroProductLimitintegerNoMaximum number of products shown before a "show more" button is displayed.
productDisplayModestringNoProduct layout within this category. One of "regular", "emphasized", or "quickaddlist". Defaults to "regular".

Example:

{
"categories": {
"200": {
"name": "Beverages",
"title": {
"value": "Beverages",
"translations": { "sv-SE": "Drycker" }
},
"items": [
{ "referencedItemId": "1001" },
{ "referencedItemId": "1004" }
],
"subcategories": [
{ "referencedCategoryId": "201" }
],
"uiProperties": {
"productDisplayMode": "emphasized"
}
}
}
}