Category — Create
Creates a new category. Mirrors Catalog → Categories → Create in the Bagisto admin panel.
Endpoint
| Endpoint | Method |
|---|---|
/api/admin/catalog/categories | POST |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
slug | string | yes | URL-friendly identifier — must be unique. |
name | string | yes | Display name. |
description | string | conditional | Required when display_mode is description_only or products_and_description. |
position | integer | yes | Display order. |
attributes | integer[] | yes | List of filterable attribute ids. |
parent_id | integer|null | no | Parent category id (defaults to the root). |
display_mode | string | no | One of products_and_description, products_only, description_only. |
status | integer | no | 0 = disabled, 1 = enabled. |
locale | string | no | Locale code (e.g. en). |
meta_title / meta_description / meta_keywords | string | no | SEO fields. |
Response
201 Created. Same shape as GET /api/admin/catalog/categories/{id}.
Errors
| HTTP | Cause |
|---|---|
401 Unauthorized | Missing or invalid Bearer token |
422 Unprocessable Entity | Validation failure |
Notes
- File upload not supported in v1.
logo_pathandbanner_pathcannot be set via this endpoint — they remainnull. Use the admin panel to upload images for now.

