Get Children Categories
Retrieves the child categories of a specified category ID with pagination support.
Request
POST /v2/admin/categories/{categoryID}/children/search
Parameters
| Name | Type | In | Description |
|---|---|---|---|
categoryID | string | path | Required. The ID of the parent category |
Headers
| Name | Description |
|---|---|
Authorization | Required. Bearer token for authentication |
Content-Type | Required. Must be application/json |
Request Body
| Field | Type | Description | Validation |
|---|---|---|---|
page | integer | Required. Page number | Must be greater than or equal to 1 |
per_page | integer | Required. Number of items per page | Must be between 1 and 100 |
Example
curl --request POST \
--url '\{\{baseUrl\}\}/v2/admin/categories/123456789/children/search' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'Content-Type: application/json' \
--data '{
"page": 1,
"per_page": 10
}'
Response
{
"data": [
{
"id": "987654321",
"parent_id": "123456789",
"name": {
"en": "Smartphones",
"tr": "Akıllı Telefonlar"
},
"path": "electronics/smartphones",
"int_id": 2,
"image_svg": "data:image/svg+xml;base64,...",
"is_leaf": true,
"created_at": "2024-03-20T10:00:00Z"
}
],
"total": 1,
"page": 1,
"per_page": 10
}
Response Fields
Pagination Object
| Field | Type | Description |
|---|---|---|
data | array | Array of category objects |
total | integer | Total number of items |
page | integer | Current page number |
per_page | integer | Number of items per page |
Category Object
| Field | Type | Description |
|---|---|---|
id | string | Unique ID of the category |
parent_id | string | Parent category ID |
name | object | Category name translations |
name.en | string | Category name in English |
name.tr | string | Category name in Turkish |
path | string | URL path of the category |
int_id | integer | Numeric ID of the category |
image_svg | string | SVG data of the category icon |
is_leaf | boolean | Whether the category contains subcategories |
created_at | string | Category creation date |
Status Codes
| Status Code | Description |
|---|---|
| 200 | Success - Child categories retrieved successfully |
| 400 | Bad Request - Invalid request parameters |
| 401 | Unauthorized - Invalid or missing authentication token |
| 404 | Not Found - Parent category does not exist |
| 500 | Internal Server Error |