Passa al contenuto principale

API — Produtos

Documentacao tecnica gerada automaticamente a partir da especificacao OpenAPI.


GET /api/products

List Products

Parametros:

NomeTipoObrigatorioDescricao
pageintegerNao
page_sizeintegerNao
searchstringNao
category_idstringNao
tag_idstringNao
min_pricestringNao
max_pricestringNao
stock_statusstringNao
is_featuredstringNao
is_activestringNao
sort_bystringNao
sort_dirstringNao

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:

CampoTipoObrigatorioDescricao
namestringSimName
slugobjectNaoSlug
skuobjectNaoSku
descriptionobjectNaoDescription
short_descriptionobjectNaoShort Description
priceobjectSimPrice
sale_priceobjectNaoSale Price
sale_startobjectNaoSale Start
sale_endobjectNaoSale End
cost_priceobjectNaoCost Price
weightobjectNaoWeight
lengthobjectNaoLength
widthobjectNaoWidth
heightobjectNaoHeight
stock_quantityintegerNaoStock Quantity
stock_statusstringNaoStock Status
manage_stockbooleanNaoManage Stock
low_stock_thresholdintegerNaoLow Stock Threshold
is_activebooleanNaoIs Active
is_featuredbooleanNaoIs Featured
product_typestringNaoProduct Type
brandobjectNaoBrand
tax_classstringNaoTax Class
display_orderintegerNaoDisplay Order
meta_titleobjectNaoMeta Title
meta_descriptionobjectNaoMeta Description
category_idsarrayNaoCategory Ids
tag_idsarrayNaoTag 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:

NomeTipoObrigatorioDescricao
pageintegerNao
page_sizeintegerNao
thresholdintegerNaoOverride 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:

NomeTipoObrigatorioDescricao
product_idintegerSim

Corpo do pedido:

CampoTipoObrigatorioDescricao
stockintegerSimNew absolute stock quantity
reasonstringSimReason 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:

NomeTipoObrigatorioDescricao
slugstringSim

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:

NomeTipoObrigatorioDescricao
product_idintegerSim

Corpo do pedido:

CampoTipoObrigatorioDescricao
nameobjectNaoName
slugobjectNaoSlug
skuobjectNaoSku
descriptionobjectNaoDescription
short_descriptionobjectNaoShort Description
priceobjectNaoPrice
sale_priceobjectNaoSale Price
sale_startobjectNaoSale Start
sale_endobjectNaoSale End
cost_priceobjectNaoCost Price
weightobjectNaoWeight
lengthobjectNaoLength
widthobjectNaoWidth
heightobjectNaoHeight
stock_quantityobjectNaoStock Quantity
stock_statusobjectNaoStock Status
manage_stockobjectNaoManage Stock
low_stock_thresholdobjectNaoLow Stock Threshold
is_activeobjectNaoIs Active
is_featuredobjectNaoIs Featured
product_typeobjectNaoProduct Type
brandobjectNaoBrand
tax_classobjectNaoTax Class
display_orderobjectNaoDisplay Order
meta_titleobjectNaoMeta Title
meta_descriptionobjectNaoMeta Description
category_idsobjectNaoCategory Ids
tag_idsobjectNaoTag 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:

NomeTipoObrigatorioDescricao
product_idintegerSim

Resposta (204): Successful Response

Erros possiveis: 422 Validation Error


POST /api/products/{product_id}/images

Upload Product Image

Parametros:

NomeTipoObrigatorioDescricao
product_idintegerSim

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:

NomeTipoObrigatorioDescricao
product_idintegerSim
image_idintegerSim

Resposta (204): Successful Response

Erros possiveis: 422 Validation Error


Documentacao gerada automaticamente.