SwiftGoma.SwiftGoma

Search endpoints

Jump to any API endpoint by name, method, or path

Categories

Create subcategory

POST/api/v1/products/categories/:categoryId/subcategories

Creates a subcategory under a parent category. Staff-only.

Requires Authorization
ADMIN, SUPPORT only
Authenticated action

Path parameters

categoryIdstringrequired
Parent category ID.

Body parameters

namestringrequired
2–60 characters, unique within the parent category.
sortOrdernumber
Display order. Defaults to 0.
Request
curl --request POST \
  --url https://api.swiftgoma.com/api/v1/products/categories/:categoryId/subcategories \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Aline Mapendo",
  "sortOrder": "<sortOrder>"
}'
201Example response
{
  "success": true,
  "data": {
    "id": "sub_1a2b3c",
    "categoryId": "cat_9f1e2a3b",
    "name": "Boissons",
    "slug": "boissons",
    "sortOrder": 0,
    "isActive": true
  }
}