Retrieving the category tree
GET {{api-url}}/category/{{tenant}}/category-trees/{{parentCategoryId}}?showUnpublished=false
Retrieves the category tree with given id.
Required scopes
category.category_read_unpublished
Note: Only required if the response should contain unpublished categories.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
showUnpublished | boolean | If set to true , not published categories are retrieved as well. | |
Possible values: |
true
false
Note: To get unpublished categories you need to havecategory.category_read_unpublished
scope. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
X-Version | string | (Required) To use this endpoint you have to add X-Version header with proper value to your request. |
Note: The header value has to match following regular expression: ^v[1-9][0-9]?$
|
| Accept
| string | | |
RESPONSES
status: OK
{"id":"38118","localizedName":{"en":"ProductRoot"},"code":"productroot","localizedSlug":{"en":"productroot"},"localizedDescription":{"en":"ProductRoot"},"position":55555,"published":true,"subcategories":[{"id":"38119","parentId":"38118","localizedName":{"en":"Fruits \u0026 Vegetables"},"code":"fruits-\u0026-vegetables","localizedSlug":{"en":"fruits-\u0026-vegetables"},"localizedDescription":{"en":"Fresh and tasty fruits and vegetables."},"position":0,"published":true,"subcategories":[{"id":"38120","parentId":"38119","localizedName":{"en":"Fruit"},"code":"fruit","localizedSlug":{"en":"fruit"},"position":0,"published":true}]}]}