Skip to main content

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​

NameDescription
AuthorizationRequired. 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​

FieldTypeDescription
idstringCategory id
parent_idstring | nullParent category id. Always null for the root
nameobjectDisplay name per locale
name.enstringEnglish name
name.trstringTurkish name
pathstringMaterialized path: the int_ids from the root down to this category, joined with .. The root's path is 1
int_idintegerSequential numeric id. The root is 1
image_svgstring | nullInline SVG icon (seeded categories only; not writable through the API)
image_urlstring | nullURL of the category image
is_leafbooleantrue when the category holds tokenized assets instead of sub-categories
show_on_dashboardbooleanWhether the category is shown on the dashboard
tokenization_rulesobjectPresent only on categories that carry tokenization rules. See Get Category
created_atstringCreation time (ISO 8601)

Errors​

StatusCodeDescription
40010001No root category exists (domain 4)

See Errors for the error format and common codes.