API — Encomendas
Documentacao tecnica gerada automaticamente a partir da especificacao OpenAPI.
GET /api/orders
List Orders
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| page | integer | Nao | — |
| page_size | integer | Nao | — |
| status | string | Nao | — |
Exemplo resposta (200):
{
"items": [
"..."
],
"total": 0,
"page": 0,
"page_size": 0,
"pages": 0
}
Erros possiveis: 422 Validation Error
GET /api/orders/by-number/{order_number}
Get Order By Number
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| order_number | string | Sim | — |
| string | Sim | Billing email for order verification |
Exemplo resposta (200):
{
"id": 0,
"order_number": "string",
"user_id": null,
"status": "string",
"subtotal": "string",
"shipping_total": "string",
"tax_total": "string",
"discount_total": "string",
"total": "string",
"currency": "string",
"billing_first_name": null,
"billing_last_name": null,
"billing_email": null,
"billing_phone": null,
"billing_address": null,
"billing_city": null,
"billing_postcode": null,
"billing_country": null,
"billing_nif": null,
"shipping_first_name": null,
"shipping_last_name": null,
"shipping_address": null,
"shipping_city": null,
"shipping_postcode": null,
"shipping_country": null,
"shipping_method": null,
"tracking_number": null,
"tracking_url": null,
"payment_method": null,
"payment_status": null,
"coupon_code": null,
"customer_notes": null,
"admin_notes": null,
"paid_at": null,
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": null,
"updated_at": null,
"items": [
"..."
]
}
Erros possiveis: 422 Validation Error
GET /api/orders/{order_id}
Get Order
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| order_id | integer | Sim | — |
Exemplo resposta (200):
{
"id": 0,
"order_number": "string",
"user_id": null,
"status": "string",
"subtotal": "string",
"shipping_total": "string",
"tax_total": "string",
"discount_total": "string",
"total": "string",
"currency": "string",
"billing_first_name": null,
"billing_last_name": null,
"billing_email": null,
"billing_phone": null,
"billing_address": null,
"billing_city": null,
"billing_postcode": null,
"billing_country": null,
"billing_nif": null,
"shipping_first_name": null,
"shipping_last_name": null,
"shipping_address": null,
"shipping_city": null,
"shipping_postcode": null,
"shipping_country": null,
"shipping_method": null,
"tracking_number": null,
"tracking_url": null,
"payment_method": null,
"payment_status": null,
"coupon_code": null,
"customer_notes": null,
"admin_notes": null,
"paid_at": null,
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": null,
"updated_at": null,
"items": [
"..."
]
}
Erros possiveis: 422 Validation Error
POST /api/orders/checkout
Checkout
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| billing_first_name | string | Sim | Billing First Name |
| billing_last_name | string | Sim | Billing Last Name |
| billing_email | string | Sim | Billing Email |
| billing_phone | object | Nao | Billing Phone |
| billing_address | string | Sim | Billing Address |
| billing_city | string | Sim | Billing City |
| billing_postcode | string | Sim | Billing Postcode |
| billing_country | string | Nao | Billing Country |
| billing_nif | object | Nao | Billing Nif |
| shipping_first_name | object | Nao | Shipping First Name |
| shipping_last_name | object | Nao | Shipping Last Name |
| shipping_address | object | Nao | Shipping Address |
| shipping_city | object | Nao | Shipping City |
| shipping_postcode | object | Nao | Shipping Postcode |
| shipping_country | string | Nao | Shipping Country |
| shipping_method | object | Nao | Shipping Method |
| payment_method | string | Nao | Payment Method |
| customer_notes | object | Nao | Customer Notes |
| coupon_code | object | Nao | Coupon Code |
Exemplo pedido:
{
"billing_first_name": "string",
"billing_last_name": "string",
"billing_email": "string",
"billing_phone": null,
"billing_address": "string",
"billing_city": "string",
"billing_postcode": "string",
"billing_country": "string",
"billing_nif": null,
"shipping_first_name": null,
"shipping_last_name": null,
"shipping_address": null,
"shipping_city": null,
"shipping_postcode": null,
"shipping_country": "string",
"shipping_method": null,
"payment_method": "string",
"customer_notes": null,
"coupon_code": null
}
Exemplo resposta (201):
{
"id": 0,
"order_number": "string",
"user_id": null,
"status": "string",
"subtotal": "string",
"shipping_total": "string",
"tax_total": "string",
"discount_total": "string",
"total": "string",
"currency": "string",
"billing_first_name": null,
"billing_last_name": null,
"billing_email": null,
"billing_phone": null,
"billing_address": null,
"billing_city": null,
"billing_postcode": null,
"billing_country": null,
"billing_nif": null,
"shipping_first_name": null,
"shipping_last_name": null,
"shipping_address": null,
"shipping_city": null,
"shipping_postcode": null,
"shipping_country": null,
"shipping_method": null,
"tracking_number": null,
"tracking_url": null,
"payment_method": null,
"payment_status": null,
"coupon_code": null,
"customer_notes": null,
"admin_notes": null,
"paid_at": null,
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": null,
"updated_at": null,
"items": [
"..."
]
}
Erros possiveis: 422 Validation Error
PUT /api/orders/{order_id}/status
Update Order Status
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| order_id | integer | Sim | — |
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| status | string | Sim | Status |
| admin_notes | object | Nao | Admin Notes |
Exemplo pedido:
{
"status": "string",
"admin_notes": null
}
Exemplo resposta (200):
{
"id": 0,
"order_number": "string",
"user_id": null,
"status": "string",
"subtotal": "string",
"shipping_total": "string",
"tax_total": "string",
"discount_total": "string",
"total": "string",
"currency": "string",
"billing_first_name": null,
"billing_last_name": null,
"billing_email": null,
"billing_phone": null,
"billing_address": null,
"billing_city": null,
"billing_postcode": null,
"billing_country": null,
"billing_nif": null,
"shipping_first_name": null,
"shipping_last_name": null,
"shipping_address": null,
"shipping_city": null,
"shipping_postcode": null,
"shipping_country": null,
"shipping_method": null,
"tracking_number": null,
"tracking_url": null,
"payment_method": null,
"payment_status": null,
"coupon_code": null,
"customer_notes": null,
"admin_notes": null,
"paid_at": null,
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": null,
"updated_at": null,
"items": [
"..."
]
}
Erros possiveis: 422 Validation Error
POST /api/orders/{order_id}/fulfill
Fulfill Order
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| order_id | integer | Sim | — |
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| tracking_number | string | Sim | Tracking Number |
| carrier | string | Sim | Carrier |
| tracking_url | object | Nao | Tracking Url |
| notify_customer | boolean | Nao | Notify Customer |
| admin_notes | object | Nao | Admin Notes |
Exemplo pedido:
{
"tracking_number": "string",
"carrier": "string",
"tracking_url": null,
"notify_customer": true,
"admin_notes": null
}
Exemplo resposta (200):
{
"id": 0,
"order_number": "string",
"user_id": null,
"status": "string",
"subtotal": "string",
"shipping_total": "string",
"tax_total": "string",
"discount_total": "string",
"total": "string",
"currency": "string",
"billing_first_name": null,
"billing_last_name": null,
"billing_email": null,
"billing_phone": null,
"billing_address": null,
"billing_city": null,
"billing_postcode": null,
"billing_country": null,
"billing_nif": null,
"shipping_first_name": null,
"shipping_last_name": null,
"shipping_address": null,
"shipping_city": null,
"shipping_postcode": null,
"shipping_country": null,
"shipping_method": null,
"tracking_number": null,
"tracking_url": null,
"payment_method": null,
"payment_status": null,
"coupon_code": null,
"customer_notes": null,
"admin_notes": null,
"paid_at": null,
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": null,
"updated_at": null,
"items": [
"..."
]
}
Erros possiveis: 422 Validation Error
POST /api/orders/{order_id}/refund
Refund Order
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| order_id | integer | Sim | — |
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| amount | object | Sim | Amount |
| reason | string | Sim | Reason |
| notify_customer | boolean | Nao | Notify Customer |
Exemplo pedido:
{
"amount": null,
"reason": "string",
"notify_customer": true
}
Exemplo resposta (200):
{
"id": 0,
"order_number": "string",
"user_id": null,
"status": "string",
"subtotal": "string",
"shipping_total": "string",
"tax_total": "string",
"discount_total": "string",
"total": "string",
"currency": "string",
"billing_first_name": null,
"billing_last_name": null,
"billing_email": null,
"billing_phone": null,
"billing_address": null,
"billing_city": null,
"billing_postcode": null,
"billing_country": null,
"billing_nif": null,
"shipping_first_name": null,
"shipping_last_name": null,
"shipping_address": null,
"shipping_city": null,
"shipping_postcode": null,
"shipping_country": null,
"shipping_method": null,
"tracking_number": null,
"tracking_url": null,
"payment_method": null,
"payment_status": null,
"coupon_code": null,
"customer_notes": null,
"admin_notes": null,
"paid_at": null,
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": null,
"updated_at": null,
"items": [
"..."
]
}
Erros possiveis: 422 Validation Error
GET /api/orders/{order_id}/timeline
Order Timeline
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| order_id | integer | Sim | — |
Exemplo resposta (200):
[{
"date": null,
"event": "string",
"description": "string",
"actor": null
}]
Erros possiveis: 422 Validation Error
POST /api/orders/{order_id}/resend-email
Resend Email
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| order_id | integer | Sim | — |
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| email_type | string | Sim | Email Type |
Exemplo pedido:
{
"email_type": "string"
}
Exemplo resposta (200):
{}
Erros possiveis: 422 Validation Error
Documentacao gerada automaticamente.