Skip to main content
POST
Create an order

Autorizaciones

X-API-Key
string
header
requerido

Merchant API key for authentication

Encabezados

Idempotency-Key
string
requerido

Unique key for this sale. A retry carrying the same key returns the order already created instead of a second one, whatever its body, so never reuse a key for another sale.

Required string length: 1 - 120

Cuerpo

application/json

A sale made outside a WhatsApp conversation, recorded against a contact.

sales_channel
enum<string>
requerido

Where the sale was made. store and phone sales may omit address; instagram and other need one.

Opciones disponibles:
store,
phone,
instagram,
other
Ejemplo:

"store"

customer
OrderCreateCustomer · object
requerido

Customer information

currency
enum<string>
requerido

Currency code (ISO 4217)

Opciones disponibles:
MXN,
PEN,
COP,
CLP,
ARS,
BRL,
VES,
BOB,
USD,
PYG,
UYU,
CRC,
EUR,
GTQ
Ejemplo:

"PEN"

total_amount
requerido

Total order amount including delivery fee

Ejemplo:

139.7

pending_amount
requerido

Amount still pending payment

Ejemplo:

0

payment_method
string
requerido

Payment method used

Maximum string length: 100
Ejemplo:

"Efectivo"

items
OrderCreateItem · object[]
requerido

Line items in the order

Minimum array length: 1
contact_id
string | null

Contact the sale belongs to. When omitted, customer.phone_number finds or creates it.

delivery_fee

Delivery fee charged to the customer

payment_terms
enum<string> | null

Payment terms for the order (pending when omitted)

Opciones disponibles:
pending,
partial,
paid,
paid_pending_review,
cash_on_delivery
Ejemplo:

"paid"

address
OrderAddress · object | null

Delivery address

Respuesta

Successful Response

id
integer
requerido

Unique order identifier

order_date
string<date-time>
requerido

Date and time when the order was placed (merchant's local timezone)

payment_method
string
requerido

Payment method used

Ejemplo:

"credit_card"

currency
enum<string>
requerido

Currency code (ISO 4217)

Opciones disponibles:
MXN,
PEN,
COP,
CLP,
ARS,
BRL,
VES,
BOB,
USD,
PYG,
UYU,
CRC,
EUR,
GTQ
Ejemplo:

"PEN"

total_amount
string
requerido

Total order amount including delivery fee

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
Ejemplo:

139.7

customer
OrderCustomer · object
requerido

Customer information

address
OrderAddress · object | null
requerido

Delivery address (null when the goods were handed over in person, as in a store or phone sale)

items
OrderItem · object[]
requerido

Line items in the order. Empty while the order was recorded only from a payment receipt or a merchant's mark; it gains lines later under the same id.

status
enum<string> | null

Current order status

Opciones disponibles:
pending,
confirmed,
preparing,
ready_for_dispatch,
dispatched,
delivered,
completed,
rejected,
cancelled
Ejemplo:

"pending"

payment_terms
enum<string> | null

Payment terms for the order

Opciones disponibles:
pending,
partial,
paid,
paid_pending_review,
cash_on_delivery
Ejemplo:

"paid"

pending_amount
string | null

Amount still pending payment (null if fully paid)

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
Ejemplo:

0

delivery_fee
string | null

Delivery fee charged to the customer

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
Ejemplo:

10

payment_receipt_urls
string[]

URLs of payment receipt images uploaded by the customer (e.g. Yape, Plin vouchers)

summary_conversation
string | null

AI-generated summary of the sales conversation with product details and customer preferences