POST
/
api
/
categories
{
  "name": "Electronics",
  "project": 1,
  "parent": null,
  "description": "Electronic products category",
  "is_active": true
}
{
  "id": 1,
  "name": "Electronics",
  "slug": "electronics",
  "project": 1,
  "created_at": "2024-01-01T12:00:00Z"
}

Create a new category for organizing products.

Body Parameters

name
string
required

Category name

project
integer
required

Project ID

parent
integer

Parent category ID for nested categories

description
string

Category description

is_active
boolean
default:"true"

Whether the category is active

{
  "name": "Electronics",
  "project": 1,
  "parent": null,
  "description": "Electronic products category",
  "is_active": true
}
{
  "id": 1,
  "name": "Electronics",
  "slug": "electronics",
  "project": 1,
  "created_at": "2024-01-01T12:00:00Z"
}