Skip to main content

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

ParameterTypeRequired
Description
categoryIdIntegerYesThe 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

FieldTypeDescription
idIntegerSub category ID
nameStringSub category name
categoryIdIntegerParent category ID