Skip to main content

Root Category

Retrieves the root category information.

Request

GET /v2/admin/categories/root

Headers

NameDescription
AuthorizationRequired. Bearer token for authentication

Example

curl --request GET \
--url '\{\{baseUrl\}\}/v2/admin/categories/root' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'

Response

{
"id": "root",
"parent_id": null,
"name": {
"en": "Root",
"tr": "Kök"
},
"path": "root",
"int_id": 0,
"image_svg": "data:image/svg+xml;base64,...",
"is_leaf": false,
"created_at": "2024-03-20T10:00:00Z"
}

Response Fields

FieldTypeDescription
idstringUnique ID of the root category
parent_idnullAlways null for root category
nameobjectCategory name translations
name.enstringCategory name in English
name.trstringCategory name in Turkish
pathstringURL path of the category
int_idintegerNumeric ID of the category (0 for root)
image_svgstringSVG data of the category icon
is_leafbooleanWhether the category contains subcategories
created_atstringCategory creation date

Status Codes

Status CodeDescription
200Success - Root category details retrieved successfully
401Unauthorized - Invalid or missing authentication token
500Internal Server Error