Get Sub Categories
You can list all sub categories belonging to a category using this service. Sub category IDs returned here can be used as the subCategoryId filter parameter on the Get Products service.
Request
curl --location --request GET '<BASE_URL>/sub-categories?categoryId=7'
--header 'Content-Type: application/json'
--header 'Authorization: <jwtToken>'
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| categoryId | Integer | Yes | The category ID to list sub categories for |
Response
200 OK
[
{
"id": 36,
"name": "Smartphones",
"categoryId": 7
},
{
"id": 37,
"name": "Feature Phones",
"categoryId": 7
}
]
Response Fields
| Field | Type | Description |
|---|---|---|
| id | Integer | Sub category ID |
| name | String | Sub category name |
| categoryId | Integer | Parent category ID |