Product Sub Category
Create, update, list and remove product subcategories linked to parent product categories.
Authentication
- Public:
GET /api/v1/product-subcategoriesrequires no authentication. - Admin: All mutating endpoints (
POST,PUT,DELETE) require an authenticatedADMINaccount withcatalog:managepermission:
Product Sub Category Endpoints
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /api/v1/product-subcategories |
Retrieve subcategories for a category | Public |
| POST | /api/v1/admin/product-subcategories |
Create a new product subcategory | Admin + catalog:manage |
| PUT | /api/v1/admin/product-subcategories/{id} |
Update an existing subcategory name | Admin + catalog:manage |
| DELETE | /api/v1/admin/product-subcategories/{id} |
Delete a product subcategory | Admin + catalog:manage |
Endpoint Details
1. Get Product Sub Categories
GET
/api/v1/product-subcategories
Public / No Auth Required
Retrieves all subcategories associated with a mandatory parent category UUID.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
categoryId |
string | Required | UUID of the parent product category |
page / offset |
integer | Optional | Page number (default: 1) or offset (default: 0) |
perPage / limit |
integer | Optional | Items per page (default: 20) |
Request Examples
Response
2. Create Product Sub Category
POST
/api/v1/admin/product-subcategories
Admin Token Required
Creates a new subcategory linked to an existing parent category.
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
categoryId |
string | Required | UUID of the parent category |
name |
string | Required | Subcategory display title |
Request Examples
Response
3. Update Product Sub Category
PUT
/api/v1/admin/product-subcategories/{id}
Admin Token Required
Updates the name of an existing product subcategory. The new name can be passed as a JSON body parameter or URL query parameter.
Path & Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string (path) | Required | UUID of the subcategory to update |
name |
string (query/body) | Required | Updated name |
Request Examples
Response
4. Delete Product Sub Category
DELETE
/api/v1/admin/product-subcategories/{id}
Admin Token Required
Permanently removes a product subcategory.
Request Examples
Response
Error Handling
Standard Error Responses
For error payload structures, common status codes (400, 401, 403, 404), and validation failure schemas, see the Error Handling & Status Codes Guide.