Create an order
Creates an order. There is no Idempotency-Key-header-style replay
mechanism — a retried request always executes again server-side, it
never returns a cached copy of the original response. If a create
request times out or the response is otherwise lost, pass an
external_id and check GET /v2/orders?external_id={value} before
retrying: the first successful create claims that external_id, and a
second create attempt with the same value is rejected with a 422
instead of producing a duplicate order. (The id/code field does
not give you this protection via POST — see below.)
Alternatively, PUT /v2/orders/{id} with _upsert: true and an
external_id in the body finds-or-creates by external_id directly
— it creates the order (with a system-generated code, not the URL
:id) if no order with that external_id exists yet, or updates it
in place if one does, so a retried request converges instead of
duplicating. See that operation’s description for details.
/ordersAuthorizationBearer token (JWT) · headerrequiredapplication/jsonshop_idintegerrequiredRequired — ID of the shop this order belongs to
idstringOptional client-supplied order code (returned/queryable as
code). Not a reliable idempotency key: if the code
collides with an existing order, the collision is resolved
silently by generating a new random code instead of
rejecting the request — a retried create with the same id
does not return the original order, it creates a new one
with a different code. Use external_id instead if you need
safe dedup.
external_idstringOptional client-supplied reference, unique per seller. A
colliding value is rejected with a 422 (unlike id), so this
is the field to use for retry-safe order creation: check
GET /v2/orders?external_id={value} before retrying a create
that may have already succeeded.
sourcestringcontactobjectShow propertiesHide properties
idstringExisting contact ID, if known
namestringemailstringphone_numberstringaddressAddressShow propertiesHide properties
streetstringstreet_2stringlocality_namestringregion_namestringcountry_namestringpostal_codestringline_itemsobject[]Show propertiesHide properties
objectvariant_idstringunitsintegerpriceintegerOverrides the product's price, in cents
variant_skustringAlternative to variant_id
tagsstring[]courier_namestringtracking_codestringfulfillment_methodstringshippingmailbox_pickuplocal_pickupnone_policiesobjectFlags controlling order processing behavior
Show propertiesHide properties
allow_no_stockbooleanallow_statusbooleanforce_item_pricesbooleanallow_promotionsbooleanOrder created
Access denied to the given shop
Validation error
_linksHalLinksidintegershop_idintegercodestringOrder code, used as the path identifier (e.g. /v2/orders/{code})
external_idstring | nullOptional client-supplied reference, unique per seller. Set it at
create time (or via update) to look the order back up later with
GET /v2/orders?external_id={value} — unlike id/code, a
colliding external_id is rejected with a 422 instead of being
silently reassigned, so it's safe to use for dedup checks before
retrying a create.
statusstringdraftcheckoutin_reviewpendingcancelledclosedcompletedfulfillment_statusstringnonequeuedpreparingreadyshippeddeliveredreturnedcheckout_urlstringPresent only when the order is in checkout or pending status
archivedbooleancurrency_codestringprices_include_taxbooleanitems_net_totalintegerLine items subtotal in cents, before discounts
items_discount_totalintegeritems_totalintegerLine items subtotal in cents, after discounts
net_totalintegerOrder total in cents before tax
discount_totalintegercart_totalintegersurcharge_totalintegershipping_totalintegershipping_discountintegershipping_minus_discountintegertax_ratenumberPresent only when prices_include_tax is false
tax_totalintegerPresent only when prices_include_tax is false
totalintegerGrand total in cents, including shipping, discounts and tax
total_paidintegertotal_refundedintegermax_refundable_amountintegerpartial_payment_offeredbooleanWhether this order is eligible for buyer-chosen partial payment: either the shop has it enabled for everyone, or this specific order was offered it via the API (partial_payment_offered: true on create/update). Either way, the order must not require review and any configured cart requirements must be met. Normally also requires a token-based payment method to exist, so the balance can be auto-charged later - unless the shop allows manual (non-token) payment methods for this, in which case the balance is instead collected via a reminder email. Only present when fetching a single order, not in list results.
paying_partiallybooleanWhether the buyer opted into a partial payment for this order.
partial_payment_percentageintegerPercentage of the total charged upfront. Only present when paying_partially is true.
partial_payment_amountnumberAmount charged upfront, in cents. Only present when fetching a single order, and only when partial payment is offered or active.
partial_payment_due_onstring<date>Date the remaining balance is due. Only present when paying_partially is true.
shipping_descriptionstringtracking_codestringcourier_namestringpayment_infoobjectPresent only when the order has an associated payment method.
Show propertiesHide properties
idintegernamestringtypestringPayment method type/gateway identifier (e.g. webpay_rest, mercado_pago).
dataobjectGateway-specific transaction data, shape varies by type.
requested_document_typestringTax document type requested by the buyer at checkout (e.g. invoice, receipt), if any. Derived from custom order data, not a plain column.
tagsstring[]tag_idsinteger[]allowed_statusesstring[]allowed_fulfillment_statusesstring[]created_onstring<date-time>updated_onstring<date-time>checkout_onstring<date-time> | nullpending_onstring<date-time> | nullclosed_onstring<date-time> | nullshipped_onstring<date-time> | null_embeddedobjectcontact is present when the order has a customer attached. company is present when a company/tax entity is attached (e.g. via company_name on create/update). address/billing_address are present when set. line_items is always present. payments/refunds/documents are present only when non-empty.
Show propertiesHide properties
contactobjectShow propertiesHide properties
idintegernamestringemailstringphone_numberstringcompanyobjectShow propertiesHide properties
idintegernamestringid_numberstringFormatted tax/ID number (RUT, DNI, etc.)
activity_codestringaddressAddressShow propertiesHide properties
streetstringstreet_2stringlocality_namestringregion_namestringcountry_namestringpostal_codestringaddressAddressShow propertiesHide properties
streetstringstreet_2stringlocality_namestringregion_namestringcountry_namestringpostal_codestringbilling_addressAddressShow propertiesHide properties
streetstringstreet_2stringlocality_namestringregion_namestringcountry_namestringpostal_codestringline_itemsobject[]Show propertiesHide properties
objectidintegerproduct_idintegerproduct_namestringvariant_idintegervariant_namestringvariant_skustringunitsintegerunit_priceintegerUnit price in cents
net_totalintegerLine total in cents before discounts
totalintegerLine total in cents after discounts/surcharges
paymentsOrderTransaction[]Show propertiesHide properties
OrderTransactionidintegerorder_idintegeramountintegerAmount in cents (negative for refunds)
absolute_amountintegerAbsolute value of amount in cents
successfulbooleancard_token_idintegerpayment_method_typestringtransaction_idstringGateway transaction ID
authorization_codestringdescriptionstringcreated_atstring<date-time>refundsOrderTransaction[]Show propertiesHide properties
OrderTransactionidintegerorder_idintegeramountintegerAmount in cents (negative for refunds)
absolute_amountintegerAbsolute value of amount in cents
successfulbooleancard_token_idintegerpayment_method_typestringtransaction_idstringGateway transaction ID
authorization_codestringdescriptionstringcreated_atstring<date-time>documentsOrderDocument[]Show propertiesHide properties
OrderDocumentidinteger | nullnull for legacy documents stored in the order's contact_data (_document_pdf_url/_document_type/_document_number) instead of as a real document record. These have no self/delete links and can't be fetched or deleted via /orders/{order_id}/documents/{id}.
document_typestringinvoicereceiptdocument_numberstringfile_urlstring