Get Root Category
Returns the root of the category tree: the category with int_id 1 that every category path is anchored to. Its parent_id is null. Walk the tree from here with Get Children Categories, or jump straight to the categories that hold assets with List Leaf Categories.
Required permission: category:view
Request
GET /v2/admin/categories/root
Headers
| Name | Description |
|---|---|
Authorization | Required. Bearer <access_token> |
Example
curl --request GET \
--url '{{baseUrl}}/v2/admin/categories/root' \
--header 'Authorization: Bearer <access_token>'
Response
{
"id": "667e9251ca818a2138ed4885",
"parent_id": null,
"name": {
"en": "Apex",
"tr": "Apex"
},
"path": "1",
"int_id": 1,
"image_svg": null,
"image_url": null,
"is_leaf": false,
"show_on_dashboard": false,
"created_at": "2023-09-05T19:26:16.294Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Category id |
parent_id | string | null | Parent category id. Always null for the root |
name | object | Display name per locale |
name.en | string | English name |
name.tr | string | Turkish name |
path | string | Materialized path: the int_ids from the root down to this category, joined with .. The root's path is 1 |
int_id | integer | Sequential numeric id. The root is 1 |
image_svg | string | null | Inline SVG icon (seeded categories only; not writable through the API) |
image_url | string | null | URL of the category image |
is_leaf | boolean | true when the category holds tokenized assets instead of sub-categories |
show_on_dashboard | boolean | Whether the category is shown on the dashboard |
tokenization_rules | object | Present only on categories that carry tokenization rules. See Get Category |
created_at | string | Creation time (ISO 8601) |
Errors
| Status | Code | Description |
|---|---|---|
| 400 | 10001 | No root category exists (domain 4) |
See Errors for the error format and common codes.