Skip to content

Category — Create ​

Creates a new category. Mirrors Catalog → Categories → Create in the Bagisto admin panel.

Endpoint ​

EndpointMethod
/api/admin/catalog/categoriesPOST

Request body ​

FieldTypeRequiredNotes
slugstringyesURL-friendly identifier — must be unique.
namestringyesDisplay name.
descriptionstringconditionalRequired when display_mode is description_only or products_and_description.
positionintegeryesDisplay order.
attributesinteger[]yesList of filterable attribute ids.
parent_idinteger|nullnoParent category id (defaults to the root).
display_modestringnoOne of products_and_description, products_only, description_only.
statusintegerno0 = disabled, 1 = enabled.
localestringnoLocale code (e.g. en).
meta_title / meta_description / meta_keywordsstringnoSEO fields.

Response ​

201 Created. Same shape as GET /api/admin/catalog/categories/{id}.

Errors ​

HTTPCause
401 UnauthorizedMissing or invalid Bearer token
422 Unprocessable EntityValidation failure

Notes ​

  • File upload not supported in v1. logo_path and banner_path cannot be set via this endpoint — they remain null. Use the admin panel to upload images for now.

Released under the MIT License.