Aller au contenu principal

API — Categorias

Documentacao tecnica gerada automaticamente a partir da especificacao OpenAPI.


GET /api/categories

List Categories

Parametros:

NomeTipoObrigatorioDescricao
flatbooleanNaoReturn flat list instead of tree
include_inactivebooleanNao

Exemplo resposta (200):

{
"items": [
"..."
],
"total": 0
}

Erros possiveis: 422 Validation Error


POST /api/categories

Create Category

Corpo do pedido:

CampoTipoObrigatorioDescricao
namestringSimName
slugobjectNaoSlug
parent_idobjectNaoParent Id
descriptionobjectNaoDescription
image_urlobjectNaoImage Url
display_orderintegerNaoDisplay Order
is_activebooleanNaoIs Active
meta_titleobjectNaoMeta Title
meta_descriptionobjectNaoMeta 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:

NomeTipoObrigatorioDescricao
slugstringSim

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:

NomeTipoObrigatorioDescricao
category_idintegerSim

Corpo do pedido:

CampoTipoObrigatorioDescricao
nameobjectNaoName
slugobjectNaoSlug
parent_idobjectNaoParent Id
descriptionobjectNaoDescription
image_urlobjectNaoImage Url
display_orderobjectNaoDisplay Order
is_activeobjectNaoIs Active
meta_titleobjectNaoMeta Title
meta_descriptionobjectNaoMeta 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:

NomeTipoObrigatorioDescricao
category_idintegerSim

Resposta (204): Successful Response

Erros possiveis: 422 Validation Error


Documentacao gerada automaticamente.