Saltar al contenido principal

API — Encomendas

Documentacao tecnica gerada automaticamente a partir da especificacao OpenAPI.


GET /api/orders

List Orders

Parametros:

NomeTipoObrigatorioDescricao
pageintegerNao
page_sizeintegerNao
statusstringNao

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:

NomeTipoObrigatorioDescricao
order_numberstringSim
emailstringSimBilling 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:

NomeTipoObrigatorioDescricao
order_idintegerSim

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:

CampoTipoObrigatorioDescricao
billing_first_namestringSimBilling First Name
billing_last_namestringSimBilling Last Name
billing_emailstringSimBilling Email
billing_phoneobjectNaoBilling Phone
billing_addressstringSimBilling Address
billing_citystringSimBilling City
billing_postcodestringSimBilling Postcode
billing_countrystringNaoBilling Country
billing_nifobjectNaoBilling Nif
shipping_first_nameobjectNaoShipping First Name
shipping_last_nameobjectNaoShipping Last Name
shipping_addressobjectNaoShipping Address
shipping_cityobjectNaoShipping City
shipping_postcodeobjectNaoShipping Postcode
shipping_countrystringNaoShipping Country
shipping_methodobjectNaoShipping Method
payment_methodstringNaoPayment Method
customer_notesobjectNaoCustomer Notes
coupon_codeobjectNaoCoupon 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:

NomeTipoObrigatorioDescricao
order_idintegerSim

Corpo do pedido:

CampoTipoObrigatorioDescricao
statusstringSimStatus
admin_notesobjectNaoAdmin 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:

NomeTipoObrigatorioDescricao
order_idintegerSim

Corpo do pedido:

CampoTipoObrigatorioDescricao
tracking_numberstringSimTracking Number
carrierstringSimCarrier
tracking_urlobjectNaoTracking Url
notify_customerbooleanNaoNotify Customer
admin_notesobjectNaoAdmin 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:

NomeTipoObrigatorioDescricao
order_idintegerSim

Corpo do pedido:

CampoTipoObrigatorioDescricao
amountobjectSimAmount
reasonstringSimReason
notify_customerbooleanNaoNotify 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:

NomeTipoObrigatorioDescricao
order_idintegerSim

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:

NomeTipoObrigatorioDescricao
order_idintegerSim

Corpo do pedido:

CampoTipoObrigatorioDescricao
email_typestringSimEmail Type

Exemplo pedido:

{
"email_type": "string"
}

Exemplo resposta (200):

{}

Erros possiveis: 422 Validation Error


Documentacao gerada automaticamente.