Skip to main content

List Leaf Categories

Lists the leaf categories (is_leaf: true) across the whole tree, newest first. Leaves are the categories that hold tokenized assets, so this is the list a tokenization flow picks a category from, without walking the branches to get there. Optionally narrowed by a name search.

Required permission: category:view

Request​

GET /v2/admin/categories/leaves

Parameters​

NameTypeInDescription
pageintegerqueryRequired. Page number, starting at 1
per_pageintegerqueryRequired. Items per page, 1–100
searchstringqueryCase-insensitive substring match on the English or the Turkish name

Headers​

NameDescription
AuthorizationRequired. Bearer <access_token>

Example​

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

Response​

{
"data": [
{
"id": "677ed6e3cc111aea14a3dfb4",
"parent_id": "677ed6e3cc111aea14a3dfb1",
"name": {
"en": "Silver Fund",
"tr": "Gümüş Fonu"
},
"path": "1.4.108.111",
"int_id": 111,
"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
dataarrayLeaf categories on this page. Each item has the shape described on Get Category
totalintegerNumber of leaf categories matching the search
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

See Errors for the error format and common codes.