Retrieve the sub-categories
POST {{baseUrl}}/categories/:id/sub-categories
Description
This endpoint retrieves the sub-categories for a specified category.
Request
- Endpoint:
{{baseUrl}}/categories/:id/sub-categories
Path Parameter
id(Required, string): The identifier of the parent category for which sub-categories are to be retrieved.
Response
- Status: 200 OK
- Content-Type: /
Headers
Accept: */
Path Variables
id(Required, string): The identifier of the parent category.
Sample Request
curl --location -g '{{baseUrl}}/categories/:id/sub-categories' \
--header 'Accept: */*'
Sample Response
[
{
"id": "1",
"name": "Subcategory 1"
},
{
"id": "2",
"name": "Subcategory 2"
}
]
LANGUAGE
CURL REQUEST
curl --request POST \
--url /categories/:id/sub-categories \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!