Alokai

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

NameRequiredTypeDescription
childrenOptionalCategoryTree[]The list of children of the category.
depthRequirednumberDepth in a tree of categories.
idRequirednumberUnique ID of the category tree.
is_visibleOptionalbooleanFlag 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.
nameRequiredstringThe name displayed for the category. Name is unique with respect to the category’s siblings.
parent_idRequirednumberThe 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.
pathRequirednumber[]Path made of parent categories ids for current category tree level.
urlOptionalstringThe custom URL for the category on the storefront.

Referenced Types

On this page