Skip to main content

Get Children Categories

Lists the direct children of a category, newest first. Use it to walk the tree one level at a time from the root. A category id that matches nothing answers an empty page, not an error.

Required permission: category:view

Request​

GET /v2/admin/categories/{category_id}/children

Parameters​

NameTypeInDescription
category_idstringpathRequired. Id of the parent category (24-character hex)
pageintegerqueryRequired. Page number, starting at 1
per_pageintegerqueryRequired. Items per page, 1–100

Headers​

NameDescription
AuthorizationRequired. Bearer <access_token>

Example​

curl --request GET \
--url '{{baseUrl}}/v2/admin/categories/667e9251ca818a2138ed4891/children?page=1&per_page=20' \
--header 'Authorization: Bearer <access_token>'

Response​

{
"data": [
{
"id": "667e9251ca818a2138ed4915",
"parent_id": "667e9251ca818a2138ed4891",
"name": {
"en": "Residential",
"tr": "Konut"
},
"path": "1.2.7.25",
"int_id": 25,
"image_svg": null,
"image_url": null,
"is_leaf": true,
"show_on_dashboard": false,
"created_at": "2023-09-05T19:26:16.294Z"
}
],
"total": 1,
"page": 1,
"per_page": 20
}

Response Fields​

FieldTypeDescription
dataarrayChild categories on this page. Each item has the shape described on Get Category
totalintegerNumber of direct children
pageintegerPage number sent in the request
per_pageintegerPage size sent in the request

Errors​

StatusCodeDescription
40010015Validation failed (page / per_page missing or out of range) — see details
40010016category_id is not a valid 24-character hex id

See Errors for the error format and common codes.