CategoryTree
Category tree model.
interface CategoryTree {
children?: CategoryTree[];
depth: number;
id: number;
is_visible?: boolean;
name: string;
parent_id: number;
path: number[];
url?: string;
}Properties
| Name | Required | Type | Description |
|---|---|---|---|
children | Optional | CategoryTree[] | The list of children of the category. |
depth | Required | number | Depth in a tree of categories. |
id | Required | number | Unique ID of the category tree. |
is_visible | Optional | boolean | Flag to determine whether the product should be displayed to customers browsing the store. If true, the category will be displayed. If false, the category will be hidden from view. |
name | Required | string | The name displayed for the category. Name is unique with respect to the category’s siblings. |
parent_id | Required | number | The unique numeric ID of the category's parent. This field controls where the category sits in the tree of categories that organize the catalog. Required in a POST if creating a child category. |
path | Required | number[] | Path made of parent categories ids for current category tree level. |
url | Optional | string | The custom URL for the category on the storefront. |