API — Categorias
Documentacao tecnica gerada automaticamente a partir da especificacao OpenAPI.
GET /api/categories
List Categories
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| flat | boolean | Nao | Return flat list instead of tree |
| include_inactive | boolean | Nao | — |
Exemplo resposta (200):
{
"items": [
"..."
],
"total": 0
}
Erros possiveis: 422 Validation Error
POST /api/categories
Create Category
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| name | string | Sim | Name |
| slug | object | Nao | Slug |
| parent_id | object | Nao | Parent Id |
| description | object | Nao | Description |
| image_url | object | Nao | Image Url |
| display_order | integer | Nao | Display Order |
| is_active | boolean | Nao | Is Active |
| meta_title | object | Nao | Meta Title |
| meta_description | object | Nao | Meta Description |
Exemplo pedido:
{
"name": "string",
"slug": null,
"parent_id": null,
"description": null,
"image_url": null,
"display_order": 0,
"is_active": true,
"meta_title": null,
"meta_description": null
}
Exemplo resposta (201):
{
"id": 0,
"tenant_id": 0,
"parent_id": null,
"name": "string",
"slug": "string",
"description": null,
"image_url": null,
"display_order": 0,
"is_active": true,
"meta_title": null,
"meta_description": null,
"product_count": 0,
"created_at": null,
"children": [
"..."
]
}
Erros possiveis: 422 Validation Error
GET /api/categories/{slug}
Get Category
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| slug | string | Sim | — |
Exemplo resposta (200):
{
"id": 0,
"tenant_id": 0,
"parent_id": null,
"name": "string",
"slug": "string",
"description": null,
"image_url": null,
"display_order": 0,
"is_active": true,
"meta_title": null,
"meta_description": null,
"product_count": 0,
"created_at": null,
"children": [
"..."
]
}
Erros possiveis: 422 Validation Error
PUT /api/categories/{category_id}
Update Category
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| category_id | integer | Sim | — |
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| name | object | Nao | Name |
| slug | object | Nao | Slug |
| parent_id | object | Nao | Parent Id |
| description | object | Nao | Description |
| image_url | object | Nao | Image Url |
| display_order | object | Nao | Display Order |
| is_active | object | Nao | Is Active |
| meta_title | object | Nao | Meta Title |
| meta_description | object | Nao | Meta Description |
Exemplo pedido:
{
"name": null,
"slug": null,
"parent_id": null,
"description": null,
"image_url": null,
"display_order": null,
"is_active": null,
"meta_title": null,
"meta_description": null
}
Exemplo resposta (200):
{
"id": 0,
"tenant_id": 0,
"parent_id": null,
"name": "string",
"slug": "string",
"description": null,
"image_url": null,
"display_order": 0,
"is_active": true,
"meta_title": null,
"meta_description": null,
"product_count": 0,
"created_at": null,
"children": [
"..."
]
}
Erros possiveis: 422 Validation Error
DELETE /api/categories/{category_id}
Delete Category
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| category_id | integer | Sim | — |
Resposta (204): Successful Response
Erros possiveis: 422 Validation Error
Documentacao gerada automaticamente.