Get Product Category
{{ data.category.get(:id) }}
- Request Parameters
Parameter |
Type |
Description |
id required |
int |
Product category Identifier |
- Success Response
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
- Response Parameters
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({}) }}
- Success Response
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
[]
- Response Parameters
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 |