Data Object: Product Categories

Get Product Category


{{ data.category.get(:id) }}

Parameter Type Description
id required int Product category Identifier

HHTP/1.1 200 OK
{
     id: 1,
     parentId: 0,
     alias: "shirts",
     name: "Shirts",
     photo: "https://cdn.storech.com/uploads/product-category-photo/photo.png",
     productCount: 20,
     child: [
          {
               id: 15
               parentId: 1,
               alias: "baby-shirts",
               name: "Baby shirts",
               photo: "https://cdn.storech.com/uploads/product-category-photo/photo.png",
               productCount: 15
          }
          ...
     ]
}

or

false

Parameter Type Description
id int Product category identifier
parentId int Parent category identifier
alias string Product category alias
name string Product category name
photo string Product category photo
productCount int Products count with category
child array Child categories


Get Product Categories List


{{ data.category.list({}) }}

HTTP/1.1 200 OK
[
     {
          id: 1,
          parentId: 0,
          alias: "shirts",
          name: "Shirts",
          photo: "https://cdn.storech.com/uploads/product-category-photo/photo.png",
          productCount: 20,
          child: [
               {
                    id: 15
                    parentId: 1,
                    alias: "baby-shirts",
                    name: "Baby shirts",
                    photo: "https://cdn.storech.com/uploads/product-category-photo/photo.png",
                    productCount: 15
               }
               ...
          ]
    }
    ...
]

or

[]

Parameter Type Description
id int Product category identifier
parentId int Parent category identifier
alias string Product category alias
name string Product category name
photo string Product category photo
productCount int Products count with category
child array Child categories