Type
|
Info
|
List
|
Categories
|
URL
|
http://{domain}/api/v2/categories/info_tree.json
|
Accepts Filters
|
No
|
Output Attributes
|
No
|
Info Categories Tree Data
Gets Categories Hierarchy info in a node tree format. To learn more about node trees or tree tranversal, click here.
Filters
Filter the Categories with its Subcategories into a list.
Parameter
|
Type
|
Rules
|
Example
|
id
|
int / array
|
one id or multiple Lead Commerce category ids
|
1 or array(1,2)
|
Response
Example JSON returned
{
"code": "200",
"data": {
"1": [
{
"id": "1",
"name": "Products",
"slug": "cat_products",
"tree": [
{
"id": "5",
"lft": "2",
"rgt": "7",
"name": "Women",
"slug": "cat_women"
},
{
"id": "2",
"lft": "3",
"rgt": "4",
"name": "Women Shirts",
"slug": "cat_shirts_women"
},
{
"id": "3",
"lft": "5",
"rgt": "6",
"name": "Women Pants",
"slug": "cat_pants_women"
},
{
"id": "6",
"lft": "8",
"rgt": "13",
"name": "Men",
"slug": "cat_men"
},
{
"id": "1",
"lft": "9",
"rgt": "10",
"name": "Men Shirts",
"slug": "cat_shirts_men"
},
{
"id": "4",
"lft": "11",
"rgt": "12",
"name": "Men Pants",
"slug": "cat_pants_men"
},
{
"id": "7",
"lft": "14",
"rgt": "15",
"name": "Bikes",
"slug": "cat_bikes"
}
]
}
],
"2": [
{
"id": "2",
"name": "Sale Items",
"slug": "cat_sale_items",
"tree": null
}
]
}
}