Skip to main content

Category Detail

Retrieves detailed information about a category with the specified ID.

Request

GET /v2/admin/categories/{categoryID}

Parameters

NameTypeInDescription
categoryIDstringpathRequired. The ID of the category to retrieve details for

Headers

NameDescription
AuthorizationRequired. Bearer token for authentication

Example

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

Response

{
"id": "123456789",
"parent_id": "987654321",
"name": {
"en": "Electronics",
"tr": "Elektronik"
},
"path": "electronics",
"int_id": 1,
"image_svg": "data:image/svg+xml;base64,...",
"is_leaf": false,
"created_at": "2024-03-20T10:00:00Z"
}

Response Fields

FieldTypeDescription
idstringUnique ID of the category
parent_idstringParent category ID (if exists)
nameobjectCategory name translations
name.enstringCategory name in English
name.trstringCategory name in Turkish
pathstringURL path of the category
int_idintegerNumeric ID of the category
image_svgstringSVG data of the category icon
is_leafbooleanWhether the category contains subcategories
created_atstringCategory creation date

Status Codes

Status CodeDescription
200Success - Category details retrieved successfully
400Bad Request - Invalid category ID
401Unauthorized - Invalid or missing authentication token
404Not Found - Category does not exist
500Internal Server Error