API — Produtos
Documentacao tecnica gerada automaticamente a partir da especificacao OpenAPI.
GET /api/products
List Products
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| page | integer | Nao | — |
| page_size | integer | Nao | — |
| search | string | Nao | — |
| category_id | string | Nao | — |
| tag_id | string | Nao | — |
| min_price | string | Nao | — |
| max_price | string | Nao | — |
| stock_status | string | Nao | — |
| is_featured | string | Nao | — |
| is_active | string | Nao | — |
| sort_by | string | Nao | — |
| sort_dir | string | Nao | — |
Exemplo resposta (200):
{
"items": [
"..."
],
"total": 0,
"page": 0,
"page_size": 0,
"pages": 0
}
Erros possiveis: 422 Validation Error
POST /api/products
Create Product
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| name | string | Sim | Name |
| slug | object | Nao | Slug |
| sku | object | Nao | Sku |
| description | object | Nao | Description |
| short_description | object | Nao | Short Description |
| price | object | Sim | Price |
| sale_price | object | Nao | Sale Price |
| sale_start | object | Nao | Sale Start |
| sale_end | object | Nao | Sale End |
| cost_price | object | Nao | Cost Price |
| weight | object | Nao | Weight |
| length | object | Nao | Length |
| width | object | Nao | Width |
| height | object | Nao | Height |
| stock_quantity | integer | Nao | Stock Quantity |
| stock_status | string | Nao | Stock Status |
| manage_stock | boolean | Nao | Manage Stock |
| low_stock_threshold | integer | Nao | Low Stock Threshold |
| is_active | boolean | Nao | Is Active |
| is_featured | boolean | Nao | Is Featured |
| product_type | string | Nao | Product Type |
| brand | object | Nao | Brand |
| tax_class | string | Nao | Tax Class |
| display_order | integer | Nao | Display Order |
| meta_title | object | Nao | Meta Title |
| meta_description | object | Nao | Meta Description |
| category_ids | array | Nao | Category Ids |
| tag_ids | array | Nao | Tag Ids |
Exemplo pedido:
{
"name": "string",
"slug": null,
"sku": null,
"description": null,
"short_description": null,
"price": null,
"sale_price": null,
"sale_start": null,
"sale_end": null,
"cost_price": null,
"weight": null,
"length": null,
"width": null,
"height": null,
"stock_quantity": 0,
"stock_status": "string",
"manage_stock": true,
"low_stock_threshold": 0,
"is_active": true,
"is_featured": true,
"product_type": "string",
"brand": null,
"tax_class": "string",
"display_order": 0,
"meta_title": null,
"meta_description": null,
"category_ids": [
"..."
],
"tag_ids": [
"..."
]
}
Exemplo resposta (201):
{
"id": 0,
"tenant_id": 0,
"sku": null,
"name": "string",
"slug": "string",
"description": null,
"short_description": null,
"price": "string",
"sale_price": null,
"sale_start": null,
"sale_end": null,
"cost_price": null,
"weight": null,
"stock_quantity": 0,
"stock_status": "string",
"manage_stock": true,
"is_active": true,
"is_featured": true,
"product_type": "string",
"brand": null,
"tax_class": "string",
"display_order": 0,
"views_count": 0,
"sales_count": 0,
"avg_rating": "string",
"meta_title": null,
"meta_description": null,
"created_at": null,
"updated_at": null,
"images": [
"..."
],
"variants": [
"..."
],
"categories": [
"..."
],
"tags": [
"..."
]
}
Erros possiveis: 422 Validation Error
GET /api/products/low-stock
List Low Stock Products
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| page | integer | Nao | — |
| page_size | integer | Nao | — |
| threshold | integer | Nao | Override threshold (default: 10) |
Exemplo resposta (200):
{
"items": [
"..."
],
"total": 0,
"page": 0,
"page_size": 0,
"pages": 0
}
Erros possiveis: 422 Validation Error
PUT /api/products/{product_id}/stock
Adjust Product Stock
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| product_id | integer | Sim | — |
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| stock | integer | Sim | New absolute stock quantity |
| reason | string | Sim | Reason for the adjustment |
Exemplo pedido:
{
"stock": 0,
"reason": "string"
}
Exemplo resposta (200):
{
"id": 0,
"tenant_id": 0,
"sku": null,
"name": "string",
"slug": "string",
"description": null,
"short_description": null,
"price": "string",
"sale_price": null,
"sale_start": null,
"sale_end": null,
"cost_price": null,
"weight": null,
"stock_quantity": 0,
"stock_status": "string",
"manage_stock": true,
"is_active": true,
"is_featured": true,
"product_type": "string",
"brand": null,
"tax_class": "string",
"display_order": 0,
"views_count": 0,
"sales_count": 0,
"avg_rating": "string",
"meta_title": null,
"meta_description": null,
"created_at": null,
"updated_at": null,
"images": [
"..."
],
"variants": [
"..."
],
"categories": [
"..."
],
"tags": [
"..."
]
}
Erros possiveis: 422 Validation Error
GET /api/products/{slug}
Get Product
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| slug | string | Sim | — |
Exemplo resposta (200):
{
"id": 0,
"tenant_id": 0,
"sku": null,
"name": "string",
"slug": "string",
"description": null,
"short_description": null,
"price": "string",
"sale_price": null,
"sale_start": null,
"sale_end": null,
"cost_price": null,
"weight": null,
"stock_quantity": 0,
"stock_status": "string",
"manage_stock": true,
"is_active": true,
"is_featured": true,
"product_type": "string",
"brand": null,
"tax_class": "string",
"display_order": 0,
"views_count": 0,
"sales_count": 0,
"avg_rating": "string",
"meta_title": null,
"meta_description": null,
"created_at": null,
"updated_at": null,
"images": [
"..."
],
"variants": [
"..."
],
"categories": [
"..."
],
"tags": [
"..."
]
}
Erros possiveis: 422 Validation Error
PUT /api/products/{product_id}
Update Product
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| product_id | integer | Sim | — |
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| name | object | Nao | Name |
| slug | object | Nao | Slug |
| sku | object | Nao | Sku |
| description | object | Nao | Description |
| short_description | object | Nao | Short Description |
| price | object | Nao | Price |
| sale_price | object | Nao | Sale Price |
| sale_start | object | Nao | Sale Start |
| sale_end | object | Nao | Sale End |
| cost_price | object | Nao | Cost Price |
| weight | object | Nao | Weight |
| length | object | Nao | Length |
| width | object | Nao | Width |
| height | object | Nao | Height |
| stock_quantity | object | Nao | Stock Quantity |
| stock_status | object | Nao | Stock Status |
| manage_stock | object | Nao | Manage Stock |
| low_stock_threshold | object | Nao | Low Stock Threshold |
| is_active | object | Nao | Is Active |
| is_featured | object | Nao | Is Featured |
| product_type | object | Nao | Product Type |
| brand | object | Nao | Brand |
| tax_class | object | Nao | Tax Class |
| display_order | object | Nao | Display Order |
| meta_title | object | Nao | Meta Title |
| meta_description | object | Nao | Meta Description |
| category_ids | object | Nao | Category Ids |
| tag_ids | object | Nao | Tag Ids |
Exemplo pedido:
{
"name": null,
"slug": null,
"sku": null,
"description": null,
"short_description": null,
"price": null,
"sale_price": null,
"sale_start": null,
"sale_end": null,
"cost_price": null,
"weight": null,
"length": null,
"width": null,
"height": null,
"stock_quantity": null,
"stock_status": null,
"manage_stock": null,
"low_stock_threshold": null,
"is_active": null,
"is_featured": null,
"product_type": null,
"brand": null,
"tax_class": null,
"display_order": null,
"meta_title": null,
"meta_description": null,
"category_ids": null,
"tag_ids": null
}
Exemplo resposta (200):
{
"id": 0,
"tenant_id": 0,
"sku": null,
"name": "string",
"slug": "string",
"description": null,
"short_description": null,
"price": "string",
"sale_price": null,
"sale_start": null,
"sale_end": null,
"cost_price": null,
"weight": null,
"stock_quantity": 0,
"stock_status": "string",
"manage_stock": true,
"is_active": true,
"is_featured": true,
"product_type": "string",
"brand": null,
"tax_class": "string",
"display_order": 0,
"views_count": 0,
"sales_count": 0,
"avg_rating": "string",
"meta_title": null,
"meta_description": null,
"created_at": null,
"updated_at": null,
"images": [
"..."
],
"variants": [
"..."
],
"categories": [
"..."
],
"tags": [
"..."
]
}
Erros possiveis: 422 Validation Error
DELETE /api/products/{product_id}
Delete Product
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| product_id | integer | Sim | — |
Resposta (204): Successful Response
Erros possiveis: 422 Validation Error
POST /api/products/{product_id}/images
Upload Product Image
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| product_id | integer | Sim | — |
Exemplo resposta (201):
{
"id": 0,
"url": "string",
"alt_text": null,
"display_order": 0,
"is_primary": true
}
Erros possiveis: 422 Validation Error
DELETE /api/products/{product_id}/images/{image_id}
Delete Product Image
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| product_id | integer | Sim | — |
| image_id | integer | Sim | — |
Resposta (204): Successful Response
Erros possiveis: 422 Validation Error
Documentacao gerada automaticamente.