Creates a sales order for a store whose warehouse is in Mexico, Colombia, Chile or the
United States, and queues it for processing. Use it for every non-Brazil store; a store
served from a Brazil warehouse is refused and must use POST /brazil/orders. The request
needs a store, a unique order_number per store, a recipient address, at least one product
line and a way to pick the carrier:
shipping_line_code: the exact name of a shipping method you created in the Cubbo app
(Integrations > Open API > Shipping Methods). Cubbo picks the carrier with the
configuration assigned to it.
shipping_method_id: a specific Cubbo shipping method, taken from the shipping_method_id of
an option returned by GET /shipping-methods/quote.
The order is returned immediately in its initial status. Address, coverage, stock and
carrier validations run asynchronously; poll GET /orders and read status,
has_missing_info and missing_info to learn whether it was accepted.
Every product is identified by SKU. Without channel_name, an unknown SKU rejects the whole
request with 422. With channel_name (an order relayed from a sales channel), the order is
created anyway: a line whose SKU is unknown keeps that SKU without a product, and the
response lists those SKUs in warnings with the code UNIDENTIFIED_PRODUCT. Processing
then leaves the order with missing information (statuserror; with
include_event_history=true, GET /orders shows the code UNIDENTIFIED_PRODUCT in the
error event) until the product exists. Creating the product or adding the SKU to an
existing product in the Cubbo app processes the order again and the line takes the
product; creating it with POST /products without variants does not trigger that reprocess
today.
A line sent without price_per_item takes the product’s price. On a line whose SKU is
unknown there is no product price yet, so the line counts as zero in the order total, and so
does its discount; once the product exists, the line takes the product’s price and the
order total is recomputed (a kit without its own price is worth its components). A product
price smaller than the line’s discount is not taken. Discounts larger than what the
products are worth are rejected with 422 INVALID_PRODUCT_DISCOUNT.
A unit_code sent on a line whose SKU is unknown is kept. The line must still have
quantity 1, and one SKU cannot name the same code twice: otherwise the request is
rejected with 422, as for a known SKU. The rest is checked once the product exists: if the
line can never be fulfilled (a kit, or a product that does not track unit codes and has no
unit carrying that code), the order waits with missing information, code
INVALID_UNIT_CODE_LINE; two lines whose SKUs turn out to be the same product and name the
same code give DUPLICATE_UNIT_CODE on the later line. Correct the line by editing the
order in the Cubbo app; PUT /orders/{id} does not replace the products of an order with a
pinned line.
zip_code is mandatory when the warehouse is in Mexico (and Brazil); it is optional for
Chile and Colombia.
Chile: when shipping.city cannot be identified (a misspelling, or a province instead of a
city), an order sent with shipping_method_id is not refused. It is created and moves to
error until you correct shipping.city with PUT /orders/{id} or in
the Cubbo app, where the order shows the reason. An order that ships on your own label (Blue
Express EX, with the label attached) continues normally. A shipping.city that is identified
but not covered by the method is still refused with 422.
Colombia: carriers deliver by the DANE (DIVIPOLA) code of the destination city. Cubbo finds it
from shipping.city and shipping.province, or you send it in shipping.city_code: when
present, the code decides the destination and the city and province are not looked up. A
5-digit code (a municipality) stands for its main town; an 8-digit code is a populated center;
a code missing its leading zero (4 or 7 digits) is completed. An order whose
shipping.city_code Cubbo does not know is not refused: the response lists it in warnings
with the code UNRECOGNIZED_CITY_CODE, and the order moves to error with that code (the
code you sent is in additional_info.city_code) until you correct it with PUT /orders/{id}. Without city_code, an order sent with
shipping_method_id whose city and province cannot be identified is still refused with 422.
Duplicate protection: an order_number that already exists in the store answers 422 with
code ORDER_ALREADY_EXISTS and the existing order_id in context. While another request
for the same store_id + order_number is still being processed you get 409
DUPLICATE_REQUEST_IN_FLIGHT with a Retry-After header; retry after that delay and you
will converge on the real outcome (200, 422 or ORDER_ALREADY_EXISTS).
Complementary carrier services (has_carrier_insurance, cod_amount,
requires_document_return, requires_pickup_on_delivery) are currently honoured only for
stores with a warehouse in Chile; sending true (or a non-zero amount) from any other
country is refused with a typed error code rather than silently ignored.
Click and collect: send is_click_and_collect: true and the click_and_collect_service_code
you obtained from GET /carrier-services/pickup-locations. Cubbo replaces the shipping
method you sent with the pickup carrier’s method. A full shipping address is still required.
is_b2b only matters for stores enabled for both B2B and D2C (“mixed”); omit it to create a
consumer (D2C) order. Stores enabled for a single model always get that model.
Error bodies on this endpoint carry an error message plus a machine-readable code
(empty string or null when the error has no code) and an optional context object.
Token returned by POST /auth/token, sent as Authorization: Bearer <token>.
Body
application/json
store_id
integer
required
Id of the store the order belongs to. Your API credentials must have access to it.
Example:
1234
order_number
string
required
Your identifier for the order. Must be unique within the store.
Example:
"ORD-0001"
shipping
object
required
Recipient and delivery address.
Show child attributes
products
object[]
required
Lines of the order. The same SKU may appear more than once.
Minimum array length: 1
Show child attributes
shipping_method_id
integer
Id of a Cubbo shipping method. Get it from GET /shipping-methods/quote: each option in the response has a shipping_method_id. Required unless shipping_line_code is sent. Coverage for the destination is checked synchronously: by zip code in Mexico, by shipping.city in Chile. In Chile a shipping.city that cannot be identified does not refuse the order; it is created in error until it is corrected.
Example:
12
shipping_line_code
string
Exact name of a shipping method you created in the Cubbo app, under Integrations, your Open API integration, Shipping Methods (field Integration Delivery Method). It must match character by character: the comparison is case-sensitive and does not trim spaces. Cubbo uses the shipping configuration assigned to that method to pick the carrier. See Set up your integration. Required unless shipping_method_id is sent; ignored when shipping_method_id is present. If no active method has that name, Cubbo falls back to the integration's default shipping method when one exists. If the method exists but no carrier can be resolved (no coverage, unknown weight or tariff), the order is still created and lands in an error status for Cubbo to resolve.
Example:
"Express"
is_paid
boolean
default:true
Whether the order is already paid. Defaults to true when omitted.
Example:
true
is_click_and_collect
boolean
default:false
Set to true to deliver to a carrier pickup point. Requires click_and_collect_service_code.
Example:
false
click_and_collect_service_code
string | null
Pickup point code returned by GET /carrier-services/pickup-locations, in the form CUBBOCNC + carrier code (EST, CUBBO, DHL, PUNTOPOST, 99) + location id. Ignored (cleared) unless is_click_and_collect is true.
Example:
"CUBBOCNCEST001"
channel_name
string
Name of the sales channel the order came from, echoed back as channel_name on the order. Sending it also lets the order be created when a SKU is missing from the catalog (see the endpoint description).
Example:
"my-webstore"
channel_order_id
string
Identifier of the order in your sales channel, echoed back as channel_order_id.
Example:
"WEB-98765"
is_b2b
boolean
Business-model classification. Only read for stores enabled for both B2B and D2C: omit it (or send false) for a consumer order, send true for a B2B order. Stores enabled for a single model always get that model regardless of this value.
Example:
false
has_carrier_insurance
boolean
default:false
Ask the carrier to insure the shipment. Available only for stores with a warehouse in Chile; true elsewhere is refused with CARRIER_INSURANCE_NOT_AVAILABLE.
Example:
false
is_cod
boolean
default:false
Cash on delivery; the courier collects payment at the door.
Example:
false
cod_amount
number
Amount the courier must collect when it differs from the order total (partial collection). Omit, or send 0, to collect the order total. A non-zero amount is available only for stores with a warehouse in Chile; elsewhere it is refused with COD_AMOUNT_NOT_AVAILABLE.
Required range: x >= 0
Example:
30000
requires_document_return
boolean
default:false
Ask the carrier to bring back a signed document with the delivery. Available only for stores with a warehouse in Chile; cannot be combined with requires_pickup_on_delivery.
Example:
false
requires_pickup_on_delivery
boolean
default:false
Include a prepaid return label inside the outbound package. Available only for consumer (D2C) orders of stores with a warehouse in Chile, and cannot be combined with requires_document_return.
Example:
false
billing
object
Optional billing contact and address.
Show child attributes
shipping_documents
object[]
Optional PDF documents to print and include with the shipment (for example a label or invoice you issued). Each document is fetched from a URL or decoded from base64 at creation time.
Show child attributes
Response
Order created. The body is the full order as Cubbo stores it, including its lines and the resolved shipping method. The order is still in its initial status; processing happens asynchronously. When the order was created with SKUs that are not in the store's catalog (only possible with channel_name), or with a Colombian shipping.city_code Cubbo does not know, the body also carries warnings.
The order as POST /orders returns it.
id
integer
Cubbo ID of the order. Use it in path parameters.
Example:
987654
store_id
integer
Store ID.
Example:
1234
order_number
string
Your order number, unique within the store.
Example:
"ORD-0001"
status
enum<string>
Fulfillment status of an order. processing, picking and packing all mean the order is being
prepared in the warehouse. holded means the order is on hold. packed is unused.
Available options:
initial,
unpaid,
empty,
pending,
error,
cancelation_window,
entirely_dropshipping,
backorder,
processing,
picking,
packing,
packed,
shipped,
canceled,
holded,
interrupted,
returned,
return_arrived,
returning,
reentered,
awaiting_fulfillment_request,
awaiting_dropoff,
arrived_at_warehouse
Example:
"shipped"
channel_created_at
string<date-time>
When the order was created in the sales channel.
Example:
"2026-01-10T14:02:11.000Z"
order_date
string<date-time> | null
Order date.
Example:
"2026-01-10T14:02:11.000Z"
shipping_date
string<date-time> | null
When the order was shipped.
Example:
"2026-01-11T18:30:00.000Z"
pending_at
string<date-time> | null
When the order became ready to be fulfilled.
Example:
"2026-01-10T14:05:00.000Z"
shipping_email
string | null
Buyer email.
Example:
"buyer@example.com"
shipping_address_1
string | null
Shipping street address line 1 (also inside shipping).
Example:
"Av. Ejemplo 123"
shipping_status
enum<string> | null
Carrier-side status of the shipment.
Available options:
shipment_created,
awaiting_collection,
shipment_collected,
shipment_in_transit,
shipment_out_for_delivery,
shipment_delivered,
shipment_partially_delivered,
shipment_with_incident,
shipment_to_be_self_collected,
shipment_canceled,
shipment_returned,
shipment_not_defined
Example:
"shipment_in_transit"
is_paid
boolean
Whether the order is paid. Unpaid orders are not fulfilled.
Example:
true
is_cod
boolean
Whether the order is cash on delivery.
Example:
false
cod_amount
string | null
Amount to collect on delivery, as a decimal string.
Example:
null
requires_document_return
boolean
Whether the carrier must bring back a signed document.
Example:
false
requires_pickup_on_delivery
boolean
Whether the carrier must pick something up when delivering.
Example:
false
has_carrier_insurance
boolean
Whether the shipment is insured with the carrier.
Example:
false
has_missing_info
boolean
Whether the order is blocked because data is missing.
Example:
false
missing_info
string | null
Description of the missing data, if any.
Example:
null
currency
string | null
Currency code of the prices.
Example:
"MXN"
total_price
string | null
Order total as a decimal string.
Example:
"899.00"
discount_price
string | null
Total discount as a decimal string.
Example:
"0.00"
buyer_shipping_price
string | null
Shipping price paid by the buyer, as a decimal string.
Example:
"0.00"
extra_fees_price
string | null
Extra fees as a decimal string.
Example:
"0.0"
is_pick_and_ship
boolean
Whether the order is a pick-and-ship order (you pick it up at the warehouse).
Example:
false
pick_n_ship_status
enum<string> | null
Pick-and-ship status.
Available options:
awaiting_pick_up,
picked_up,
in_warehouse,
null
Example:
null
is_b2b
boolean
Whether the order is a B2B order. In GET /orders only present for stores that handle both B2B and D2C.
Example:
false
is_first_time_buyer
boolean
Whether this is the buyer's first order in the store.
Example:
true
is_subscription_renewal
boolean
Whether the order is a subscription renewal.
Example:
false
is_click_and_collect
boolean
Whether the buyer picks the order up at a pickup point.
Example:
false
click_and_collect_metadata
object | null
Pickup-point details for click-and-collect orders; null otherwise.
Show child attributes
is_multi_package
boolean
Whether the shipment has more than one package.
Example:
false
shipping
object
Shipping contact and address of an order.
Show child attributes
billing
object
Billing contact, fiscal data and address of an order. Fiscal fields are returned in clear text to the store that owns the order.
Show child attributes
delivery_tracking
object[]
Tracking per package. Return labels are excluded.
Show child attributes
return_shipping_labels
object[] | null
Valid return labels of the order.
Show child attributes
proof_of_delivery
object | null
Proof of delivery, when the carrier provided one for a shipped or returned order.
Show child attributes
estimated_time_arrival
string<date-time> | null
Estimated delivery date.
Example:
"2026-01-13T00:00:00.000Z"
latest_estimated_time_arrival_range
object | null
Latest estimated delivery window, or null when no estimate exists.
Show child attributes
delivered_at
string<date-time> | null
When the carrier delivered the order.
Example:
null
updated_at
string<date-time>
Last update of the order.
Example:
"2026-01-11T18:31:00.000Z"
channel_order_id
string | null
ID of the order in the sales channel.
Example:
"5566778899"
channel_name
string | null
Name of the sales channel the order came from.
Example:
"shopify"
channel_shipping_line_code
string | null
Code of the shipping option chosen at checkout in the sales channel (first shipping line).
Example:
"standard"
warehouse_timezone
string | null
IANA time zone of the warehouse fulfilling the order.
Example:
"America/Mexico_City"
shipping_method
object | null
Shipping method assigned to the order.
Show child attributes
order_lines
object[]
Lines of the order.
Show child attributes
invoices
object[]
NF-e documents attached to the order (Brazil).
Show child attributes
store
object | null
Store the order belongs to.
Show child attributes
channel_integration
object | null
Sales-channel integration the order came from.
Show child attributes
return
object | null
The return opened for this order, if any. Use GET /returns/{return_id} for the full return.
Show child attributes
created_by_return
object | null
The return that created this order (for exchanges), if any.
Show child attributes
order_histories
object[]
Order timeline. Only returned by GET /orders with include_event_history=true.
Show child attributes
warnings
object[]
Present only when the order was created with something it still needs from you. UNIDENTIFIED_PRODUCT lists, in context.skus, the SKUs not found in the store's catalog; the order waits with missing information until those products exist. UNRECOGNIZED_CITY_CODE gives, in context.city_code, the Colombian shipping.city_code Cubbo does not know; the order waits in error until you correct it with PUT /orders/{id}.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Cubbo Developers","description":"Developer documentation for the Cubbo Clients API: orders, inventory, replenishments, returns, shipping and webhooks.","colors":{"primary":"#327cfb","light":"#60a5fa","dark":"#327cfb"},"logo":{"light":"https://mintcdn.com/cubbo/RGfmvgvbM1HVXepF/logo/light.svg?fit=max\u0026auto=format\u0026n=RGfmvgvbM1HVXepF\u0026q=85\u0026s=208df5125f7962b06468c3c835605bd0","dark":"https://mintcdn.com/cubbo/RGfmvgvbM1HVXepF/logo/dark.svg?fit=max\u0026auto=format\u0026n=RGfmvgvbM1HVXepF\u0026q=85\u0026s=11cf015d96268e02f70a44f6d9f5918a"},"favicon":"https://mintcdn.com/cubbo/RGfmvgvbM1HVXepF/favicon.svg?fit=max\u0026auto=format\u0026n=RGfmvgvbM1HVXepF\u0026q=85\u0026s=3e2e823c87894cb7d9090336380478b6","appearance":{"default":"light"},"background":{"color":{"light":"#f3f4f6","dark":"#0b1229"}},"navbar":{"links":[{"href":"https://cubbo.com","label":"Cubbo"}],"primary":{"type":"button","label":"Get credentials","href":"https://app.cubbo.com/stores"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/cubbo"}},"styling":{"codeblocks":"dark","latex":false},"contextual":{"options":["copy","view","chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"navigation":{"languages":[{"language":"en","default":true,"href":""},{"language":"es","navbar":{"links":[{"href":"https://cubbo.com","label":"Cubbo"}],"primary":{"type":"button","label":"Obtener credenciales","href":"https://app.cubbo.com/stores"}},"href":"es"},{"language":"pt-BR","navbar":{"links":[{"href":"https://cubbo.com","label":"Cubbo"}],"primary":{"type":"button","label":"Obter credenciais","href":"https://app.cubbo.com/stores"}},"href":"pt-BR"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cubbo","hasAudioNarration":false,"actualSubdomain":"cubbo","customDomains":["developers.cubbo.com"],"gitSource":{"type":"github","owner":"cubboengineering","repo":"developer-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6af32fc22491df72044f2dc3","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"API reference","count":54},{"language":"default","tag":"Orders","count":14},{"language":"es","tag":"Guías","count":8},{"language":"en","tag":"Guides","count":8},{"language":"pt-BR","tag":"Guias","count":8},{"language":"default","tag":"Webhooks","count":7},{"language":"default","tag":"Replenishments","count":6},{"language":"default","tag":"Returns","count":6},{"language":"es","tag":"Primeros pasos","count":4},{"language":"en","tag":"Getting started","count":4},{"language":"pt-BR","tag":"Primeiros passos","count":4},{"language":"default","tag":"Lots","count":4},{"language":"default","tag":"Stores","count":4},{"language":"es","tag":"Uso de la API","count":3},{"language":"en","tag":"Working with the API","count":3},{"language":"pt-BR","tag":"Uso da API","count":3},{"language":"default","tag":"Click and collect","count":3},{"language":"default","tag":"Inventory","count":3},{"language":"default","tag":"Shipping methods","count":3},{"language":"es","tag":"Eventos","count":1},{"language":"en","tag":"Events","count":1},{"language":"pt-BR","tag":"Eventos","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--cubbo-navy: #0f2955;--cubbo-navy-hover: #3562b7;--cubbo-on-navy: #ffffff;--cubbo-on-navy-2: #bae6fd;--cubbo-radius: 8px;--cubbo-radius-sm: 6px}:root.dark{--cubbo-navy: #0c2148;--cubbo-navy-hover: #2c5299}body,#navbar,#sidebar,#content-area{font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen, Ubuntu, Cantarell,\n \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif}#navbar>div:first-child,#navbar{background-color:var(--cubbo-navy)!important;border-bottom-color:transparent!important}#navbar a,#navbar button,#navbar span,#navbar svg{color:var(--cubbo-on-navy)}#navbar a:hover{color:var(--cubbo-on-navy-2)}#navbar #search-bar-entry,#navbar button[id*=\"search\"]{background-color:rgba(255, 255, 255, 0.12)!important;border-color:rgba(255, 255, 255, 0.2)!important;color:var(--cubbo-on-navy-2)!important}.card,[class*=\"rounded-xl\"],[class*=\"rounded-2xl\"]{border-radius:var(--cubbo-radius)!important}pre,.code-block,[class*=\"code-group\"]{border-radius:var(--cubbo-radius-sm)!important}html:not(.dark) :not(pre)>code{background-color:#e8f0fe!important;color:#1e3a8a!important;border:1px solid #c7dafc!important;border-radius:4px!important;padding:0.1em 0.4em!important}html:not(.dark) a>code,html:not(.dark) a :not(pre)>code{color:#327cfb!important}"}],"page":{"pagePath":"api-reference/orders/create-an-order","slug":"/api-reference/orders/create-an-order","pageMetadata":{"title":"Create an order","description":"Creates a sales order for a store whose warehouse is in Mexico, Colombia, Chile or the\nUnited States, and queues it for processing. Use it for every non-Brazil store; a store\nserved from a Brazil warehouse is refused and must use `POST /brazil/orders`. The request\nneeds a store, a unique `order_number` per store, a recipient address, at least one product\nline and a way to pick the carrier:\n\n- `shipping_line_code`: the exact name of a shipping method you created in the Cubbo app\n (**Integrations** > Open API > **Shipping Methods**). Cubbo picks the carrier with the\n configuration assigned to it.\n- `shipping_method_id`: a specific Cubbo shipping method, taken from the `shipping_method_id` of\n an option returned by `GET /shipping-methods/quote`.\n\n- The order is returned immediately in its initial status. Address, coverage, stock and\n carrier validations run asynchronously; poll `GET /orders` and read `status`,\n `has_missing_info` and `missing_info` to learn whether it was accepted.\n- Every product is identified by SKU. Without `channel_name`, an unknown SKU rejects the whole\n request with 422. With `channel_name` (an order relayed from a sales channel), the order is\n created anyway: a line whose SKU is unknown keeps that SKU without a product, and the\n response lists those SKUs in `warnings` with the code `UNIDENTIFIED_PRODUCT`. Processing\n then leaves the order with missing information (`status` `error`; with\n `include_event_history=true`, `GET /orders` shows the code `UNIDENTIFIED_PRODUCT` in the\n error event) until the product exists. Creating the product or adding the SKU to an\n existing product in the Cubbo app processes the order again and the line takes the\n product; creating it with `POST /products` without variants does not trigger that reprocess\n today.\n- A line sent without `price_per_item` takes the product's price. On a line whose SKU is\n unknown there is no product price yet, so the line counts as zero in the order total, and so\n does its discount; once the product exists, the line takes the product's price and the\n order total is recomputed (a kit without its own price is worth its components). A product\n price smaller than the line's discount is not taken. Discounts larger than what the\n products are worth are rejected with 422 `INVALID_PRODUCT_DISCOUNT`.\n- A `unit_code` sent on a line whose SKU is unknown is kept. The line must still have\n `quantity` 1, and one SKU cannot name the same code twice: otherwise the request is\n rejected with 422, as for a known SKU. The rest is checked once the product exists: if the\n line can never be fulfilled (a kit, or a product that does not track unit codes and has no\n unit carrying that code), the order waits with missing information, code\n `INVALID_UNIT_CODE_LINE`; two lines whose SKUs turn out to be the same product and name the\n same code give `DUPLICATE_UNIT_CODE` on the later line. Correct the line by editing the\n order in the Cubbo app; `PUT /orders/{id}` does not replace the products of an order with a\n pinned line.\n- `zip_code` is mandatory when the warehouse is in Mexico (and Brazil); it is optional for\n Chile and Colombia.\n- Chile: when `shipping.city` cannot be identified (a misspelling, or a province instead of a\n city), an order sent with `shipping_method_id` is not refused. It is created and moves to\n `error` until you correct `shipping.city` with `PUT /orders/{id}` or in\n the Cubbo app, where the order shows the reason. An order that ships on your own label (Blue\n Express EX, with the label attached) continues normally. A `shipping.city` that is identified\n but not covered by the method is still refused with 422.\n- Colombia: carriers deliver by the DANE (DIVIPOLA) code of the destination city. Cubbo finds it\n from `shipping.city` and `shipping.province`, or you send it in `shipping.city_code`: when\n present, the code decides the destination and the city and province are not looked up. A\n 5-digit code (a municipality) stands for its main town; an 8-digit code is a populated center;\n a code missing its leading zero (4 or 7 digits) is completed. An order whose\n `shipping.city_code` Cubbo does not know is not refused: the response lists it in `warnings`\n with the code `UNRECOGNIZED_CITY_CODE`, and the order moves to `error` with that code (the\n code you sent is in `additional_info.city_code`) until you correct it with `PUT /orders/{id}`. Without `city_code`, an order sent with\n `shipping_method_id` whose city and province cannot be identified is still refused with 422.\n- Duplicate protection: an `order_number` that already exists in the store answers 422 with\n code `ORDER_ALREADY_EXISTS` and the existing `order_id` in `context`. While another request\n for the same `store_id` + `order_number` is still being processed you get 409\n `DUPLICATE_REQUEST_IN_FLIGHT` with a `Retry-After` header; retry after that delay and you\n will converge on the real outcome (200, 422 or `ORDER_ALREADY_EXISTS`).\n- Complementary carrier services (`has_carrier_insurance`, `cod_amount`,\n `requires_document_return`, `requires_pickup_on_delivery`) are currently honoured only for\n stores with a warehouse in Chile; sending `true` (or a non-zero amount) from any other\n country is refused with a typed error code rather than silently ignored.\n- Click and collect: send `is_click_and_collect: true` and the `click_and_collect_service_code`\n you obtained from `GET /carrier-services/pickup-locations`. Cubbo replaces the shipping\n method you sent with the pickup carrier's method. A full shipping address is still required.\n- `is_b2b` only matters for stores enabled for both B2B and D2C (\"mixed\"); omit it to create a\n consumer (D2C) order. Stores enabled for a single model always get that model.\n- Error bodies on this endpoint carry an `error` message plus a machine-readable `code`\n (empty string or null when the error has no code) and an optional `context` object.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders","href":"/api-reference/orders/create-an-order","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n li: \"li\",\n p: \"p\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Creates a sales order for a store whose warehouse is in Mexico, Colombia, Chile or the\\nUnited States, and queues it for processing. Use it for every non-Brazil store; a store\\nserved from a Brazil warehouse is refused and must use \", _jsx(_components.code, {\n children: \"POST /brazil/orders\"\n }), \". The request\\nneeds a store, a unique \", _jsx(_components.code, {\n children: \"order_number\"\n }), \" per store, a recipient address, at least one product\\nline and a way to pick the carrier:\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"shipping_line_code\"\n }), \": the exact name of a shipping method you created in the Cubbo app\\n(\", _jsx(_components.strong, {\n children: \"Integrations\"\n }), \" > Open API > \", _jsx(_components.strong, {\n children: \"Shipping Methods\"\n }), \"). Cubbo picks the carrier with the\\nconfiguration assigned to it.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"shipping_method_id\"\n }), \": a specific Cubbo shipping method, taken from the \", _jsx(_components.code, {\n children: \"shipping_method_id\"\n }), \" of\\nan option returned by \", _jsx(_components.code, {\n children: \"GET /shipping-methods/quote\"\n }), \".\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"The order is returned immediately in its initial status. Address, coverage, stock and\\ncarrier validations run asynchronously; poll \", _jsx(_components.code, {\n children: \"GET /orders\"\n }), \" and read \", _jsx(_components.code, {\n children: \"status\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"has_missing_info\"\n }), \" and \", _jsx(_components.code, {\n children: \"missing_info\"\n }), \" to learn whether it was accepted.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Every product is identified by SKU. Without \", _jsx(_components.code, {\n children: \"channel_name\"\n }), \", an unknown SKU rejects the whole\\nrequest with 422. With \", _jsx(_components.code, {\n children: \"channel_name\"\n }), \" (an order relayed from a sales channel), the order is\\ncreated anyway: a line whose SKU is unknown keeps that SKU without a product, and the\\nresponse lists those SKUs in \", _jsx(_components.code, {\n children: \"warnings\"\n }), \" with the code \", _jsx(_components.code, {\n children: \"UNIDENTIFIED_PRODUCT\"\n }), \". Processing\\nthen leaves the order with missing information (\", _jsx(_components.code, {\n children: \"status\"\n }), \" \", _jsx(_components.code, {\n children: \"error\"\n }), \"; with\\n\", _jsx(_components.code, {\n children: \"include_event_history=true\"\n }), \", \", _jsx(_components.code, {\n children: \"GET /orders\"\n }), \" shows the code \", _jsx(_components.code, {\n children: \"UNIDENTIFIED_PRODUCT\"\n }), \" in the\\nerror event) until the product exists. Creating the product or adding the SKU to an\\nexisting product in the Cubbo app processes the order again and the line takes the\\nproduct; creating it with \", _jsx(_components.code, {\n children: \"POST /products\"\n }), \" without variants does not trigger that reprocess\\ntoday.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"A line sent without \", _jsx(_components.code, {\n children: \"price_per_item\"\n }), \" takes the product’s price. On a line whose SKU is\\nunknown there is no product price yet, so the line counts as zero in the order total, and so\\ndoes its discount; once the product exists, the line takes the product’s price and the\\norder total is recomputed (a kit without its own price is worth its components). A product\\nprice smaller than the line’s discount is not taken. Discounts larger than what the\\nproducts are worth are rejected with 422 \", _jsx(_components.code, {\n children: \"INVALID_PRODUCT_DISCOUNT\"\n }), \".\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"A \", _jsx(_components.code, {\n children: \"unit_code\"\n }), \" sent on a line whose SKU is unknown is kept. The line must still have\\n\", _jsx(_components.code, {\n children: \"quantity\"\n }), \" 1, and one SKU cannot name the same code twice: otherwise the request is\\nrejected with 422, as for a known SKU. The rest is checked once the product exists: if the\\nline can never be fulfilled (a kit, or a product that does not track unit codes and has no\\nunit carrying that code), the order waits with missing information, code\\n\", _jsx(_components.code, {\n children: \"INVALID_UNIT_CODE_LINE\"\n }), \"; two lines whose SKUs turn out to be the same product and name the\\nsame code give \", _jsx(_components.code, {\n children: \"DUPLICATE_UNIT_CODE\"\n }), \" on the later line. Correct the line by editing the\\norder in the Cubbo app; \", _jsx(_components.code, {\n children: \"PUT /orders/{id}\"\n }), \" does not replace the products of an order with a\\npinned line.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"zip_code\"\n }), \" is mandatory when the warehouse is in Mexico (and Brazil); it is optional for\\nChile and Colombia.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Chile: when \", _jsx(_components.code, {\n children: \"shipping.city\"\n }), \" cannot be identified (a misspelling, or a province instead of a\\ncity), an order sent with \", _jsx(_components.code, {\n children: \"shipping_method_id\"\n }), \" is not refused. It is created and moves to\\n\", _jsx(_components.code, {\n children: \"error\"\n }), \" until you correct \", _jsx(_components.code, {\n children: \"shipping.city\"\n }), \" with \", _jsx(_components.code, {\n children: \"PUT /orders/{id}\"\n }), \" or in\\nthe Cubbo app, where the order shows the reason. An order that ships on your own label (Blue\\nExpress EX, with the label attached) continues normally. A \", _jsx(_components.code, {\n children: \"shipping.city\"\n }), \" that is identified\\nbut not covered by the method is still refused with 422.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Colombia: carriers deliver by the DANE (DIVIPOLA) code of the destination city. Cubbo finds it\\nfrom \", _jsx(_components.code, {\n children: \"shipping.city\"\n }), \" and \", _jsx(_components.code, {\n children: \"shipping.province\"\n }), \", or you send it in \", _jsx(_components.code, {\n children: \"shipping.city_code\"\n }), \": when\\npresent, the code decides the destination and the city and province are not looked up. A\\n5-digit code (a municipality) stands for its main town; an 8-digit code is a populated center;\\na code missing its leading zero (4 or 7 digits) is completed. An order whose\\n\", _jsx(_components.code, {\n children: \"shipping.city_code\"\n }), \" Cubbo does not know is not refused: the response lists it in \", _jsx(_components.code, {\n children: \"warnings\"\n }), \"\\nwith the code \", _jsx(_components.code, {\n children: \"UNRECOGNIZED_CITY_CODE\"\n }), \", and the order moves to \", _jsx(_components.code, {\n children: \"error\"\n }), \" with that code (the\\ncode you sent is in \", _jsx(_components.code, {\n children: \"additional_info.city_code\"\n }), \") until you correct it with \", _jsx(_components.code, {\n children: \"PUT /orders/{id}\"\n }), \". Without \", _jsx(_components.code, {\n children: \"city_code\"\n }), \", an order sent with\\n\", _jsx(_components.code, {\n children: \"shipping_method_id\"\n }), \" whose city and province cannot be identified is still refused with 422.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Duplicate protection: an \", _jsx(_components.code, {\n children: \"order_number\"\n }), \" that already exists in the store answers 422 with\\ncode \", _jsx(_components.code, {\n children: \"ORDER_ALREADY_EXISTS\"\n }), \" and the existing \", _jsx(_components.code, {\n children: \"order_id\"\n }), \" in \", _jsx(_components.code, {\n children: \"context\"\n }), \". While another request\\nfor the same \", _jsx(_components.code, {\n children: \"store_id\"\n }), \" + \", _jsx(_components.code, {\n children: \"order_number\"\n }), \" is still being processed you get 409\\n\", _jsx(_components.code, {\n children: \"DUPLICATE_REQUEST_IN_FLIGHT\"\n }), \" with a \", _jsx(_components.code, {\n children: \"Retry-After\"\n }), \" header; retry after that delay and you\\nwill converge on the real outcome (200, 422 or \", _jsx(_components.code, {\n children: \"ORDER_ALREADY_EXISTS\"\n }), \").\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Complementary carrier services (\", _jsx(_components.code, {\n children: \"has_carrier_insurance\"\n }), \", \", _jsx(_components.code, {\n children: \"cod_amount\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"requires_document_return\"\n }), \", \", _jsx(_components.code, {\n children: \"requires_pickup_on_delivery\"\n }), \") are currently honoured only for\\nstores with a warehouse in Chile; sending \", _jsx(_components.code, {\n children: \"true\"\n }), \" (or a non-zero amount) from any other\\ncountry is refused with a typed error code rather than silently ignored.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Click and collect: send \", _jsx(_components.code, {\n children: \"is_click_and_collect: true\"\n }), \" and the \", _jsx(_components.code, {\n children: \"click_and_collect_service_code\"\n }), \"\\nyou obtained from \", _jsx(_components.code, {\n children: \"GET /carrier-services/pickup-locations\"\n }), \". Cubbo replaces the shipping\\nmethod you sent with the pickup carrier’s method. A full shipping address is still required.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"is_b2b\"\n }), \" only matters for stores enabled for both B2B and D2C (“mixed”); omit it to create a\\nconsumer (D2C) order. Stores enabled for a single model always get that model.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Error bodies on this endpoint carry an \", _jsx(_components.code, {\n children: \"error\"\n }), \" message plus a machine-readable \", _jsx(_components.code, {\n children: \"code\"\n }), \"\\n(empty string or null when the error has no code) and an optional \", _jsx(_components.code, {\n children: \"context\"\n }), \" object.\"]\n }), \"\\n\"]\n }), \"\\n\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Create an order","description":"Creates a sales order for a store whose warehouse is in Mexico, Colombia, Chile or the\nUnited States, and queues it for processing. Use it for every non-Brazil store; a store\nserved from a Brazil warehouse is refused and must use `POST /brazil/orders`. The request\nneeds a store, a unique `order_number` per store, a recipient address, at least one product\nline and a way to pick the carrier:\n\n- `shipping_line_code`: the exact name of a shipping method you created in the Cubbo app\n (**Integrations** > Open API > **Shipping Methods**). Cubbo picks the carrier with the\n configuration assigned to it.\n- `shipping_method_id`: a specific Cubbo shipping method, taken from the `shipping_method_id` of\n an option returned by `GET /shipping-methods/quote`.\n\n- The order is returned immediately in its initial status. Address, coverage, stock and\n carrier validations run asynchronously; poll `GET /orders` and read `status`,\n `has_missing_info` and `missing_info` to learn whether it was accepted.\n- Every product is identified by SKU. Without `channel_name`, an unknown SKU rejects the whole\n request with 422. With `channel_name` (an order relayed from a sales channel), the order is\n created anyway: a line whose SKU is unknown keeps that SKU without a product, and the\n response lists those SKUs in `warnings` with the code `UNIDENTIFIED_PRODUCT`. Processing\n then leaves the order with missing information (`status` `error`; with\n `include_event_history=true`, `GET /orders` shows the code `UNIDENTIFIED_PRODUCT` in the\n error event) until the product exists. Creating the product or adding the SKU to an\n existing product in the Cubbo app processes the order again and the line takes the\n product; creating it with `POST /products` without variants does not trigger that reprocess\n today.\n- A line sent without `price_per_item` takes the product's price. On a line whose SKU is\n unknown there is no product price yet, so the line counts as zero in the order total, and so\n does its discount; once the product exists, the line takes the product's price and the\n order total is recomputed (a kit without its own price is worth its components). A product\n price smaller than the line's discount is not taken. Discounts larger than what the\n products are worth are rejected with 422 `INVALID_PRODUCT_DISCOUNT`.\n- A `unit_code` sent on a line whose SKU is unknown is kept. The line must still have\n `quantity` 1, and one SKU cannot name the same code twice: otherwise the request is\n rejected with 422, as for a known SKU. The rest is checked once the product exists: if the\n line can never be fulfilled (a kit, or a product that does not track unit codes and has no\n unit carrying that code), the order waits with missing information, code\n `INVALID_UNIT_CODE_LINE`; two lines whose SKUs turn out to be the same product and name the\n same code give `DUPLICATE_UNIT_CODE` on the later line. Correct the line by editing the\n order in the Cubbo app; `PUT /orders/{id}` does not replace the products of an order with a\n pinned line.\n- `zip_code` is mandatory when the warehouse is in Mexico (and Brazil); it is optional for\n Chile and Colombia.\n- Chile: when `shipping.city` cannot be identified (a misspelling, or a province instead of a\n city), an order sent with `shipping_method_id` is not refused. It is created and moves to\n `error` until you correct `shipping.city` with `PUT /orders/{id}` or in\n the Cubbo app, where the order shows the reason. An order that ships on your own label (Blue\n Express EX, with the label attached) continues normally. A `shipping.city` that is identified\n but not covered by the method is still refused with 422.\n- Colombia: carriers deliver by the DANE (DIVIPOLA) code of the destination city. Cubbo finds it\n from `shipping.city` and `shipping.province`, or you send it in `shipping.city_code`: when\n present, the code decides the destination and the city and province are not looked up. A\n 5-digit code (a municipality) stands for its main town; an 8-digit code is a populated center;\n a code missing its leading zero (4 or 7 digits) is completed. An order whose\n `shipping.city_code` Cubbo does not know is not refused: the response lists it in `warnings`\n with the code `UNRECOGNIZED_CITY_CODE`, and the order moves to `error` with that code (the\n code you sent is in `additional_info.city_code`) until you correct it with `PUT /orders/{id}`. Without `city_code`, an order sent with\n `shipping_method_id` whose city and province cannot be identified is still refused with 422.\n- Duplicate protection: an `order_number` that already exists in the store answers 422 with\n code `ORDER_ALREADY_EXISTS` and the existing `order_id` in `context`. While another request\n for the same `store_id` + `order_number` is still being processed you get 409\n `DUPLICATE_REQUEST_IN_FLIGHT` with a `Retry-After` header; retry after that delay and you\n will converge on the real outcome (200, 422 or `ORDER_ALREADY_EXISTS`).\n- Complementary carrier services (`has_carrier_insurance`, `cod_amount`,\n `requires_document_return`, `requires_pickup_on_delivery`) are currently honoured only for\n stores with a warehouse in Chile; sending `true` (or a non-zero amount) from any other\n country is refused with a typed error code rather than silently ignored.\n- Click and collect: send `is_click_and_collect: true` and the `click_and_collect_service_code`\n you obtained from `GET /carrier-services/pickup-locations`. Cubbo replaces the shipping\n method you sent with the pickup carrier's method. A full shipping address is still required.\n- `is_b2b` only matters for stores enabled for both B2B and D2C (\"mixed\"); omit it to create a\n consumer (D2C) order. Stores enabled for a single model always get that model.\n- Error bodies on this endpoint carry an `error` message plus a machine-readable `code`\n (empty string or null when the error has no code) and an optional `context` object.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders","href":"/api-reference/orders/create-an-order","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Orders"],"operationId":"createOrder","summary":"Create an order","description":"Creates a sales order for a store whose warehouse is in Mexico, Colombia, Chile or the\nUnited States, and queues it for processing. Use it for every non-Brazil store; a store\nserved from a Brazil warehouse is refused and must use `POST /brazil/orders`. The request\nneeds a store, a unique `order_number` per store, a recipient address, at least one product\nline and a way to pick the carrier:\n\n- `shipping_line_code`: the exact name of a shipping method you created in the Cubbo app\n (**Integrations** > Open API > **Shipping Methods**). Cubbo picks the carrier with the\n configuration assigned to it.\n- `shipping_method_id`: a specific Cubbo shipping method, taken from the `shipping_method_id` of\n an option returned by `GET /shipping-methods/quote`.\n\n- The order is returned immediately in its initial status. Address, coverage, stock and\n carrier validations run asynchronously; poll `GET /orders` and read `status`,\n `has_missing_info` and `missing_info` to learn whether it was accepted.\n- Every product is identified by SKU. Without `channel_name`, an unknown SKU rejects the whole\n request with 422. With `channel_name` (an order relayed from a sales channel), the order is\n created anyway: a line whose SKU is unknown keeps that SKU without a product, and the\n response lists those SKUs in `warnings` with the code `UNIDENTIFIED_PRODUCT`. Processing\n then leaves the order with missing information (`status` `error`; with\n `include_event_history=true`, `GET /orders` shows the code `UNIDENTIFIED_PRODUCT` in the\n error event) until the product exists. Creating the product or adding the SKU to an\n existing product in the Cubbo app processes the order again and the line takes the\n product; creating it with `POST /products` without variants does not trigger that reprocess\n today.\n- A line sent without `price_per_item` takes the product's price. On a line whose SKU is\n unknown there is no product price yet, so the line counts as zero in the order total, and so\n does its discount; once the product exists, the line takes the product's price and the\n order total is recomputed (a kit without its own price is worth its components). A product\n price smaller than the line's discount is not taken. Discounts larger than what the\n products are worth are rejected with 422 `INVALID_PRODUCT_DISCOUNT`.\n- A `unit_code` sent on a line whose SKU is unknown is kept. The line must still have\n `quantity` 1, and one SKU cannot name the same code twice: otherwise the request is\n rejected with 422, as for a known SKU. The rest is checked once the product exists: if the\n line can never be fulfilled (a kit, or a product that does not track unit codes and has no\n unit carrying that code), the order waits with missing information, code\n `INVALID_UNIT_CODE_LINE`; two lines whose SKUs turn out to be the same product and name the\n same code give `DUPLICATE_UNIT_CODE` on the later line. Correct the line by editing the\n order in the Cubbo app; `PUT /orders/{id}` does not replace the products of an order with a\n pinned line.\n- `zip_code` is mandatory when the warehouse is in Mexico (and Brazil); it is optional for\n Chile and Colombia.\n- Chile: when `shipping.city` cannot be identified (a misspelling, or a province instead of a\n city), an order sent with `shipping_method_id` is not refused. It is created and moves to\n `error` until you correct `shipping.city` with `PUT /orders/{id}` or in\n the Cubbo app, where the order shows the reason. An order that ships on your own label (Blue\n Express EX, with the label attached) continues normally. A `shipping.city` that is identified\n but not covered by the method is still refused with 422.\n- Colombia: carriers deliver by the DANE (DIVIPOLA) code of the destination city. Cubbo finds it\n from `shipping.city` and `shipping.province`, or you send it in `shipping.city_code`: when\n present, the code decides the destination and the city and province are not looked up. A\n 5-digit code (a municipality) stands for its main town; an 8-digit code is a populated center;\n a code missing its leading zero (4 or 7 digits) is completed. An order whose\n `shipping.city_code` Cubbo does not know is not refused: the response lists it in `warnings`\n with the code `UNRECOGNIZED_CITY_CODE`, and the order moves to `error` with that code (the\n code you sent is in `additional_info.city_code`) until you correct it with `PUT /orders/{id}`. Without `city_code`, an order sent with\n `shipping_method_id` whose city and province cannot be identified is still refused with 422.\n- Duplicate protection: an `order_number` that already exists in the store answers 422 with\n code `ORDER_ALREADY_EXISTS` and the existing `order_id` in `context`. While another request\n for the same `store_id` + `order_number` is still being processed you get 409\n `DUPLICATE_REQUEST_IN_FLIGHT` with a `Retry-After` header; retry after that delay and you\n will converge on the real outcome (200, 422 or `ORDER_ALREADY_EXISTS`).\n- Complementary carrier services (`has_carrier_insurance`, `cod_amount`,\n `requires_document_return`, `requires_pickup_on_delivery`) are currently honoured only for\n stores with a warehouse in Chile; sending `true` (or a non-zero amount) from any other\n country is refused with a typed error code rather than silently ignored.\n- Click and collect: send `is_click_and_collect: true` and the `click_and_collect_service_code`\n you obtained from `GET /carrier-services/pickup-locations`. Cubbo replaces the shipping\n method you sent with the pickup carrier's method. A full shipping address is still required.\n- `is_b2b` only matters for stores enabled for both B2B and D2C (\"mixed\"); omit it to create a\n consumer (D2C) order. Stores enabled for a single model always get that model.\n- Error bodies on this endpoint carry an `error` message plus a machine-readable `code`\n (empty string or null when the error has no code) and an optional `context` object.\n","security":["fd9426e4-1b23-49bf-bd70-529529e87cf4"],"requestBody":"bfe420f2-39de-43d9-b2d7-53541f554861","responses":{"200":"036d401c-8d8f-4478-9de1-f0b90b8438e4","401":"c1cf7d8f-6918-473a-8406-5f0f722f09ec","409":"b8a69301-a187-4c98-a3d9-5b855580037d","422":"544eb646-6cd9-4d91-a7e5-58e2486cd6a8","500":"8412bf25-eb0e-4459-8957-67f7c0334b4a"},"method":"post","type":"path","servers":["30628f1a-73a6-48fb-b75f-22c715a140c8"],"path":"/orders","baseUrlOptions":["https://api.cubbo.com/v1"],"title":"Create an order","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["store_id","order_number","shipping","products"],"properties":{"store_id":{"type":"integer","description":"Id of the store the order belongs to. Your API credentials must have access to it.","example":1234,"isRequired":true,"uniqueKey":"store_id","typeLabel":"integer"},"order_number":{"type":"string","description":"Your identifier for the order. Must be unique within the store.","example":"ORD-0001","isRequired":true,"uniqueKey":"order_number","typeLabel":"string"},"shipping":{"type":"object","description":"Recipient and delivery address.","required":["first_name","phone","email","address1","country","city","province"],"properties":{"first_name":{"type":"string","description":"Recipient first name.","example":"Jaime","isRequired":true,"uniqueKey":"shipping.first_name","typeLabel":"string"},"phone":{"type":"string","description":"Recipient phone number, used by the carrier.","example":"5555555555","isRequired":true,"uniqueKey":"shipping.phone","typeLabel":"string"},"email":{"type":"string","format":"email","description":"Recipient email, used for tracking notifications.","example":"buyer@example.com","isRequired":true,"uniqueKey":"shipping.email","typeLabel":"string\u003cemail>"},"address1":{"type":"string","description":"Street and number.","example":"Av. Reforma 123","isRequired":true,"uniqueKey":"shipping.address1","typeLabel":"string"},"country":{"type":"string","description":"Country as an ISO 3166-1 alpha-2 code (a full country name is also recognised).","example":"MX","isRequired":true,"uniqueKey":"shipping.country","typeLabel":"string"},"city":{"type":"string","description":"City.","example":"Ciudad de México","isRequired":true,"uniqueKey":"shipping.city","typeLabel":"string"},"province":{"type":"string","description":"State or province.","example":"CDMX","isRequired":true,"uniqueKey":"shipping.province","typeLabel":"string"},"last_name":{"type":"string","description":"Recipient last name.","example":"Carrera","uniqueKey":"shipping.last_name","typeLabel":"string"},"address2":{"type":"string","description":"Additional address line (apartment, floor, building).","example":"Piso 4","uniqueKey":"shipping.address2","typeLabel":"string"},"references":{"type":"string","description":"Delivery hints for the courier.","example":"Blue door, ring twice","uniqueKey":"shipping.references","typeLabel":"string"},"number":{"type":"string","description":"Street number, when kept separate from `address1`.","example":"123","uniqueKey":"shipping.number","typeLabel":"string"},"interior_number":{"type":"string","description":"Interior or apartment number.","example":"4B","uniqueKey":"shipping.interior_number","typeLabel":"string"},"zip_code":{"type":"string","description":"Postal code. Required when the warehouse is in Mexico (`MISSING_ZIP_CODE` otherwise); optional for Chile and Colombia. Used for carrier coverage.","example":"06600","uniqueKey":"shipping.zip_code","typeLabel":"string"},"city_code":{"type":"string","description":"Colombia only: the DANE (DIVIPOLA) code of the city, 5 digits (a municipality) or 8 (a populated center). When sent, it decides the destination instead of `city` and `province`; a code Cubbo does not know leaves the order in `error` (`UNRECOGNIZED_CITY_CODE`) instead of refusing it. In other countries it is stored and returned as sent, but it does not change the destination.","example":"11001","uniqueKey":"shipping.city_code","typeLabel":"string"}},"isRequired":true,"uniqueKey":"shipping","typeLabel":"object"},"products":{"type":"array","minItems":1,"description":"Lines of the order. The same SKU may appear more than once.","items":{"type":"object","required":["sku","quantity"],"properties":{"sku":{"type":"string","description":"SKU of a product registered in the store.","example":"SKU-RED-M","isRequired":true,"uniqueKey":"products.items.[INDEX].sku","typeLabel":"string"},"quantity":{"type":"integer","description":"Units of this SKU. Lines of drop-shipping products are stored with quantity 0.","example":2,"isRequired":true,"uniqueKey":"products.items.[INDEX].quantity","typeLabel":"integer"},"unit_code":{"type":"string","description":"Pins the line to the one stock unit carrying this code. Only valid on a line with `quantity` 1 of a non-kit product that tracks unit codes; mandatory for products that hold personalized units. On a line whose SKU does not exist yet (only with `channel_name`), the quantity and a repeated code are checked on creation, and the rest once the product exists.","example":"UC-0001","uniqueKey":"products.items.[INDEX].unit_code","typeLabel":"string"}},"uniqueKey":"products.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"products","typeLabel":"object[]"},"shipping_method_id":{"type":"integer","description":"Id of a Cubbo shipping method. Get it from `GET /shipping-methods/quote`: each option in the response has a `shipping_method_id`. Required unless `shipping_line_code` is sent. Coverage for the destination is checked synchronously: by zip code in Mexico, by `shipping.city` in Chile. In Chile a `shipping.city` that cannot be identified does not refuse the order; it is created in `error` until it is corrected.","example":12,"uniqueKey":"shipping_method_id","typeLabel":"integer"},"shipping_line_code":{"type":"string","description":"Exact name of a shipping method you created in the Cubbo app, under **Integrations**, your Open API integration, **Shipping Methods** (field **Integration Delivery Method**). It must match character by character: the comparison is case-sensitive and does not trim spaces. Cubbo uses the shipping configuration assigned to that method to pick the carrier. See [Set up your integration](/guides/setup#3-configure-shipping-methods). Required unless `shipping_method_id` is sent; ignored when `shipping_method_id` is present. If no active method has that name, Cubbo falls back to the integration's default shipping method when one exists. If the method exists but no carrier can be resolved (no coverage, unknown weight or tariff), the order is still created and lands in an error status for Cubbo to resolve.","example":"Express","uniqueKey":"shipping_line_code","typeLabel":"string"},"is_paid":{"type":"boolean","description":"Whether the order is already paid. Defaults to `true` when omitted.","default":true,"example":true,"uniqueKey":"is_paid","typeLabel":"boolean"},"is_click_and_collect":{"type":"boolean","description":"Set to `true` to deliver to a carrier pickup point. Requires `click_and_collect_service_code`.","default":false,"example":false,"uniqueKey":"is_click_and_collect","typeLabel":"boolean"},"click_and_collect_service_code":{"oneOf":[{"type":"string","description":"Pickup point code returned by `GET /carrier-services/pickup-locations`, in the form `CUBBOCNC` + carrier code (`EST`, `CUBBO`, `DHL`, `PUNTOPOST`, `99`) + location id. Ignored (cleared) unless `is_click_and_collect` is `true`.","example":"CUBBOCNCEST001","uniqueKey":"click_and_collect_service_code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Pickup point code returned by `GET /carrier-services/pickup-locations`, in the form `CUBBOCNC` + carrier code (`EST`, `CUBBO`, `DHL`, `PUNTOPOST`, `99`) + location id. Ignored (cleared) unless `is_click_and_collect` is `true`.","example":"CUBBOCNCEST001","uniqueKey":"click_and_collect_service_code.oneOf.1","typeLabel":"null"}],"uniqueKey":"click_and_collect_service_code","typeLabel":"string | null"},"channel_name":{"type":"string","description":"Name of the sales channel the order came from, echoed back as `channel_name` on the order. Sending it also lets the order be created when a SKU is missing from the catalog (see the endpoint description).","example":"my-webstore","uniqueKey":"channel_name","typeLabel":"string"},"channel_order_id":{"type":"string","description":"Identifier of the order in your sales channel, echoed back as `channel_order_id`.","example":"WEB-98765","uniqueKey":"channel_order_id","typeLabel":"string"},"is_b2b":{"type":"boolean","description":"Business-model classification. Only read for stores enabled for both B2B and D2C: omit it (or send `false`) for a consumer order, send `true` for a B2B order. Stores enabled for a single model always get that model regardless of this value.","example":false,"uniqueKey":"is_b2b","typeLabel":"boolean"},"has_carrier_insurance":{"type":"boolean","description":"Ask the carrier to insure the shipment. Available only for stores with a warehouse in Chile; `true` elsewhere is refused with `CARRIER_INSURANCE_NOT_AVAILABLE`.","default":false,"example":false,"uniqueKey":"has_carrier_insurance","typeLabel":"boolean"},"is_cod":{"type":"boolean","description":"Cash on delivery; the courier collects payment at the door.","default":false,"example":false,"uniqueKey":"is_cod","typeLabel":"boolean"},"cod_amount":{"type":"number","minimum":0,"description":"Amount the courier must collect when it differs from the order total (partial collection). Omit, or send `0`, to collect the order total. A non-zero amount is available only for stores with a warehouse in Chile; elsewhere it is refused with `COD_AMOUNT_NOT_AVAILABLE`.","example":30000,"uniqueKey":"cod_amount","typeLabel":"number"},"requires_document_return":{"type":"boolean","description":"Ask the carrier to bring back a signed document with the delivery. Available only for stores with a warehouse in Chile; cannot be combined with `requires_pickup_on_delivery`.","default":false,"example":false,"uniqueKey":"requires_document_return","typeLabel":"boolean"},"requires_pickup_on_delivery":{"type":"boolean","description":"Include a prepaid return label inside the outbound package. Available only for consumer (D2C) orders of stores with a warehouse in Chile, and cannot be combined with `requires_document_return`.","default":false,"example":false,"uniqueKey":"requires_pickup_on_delivery","typeLabel":"boolean"},"billing":{"type":"object","description":"Optional billing contact and address.","required":["first_name","last_name","phone","email","address1","country","city","province"],"properties":{"first_name":{"type":"string","description":"Billing first name.","example":"Jaime","isRequired":true,"uniqueKey":"billing.first_name","typeLabel":"string"},"last_name":{"type":"string","description":"Billing last name.","example":"Carrera","isRequired":true,"uniqueKey":"billing.last_name","typeLabel":"string"},"phone":{"type":"string","description":"Billing phone number.","example":"5555555555","isRequired":true,"uniqueKey":"billing.phone","typeLabel":"string"},"email":{"type":"string","format":"email","description":"Billing email.","example":"buyer@example.com","isRequired":true,"uniqueKey":"billing.email","typeLabel":"string\u003cemail>"},"address1":{"type":"string","description":"Street and number.","example":"Av. Reforma 123","isRequired":true,"uniqueKey":"billing.address1","typeLabel":"string"},"country":{"type":"string","description":"Country as an ISO 3166-1 alpha-2 code.","example":"MX","isRequired":true,"uniqueKey":"billing.country","typeLabel":"string"},"city":{"type":"string","description":"City.","example":"Ciudad de México","isRequired":true,"uniqueKey":"billing.city","typeLabel":"string"},"province":{"type":"string","description":"State or province.","example":"CDMX","isRequired":true,"uniqueKey":"billing.province","typeLabel":"string"},"address2":{"type":"string","description":"Additional address line.","example":"Piso 4","uniqueKey":"billing.address2","typeLabel":"string"},"address3":{"type":"string","description":"Accepted for compatibility; not stored.","example":"","uniqueKey":"billing.address3","typeLabel":"string"},"interior_number":{"type":"string","description":"Interior or apartment number.","example":"4B","uniqueKey":"billing.interior_number","typeLabel":"string"},"zip_code":{"type":"string","description":"Postal code.","example":"06600","uniqueKey":"billing.zip_code","typeLabel":"string"}},"uniqueKey":"billing","typeLabel":"object"},"shipping_documents":{"type":"array","description":"Optional PDF documents to print and include with the shipment (for example a label or invoice you issued). Each document is fetched from a URL or decoded from base64 at creation time.","items":{"type":"object","required":["document_type","data","printing_type"],"properties":{"document_type":{"type":"string","enum":["url","base64"],"description":"How `data` must be read. `file` is not accepted on creation.","example":"url","isRequired":true,"uniqueKey":"shipping_documents.items.[INDEX].document_type","typeLabel":"enum\u003cstring>"},"data":{"type":"string","description":"Public URL of the PDF, or the base64-encoded PDF content.","example":"https://example.com/documents/label.pdf","isRequired":true,"uniqueKey":"shipping_documents.items.[INDEX].data","typeLabel":"string"},"printing_type":{"type":"string","enum":["label","document","difal_bill","difal_payment_receipt","identifier_label","oxxo_digital_card"],"description":"What the document is, which decides when the warehouse prints it.","example":"label","isRequired":true,"uniqueKey":"shipping_documents.items.[INDEX].printing_type","typeLabel":"enum\u003cstring>"},"metadata":{"type":"object","description":"Free-form data stored with the document.","additionalProperties":true,"example":{"tracking_number":"TRACK123"},"uniqueKey":"shipping_documents.items.[INDEX].metadata","typeLabel":"object"}},"uniqueKey":"shipping_documents.items.[INDEX]","typeLabel":"object"},"uniqueKey":"shipping_documents","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"basic":{"title":"basic","summary":"Minimal sale with a Cubbo shipping method","value":{"store_id":1234,"order_number":"ORD-0001","shipping_method_id":12,"shipping":{"first_name":"Jaime","last_name":"Carrera","phone":"5555555555","email":"buyer@example.com","address1":"Av. Reforma 123","address2":"Piso 4","references":"Blue door","country":"MX","city":"Ciudad de México","province":"CDMX","zip_code":"06600"},"products":[{"sku":"SKU-RED-M","quantity":2}]}},"shippingLineCode":{"title":"shippingLineCode","summary":"Carrier picked from your integration's shipping configuration","value":{"store_id":1234,"order_number":"ORD-0002","shipping_line_code":"Express","is_paid":true,"channel_name":"my-webstore","channel_order_id":"WEB-98765","shipping":{"first_name":"Ana","last_name":"Pérez","phone":"5512345678","email":"buyer@example.com","address1":"Calle Falsa 123","country":"MX","city":"Guadalajara","province":"Jalisco","zip_code":"44100"},"billing":{"first_name":"Ana","last_name":"Pérez","phone":"5512345678","email":"buyer@example.com","address1":"Calle Falsa 123","country":"MX","city":"Guadalajara","province":"Jalisco","zip_code":"44100"},"products":[{"sku":"SKU-RED-M","quantity":1},{"sku":"SKU-BLUE-L","quantity":3}]}},"chileCashOnDelivery":{"title":"chileCashOnDelivery","summary":"Chile order with partial cash-on-delivery and carrier insurance","value":{"store_id":1234,"order_number":"ORD-0003","shipping_method_id":45,"is_cod":true,"cod_amount":30000,"has_carrier_insurance":true,"shipping":{"first_name":"Jaime","last_name":"Carrera","phone":"56900000000","email":"buyer@example.com","address1":"Av Test 123","country":"CL","city":"Santiago","province":"Región Metropolitana","zip_code":"8320000"},"products":[{"sku":"SKU-RED-M","quantity":1}]}},"colombiaCityCode":{"title":"colombiaCityCode","summary":"Colombia, with the DANE code of the city","value":{"store_id":1234,"order_number":"ORD-0004","shipping_method_id":56,"shipping":{"first_name":"Ana","last_name":"Gómez","phone":"5555555555","email":"buyer@example.com","address1":"Calle 100 # 10-20","country":"CO","city":"Bogotá","province":"Bogotá, D.C.","city_code":"11001"},"products":[{"sku":"SKU-RED-M","quantity":1}]}},"clickAndCollect":{"title":"clickAndCollect","summary":"Click and collect at a carrier pickup point","value":{"store_id":1234,"order_number":"ORD-0004","shipping_method_id":12,"is_click_and_collect":true,"click_and_collect_service_code":"CUBBOCNCEST001","shipping":{"first_name":"Jaime","last_name":"Carrera","phone":"5555555555","email":"buyer@example.com","address1":"Av. Reforma 123","country":"MX","city":"Ciudad de México","province":"CDMX","zip_code":"06600"},"products":[{"sku":"SKU-RED-M","quantity":1}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"036d401c-8d8f-4478-9de1-f0b90b8438e4":{"description":"Order created. The body is the full order as Cubbo stores it, including its lines and the resolved shipping method. The order is still in its initial status; processing happens asynchronously. When the order was created with SKUs that are not in the store's catalog (only possible with `channel_name`), or with a Colombian `shipping.city_code` Cubbo does not know, the body also carries `warnings`.","content":{"application/json":{"schema":{"type":"object","description":"The order as `POST /orders` returns it.","properties":{"id":{"type":"integer","description":"Cubbo ID of the order. Use it in path parameters.","example":987654,"uniqueKey":"id","typeLabel":"integer"},"store_id":{"type":"integer","description":"Store ID.","example":1234,"uniqueKey":"store_id","typeLabel":"integer"},"order_number":{"type":"string","description":"Your order number, unique within the store.","example":"ORD-0001","uniqueKey":"order_number","typeLabel":"string"},"status":{"type":"string","description":"Fulfillment status of an order. `processing`, `picking` and `packing` all mean the order is being\nprepared in the warehouse. `holded` means the order is on hold. `packed` is unused.\n","enum":["initial","unpaid","empty","pending","error","cancelation_window","entirely_dropshipping","backorder","processing","picking","packing","packed","shipped","canceled","holded","interrupted","returned","return_arrived","returning","reentered","awaiting_fulfillment_request","awaiting_dropoff","arrived_at_warehouse"],"example":"shipped","uniqueKey":"status","typeLabel":"enum\u003cstring>"},"channel_created_at":{"type":"string","format":"date-time","description":"When the order was created in the sales channel.","example":"2026-01-10T14:02:11.000Z","uniqueKey":"channel_created_at","typeLabel":"string\u003cdate-time>"},"order_date":{"oneOf":[{"type":"string","format":"date-time","description":"Order date.","example":"2026-01-10T14:02:11.000Z","uniqueKey":"order_date.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"Order date.","example":"2026-01-10T14:02:11.000Z","uniqueKey":"order_date.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_date","typeLabel":"string\u003cdate-time> | null"},"shipping_date":{"oneOf":[{"type":"string","format":"date-time","description":"When the order was shipped.","example":"2026-01-11T18:30:00.000Z","uniqueKey":"shipping_date.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the order was shipped.","example":"2026-01-11T18:30:00.000Z","uniqueKey":"shipping_date.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_date","typeLabel":"string\u003cdate-time> | null"},"pending_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the order became ready to be fulfilled.","example":"2026-01-10T14:05:00.000Z","uniqueKey":"pending_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the order became ready to be fulfilled.","example":"2026-01-10T14:05:00.000Z","uniqueKey":"pending_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"pending_at","typeLabel":"string\u003cdate-time> | null"},"shipping_email":{"oneOf":[{"type":"string","description":"Buyer email.","example":"buyer@example.com","uniqueKey":"shipping_email.oneOf.0","typeLabel":"string"},{"type":"null","description":"Buyer email.","example":"buyer@example.com","uniqueKey":"shipping_email.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_email","typeLabel":"string | null"},"shipping_address_1":{"oneOf":[{"type":"string","description":"Shipping street address line 1 (also inside `shipping`).","example":"Av. Ejemplo 123","uniqueKey":"shipping_address_1.oneOf.0","typeLabel":"string"},{"type":"null","description":"Shipping street address line 1 (also inside `shipping`).","example":"Av. Ejemplo 123","uniqueKey":"shipping_address_1.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_address_1","typeLabel":"string | null"},"shipping_status":{"oneOf":[{"type":"string","description":"Carrier-side status of the shipment.","enum":["shipment_created","awaiting_collection","shipment_collected","shipment_in_transit","shipment_out_for_delivery","shipment_delivered","shipment_partially_delivered","shipment_with_incident","shipment_to_be_self_collected","shipment_canceled","shipment_returned","shipment_not_defined"],"example":"shipment_in_transit","uniqueKey":"shipping_status.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Carrier-side status of the shipment.","uniqueKey":"shipping_status.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_status","typeLabel":"enum\u003cstring> | null"},"is_paid":{"type":"boolean","description":"Whether the order is paid. Unpaid orders are not fulfilled.","example":true,"uniqueKey":"is_paid","typeLabel":"boolean"},"is_cod":{"type":"boolean","description":"Whether the order is cash on delivery.","example":false,"uniqueKey":"is_cod","typeLabel":"boolean"},"cod_amount":{"oneOf":[{"type":"string","description":"Amount to collect on delivery, as a decimal string.","example":null,"uniqueKey":"cod_amount.oneOf.0","typeLabel":"string"},{"type":"null","description":"Amount to collect on delivery, as a decimal string.","example":null,"uniqueKey":"cod_amount.oneOf.1","typeLabel":"null"}],"uniqueKey":"cod_amount","typeLabel":"string | null"},"requires_document_return":{"type":"boolean","description":"Whether the carrier must bring back a signed document.","example":false,"uniqueKey":"requires_document_return","typeLabel":"boolean"},"requires_pickup_on_delivery":{"type":"boolean","description":"Whether the carrier must pick something up when delivering.","example":false,"uniqueKey":"requires_pickup_on_delivery","typeLabel":"boolean"},"has_carrier_insurance":{"type":"boolean","description":"Whether the shipment is insured with the carrier.","example":false,"uniqueKey":"has_carrier_insurance","typeLabel":"boolean"},"has_missing_info":{"type":"boolean","description":"Whether the order is blocked because data is missing.","example":false,"uniqueKey":"has_missing_info","typeLabel":"boolean"},"missing_info":{"oneOf":[{"type":"string","description":"Description of the missing data, if any.","example":null,"uniqueKey":"missing_info.oneOf.0","typeLabel":"string"},{"type":"null","description":"Description of the missing data, if any.","example":null,"uniqueKey":"missing_info.oneOf.1","typeLabel":"null"}],"uniqueKey":"missing_info","typeLabel":"string | null"},"currency":{"oneOf":[{"type":"string","description":"Currency code of the prices.","example":"MXN","uniqueKey":"currency.oneOf.0","typeLabel":"string"},{"type":"null","description":"Currency code of the prices.","example":"MXN","uniqueKey":"currency.oneOf.1","typeLabel":"null"}],"uniqueKey":"currency","typeLabel":"string | null"},"total_price":{"oneOf":[{"type":"string","description":"Order total as a decimal string.","example":"899.00","uniqueKey":"total_price.oneOf.0","typeLabel":"string"},{"type":"null","description":"Order total as a decimal string.","example":"899.00","uniqueKey":"total_price.oneOf.1","typeLabel":"null"}],"uniqueKey":"total_price","typeLabel":"string | null"},"discount_price":{"oneOf":[{"type":"string","description":"Total discount as a decimal string.","example":"0.00","uniqueKey":"discount_price.oneOf.0","typeLabel":"string"},{"type":"null","description":"Total discount as a decimal string.","example":"0.00","uniqueKey":"discount_price.oneOf.1","typeLabel":"null"}],"uniqueKey":"discount_price","typeLabel":"string | null"},"buyer_shipping_price":{"oneOf":[{"type":"string","description":"Shipping price paid by the buyer, as a decimal string.","example":"0.00","uniqueKey":"buyer_shipping_price.oneOf.0","typeLabel":"string"},{"type":"null","description":"Shipping price paid by the buyer, as a decimal string.","example":"0.00","uniqueKey":"buyer_shipping_price.oneOf.1","typeLabel":"null"}],"uniqueKey":"buyer_shipping_price","typeLabel":"string | null"},"extra_fees_price":{"oneOf":[{"type":"string","description":"Extra fees as a decimal string.","example":"0.0","uniqueKey":"extra_fees_price.oneOf.0","typeLabel":"string"},{"type":"null","description":"Extra fees as a decimal string.","example":"0.0","uniqueKey":"extra_fees_price.oneOf.1","typeLabel":"null"}],"uniqueKey":"extra_fees_price","typeLabel":"string | null"},"is_pick_and_ship":{"type":"boolean","description":"Whether the order is a pick-and-ship order (you pick it up at the warehouse).","example":false,"uniqueKey":"is_pick_and_ship","typeLabel":"boolean"},"pick_n_ship_status":{"oneOf":[{"type":"string","description":"Pick-and-ship status.","enum":["awaiting_pick_up","picked_up","in_warehouse",null],"example":null,"uniqueKey":"pick_n_ship_status.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Pick-and-ship status.","enum":["awaiting_pick_up","picked_up","in_warehouse",null],"example":null,"uniqueKey":"pick_n_ship_status.oneOf.1","typeLabel":"null"}],"uniqueKey":"pick_n_ship_status","typeLabel":"enum\u003cstring> | null"},"is_b2b":{"type":"boolean","description":"Whether the order is a B2B order. In `GET /orders` only present for stores that handle both B2B and D2C.","example":false,"uniqueKey":"is_b2b","typeLabel":"boolean"},"is_first_time_buyer":{"type":"boolean","description":"Whether this is the buyer's first order in the store.","example":true,"uniqueKey":"is_first_time_buyer","typeLabel":"boolean"},"is_subscription_renewal":{"type":"boolean","description":"Whether the order is a subscription renewal.","example":false,"uniqueKey":"is_subscription_renewal","typeLabel":"boolean"},"is_click_and_collect":{"type":"boolean","description":"Whether the buyer picks the order up at a pickup point.","example":false,"uniqueKey":"is_click_and_collect","typeLabel":"boolean"},"click_and_collect_metadata":{"oneOf":[{"type":"object","description":"Pickup-point details for click-and-collect orders; null otherwise.","properties":{"name":{"type":"string","description":"Pickup point name.","example":"Pickup point name","uniqueKey":"click_and_collect_metadata.oneOf.0.name","typeLabel":"string"},"address":{"type":"string","description":"Pickup point address.","example":"Pickup point address","uniqueKey":"click_and_collect_metadata.oneOf.0.address","typeLabel":"string"},"zipcode":{"type":"string","description":"Pickup point postal code.","example":"01000","uniqueKey":"click_and_collect_metadata.oneOf.0.zipcode","typeLabel":"string"},"description":{"type":"string","description":"Human-readable description of the pickup point.","example":"Punto fisico - Centro","uniqueKey":"click_and_collect_metadata.oneOf.0.description","typeLabel":"string"},"carrier_name":{"type":"string","description":"Carrier operating the pickup point.","example":"ESTAFETA","uniqueKey":"click_and_collect_metadata.oneOf.0.carrier_name","typeLabel":"string"},"pickup_codes":{"type":"object","description":"Pickup codes per package, keyed by the package tracking number.","additionalProperties":{"type":"object","properties":{"pickup_short":{"type":"string","description":"Short pickup code.","example":"AB12CD","uniqueKey":"click_and_collect_metadata.oneOf.0.pickup_codes.additionalProperties.pickup_short","typeLabel":"string"},"pickup_qr_image_url":{"type":"string","description":"URL of the QR image to present at pickup.","example":"https://api.cubbo.com/rails/active_storage/blobs/redirect/example/pickup_qr.png","uniqueKey":"click_and_collect_metadata.oneOf.0.pickup_codes.additionalProperties.pickup_qr_image_url","typeLabel":"string"}},"uniqueKey":"click_and_collect_metadata.oneOf.0.pickup_codes.additionalProperties","typeLabel":"object"},"uniqueKey":"click_and_collect_metadata.oneOf.0.pickup_codes","typeLabel":"object"}},"additionalProperties":true,"uniqueKey":"click_and_collect_metadata.oneOf.0","typeLabel":"object"},{"type":"null","description":"Pickup-point details for click-and-collect orders; null otherwise.","uniqueKey":"click_and_collect_metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"click_and_collect_metadata","typeLabel":"object | null"},"is_multi_package":{"type":"boolean","description":"Whether the shipment has more than one package.","example":false,"uniqueKey":"is_multi_package","typeLabel":"boolean"},"shipping":{"type":"object","description":"Shipping contact and address of an order.","properties":{"first_name":{"oneOf":[{"type":"string","description":"Recipient first name.","example":"Ana","uniqueKey":"shipping.first_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Recipient first name.","example":"Ana","uniqueKey":"shipping.first_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping.first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","description":"Recipient last name.","example":"Example","uniqueKey":"shipping.last_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Recipient last name.","example":"Example","uniqueKey":"shipping.last_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping.last_name","typeLabel":"string | null"},"company":{"oneOf":[{"type":"string","description":"Company name, if any.","example":null,"uniqueKey":"shipping.company.oneOf.0","typeLabel":"string"},{"type":"null","description":"Company name, if any.","example":null,"uniqueKey":"shipping.company.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping.company","typeLabel":"string | null"},"phone":{"oneOf":[{"type":"string","description":"Recipient phone number.","example":"+525500000000","uniqueKey":"shipping.phone.oneOf.0","typeLabel":"string"},{"type":"null","description":"Recipient phone number.","example":"+525500000000","uniqueKey":"shipping.phone.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping.phone","typeLabel":"string | null"},"address_1":{"oneOf":[{"type":"string","description":"Street address line 1.","example":"Av. Ejemplo 123","uniqueKey":"shipping.address_1.oneOf.0","typeLabel":"string"},{"type":"null","description":"Street address line 1.","example":"Av. Ejemplo 123","uniqueKey":"shipping.address_1.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping.address_1","typeLabel":"string | null"},"address_2":{"oneOf":[{"type":"string","description":"Street address line 2.","example":null,"uniqueKey":"shipping.address_2.oneOf.0","typeLabel":"string"},{"type":"null","description":"Street address line 2.","example":null,"uniqueKey":"shipping.address_2.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping.address_2","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","description":"Recipient email.","example":"buyer@example.com","uniqueKey":"shipping.email.oneOf.0","typeLabel":"string"},{"type":"null","description":"Recipient email.","example":"buyer@example.com","uniqueKey":"shipping.email.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping.email","typeLabel":"string | null"},"zip_code":{"oneOf":[{"type":"string","description":"Postal code.","example":"01000","uniqueKey":"shipping.zip_code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Postal code.","example":"01000","uniqueKey":"shipping.zip_code.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping.zip_code","typeLabel":"string | null"},"country":{"oneOf":[{"type":"string","description":"Two-letter country code.","example":"MX","uniqueKey":"shipping.country.oneOf.0","typeLabel":"string"},{"type":"null","description":"Two-letter country code.","example":"MX","uniqueKey":"shipping.country.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping.country","typeLabel":"string | null"},"state":{"oneOf":[{"type":"string","description":"State or province.","example":"CDMX","uniqueKey":"shipping.state.oneOf.0","typeLabel":"string"},{"type":"null","description":"State or province.","example":"CDMX","uniqueKey":"shipping.state.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping.state","typeLabel":"string | null"},"city":{"oneOf":[{"type":"string","description":"City.","example":"Ciudad de Mexico","uniqueKey":"shipping.city.oneOf.0","typeLabel":"string"},{"type":"null","description":"City.","example":"Ciudad de Mexico","uniqueKey":"shipping.city.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping.city","typeLabel":"string | null"},"city_code":{"oneOf":[{"type":"string","description":"Colombia: the DANE code of the city that decides the destination, as you sent it in `shipping.city_code`; null when the city and province decide.","example":null,"uniqueKey":"shipping.city_code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Colombia: the DANE code of the city that decides the destination, as you sent it in `shipping.city_code`; null when the city and province decide.","example":null,"uniqueKey":"shipping.city_code.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping.city_code","typeLabel":"string | null"},"number":{"oneOf":[{"type":"string","description":"Street number.","example":"123","uniqueKey":"shipping.number.oneOf.0","typeLabel":"string"},{"type":"null","description":"Street number.","example":"123","uniqueKey":"shipping.number.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping.number","typeLabel":"string | null"},"interior_number":{"oneOf":[{"type":"string","description":"Apartment or interior number.","example":null,"uniqueKey":"shipping.interior_number.oneOf.0","typeLabel":"string"},{"type":"null","description":"Apartment or interior number.","example":null,"uniqueKey":"shipping.interior_number.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping.interior_number","typeLabel":"string | null"},"neighborhood":{"oneOf":[{"type":"string","description":"Neighborhood (colonia / bairro).","example":"Centro","uniqueKey":"shipping.neighborhood.oneOf.0","typeLabel":"string"},{"type":"null","description":"Neighborhood (colonia / bairro).","example":"Centro","uniqueKey":"shipping.neighborhood.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping.neighborhood","typeLabel":"string | null"},"references":{"oneOf":[{"type":"string","description":"Delivery references for the courier.","example":"Blue door","uniqueKey":"shipping.references.oneOf.0","typeLabel":"string"},{"type":"null","description":"Delivery references for the courier.","example":"Blue door","uniqueKey":"shipping.references.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping.references","typeLabel":"string | null"}},"uniqueKey":"shipping","typeLabel":"object"},"billing":{"type":"object","description":"Billing contact, fiscal data and address of an order. Fiscal fields are returned in clear text to the store that owns the order.","properties":{"first_name":{"oneOf":[{"type":"string","description":"Billing first name.","example":"Ana","uniqueKey":"billing.first_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Billing first name.","example":"Ana","uniqueKey":"billing.first_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing.first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","description":"Billing last name.","example":"Example","uniqueKey":"billing.last_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Billing last name.","example":"Example","uniqueKey":"billing.last_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing.last_name","typeLabel":"string | null"},"company":{"oneOf":[{"type":"string","description":"Company name, if any.","example":null,"uniqueKey":"billing.company.oneOf.0","typeLabel":"string"},{"type":"null","description":"Company name, if any.","example":null,"uniqueKey":"billing.company.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing.company","typeLabel":"string | null"},"phone":{"oneOf":[{"type":"string","description":"Billing phone number.","example":"+525500000000","uniqueKey":"billing.phone.oneOf.0","typeLabel":"string"},{"type":"null","description":"Billing phone number.","example":"+525500000000","uniqueKey":"billing.phone.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing.phone","typeLabel":"string | null"},"tax_id":{"oneOf":[{"type":"string","description":"Tax ID of the buyer (CPF or CNPJ in Brazil, RFC in Mexico).","example":"000.000.000-00","uniqueKey":"billing.tax_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Tax ID of the buyer (CPF or CNPJ in Brazil, RFC in Mexico).","example":"000.000.000-00","uniqueKey":"billing.tax_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing.tax_id","typeLabel":"string | null"},"tax_regime":{"oneOf":[{"type":"string","description":"Buyer's tax regime, when provided.","example":null,"uniqueKey":"billing.tax_regime.oneOf.0","typeLabel":"string"},{"type":"null","description":"Buyer's tax regime, when provided.","example":null,"uniqueKey":"billing.tax_regime.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing.tax_regime","typeLabel":"string | null"},"state_registration":{"oneOf":[{"type":"string","description":"State registration (inscricao estadual, Brazil).","example":null,"uniqueKey":"billing.state_registration.oneOf.0","typeLabel":"string"},{"type":"null","description":"State registration (inscricao estadual, Brazil).","example":null,"uniqueKey":"billing.state_registration.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing.state_registration","typeLabel":"string | null"},"address_1":{"oneOf":[{"type":"string","description":"Street address line 1.","example":"Av. Ejemplo 123","uniqueKey":"billing.address_1.oneOf.0","typeLabel":"string"},{"type":"null","description":"Street address line 1.","example":"Av. Ejemplo 123","uniqueKey":"billing.address_1.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing.address_1","typeLabel":"string | null"},"address_2":{"oneOf":[{"type":"string","description":"Street address line 2.","example":null,"uniqueKey":"billing.address_2.oneOf.0","typeLabel":"string"},{"type":"null","description":"Street address line 2.","example":null,"uniqueKey":"billing.address_2.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing.address_2","typeLabel":"string | null"},"number":{"oneOf":[{"type":"string","description":"Street number.","example":"123","uniqueKey":"billing.number.oneOf.0","typeLabel":"string"},{"type":"null","description":"Street number.","example":"123","uniqueKey":"billing.number.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing.number","typeLabel":"string | null"},"interior_number":{"oneOf":[{"type":"string","description":"Apartment or interior number.","example":null,"uniqueKey":"billing.interior_number.oneOf.0","typeLabel":"string"},{"type":"null","description":"Apartment or interior number.","example":null,"uniqueKey":"billing.interior_number.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing.interior_number","typeLabel":"string | null"},"neighborhood":{"oneOf":[{"type":"string","description":"Neighborhood.","example":"Centro","uniqueKey":"billing.neighborhood.oneOf.0","typeLabel":"string"},{"type":"null","description":"Neighborhood.","example":"Centro","uniqueKey":"billing.neighborhood.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing.neighborhood","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","description":"Billing email.","example":"buyer@example.com","uniqueKey":"billing.email.oneOf.0","typeLabel":"string"},{"type":"null","description":"Billing email.","example":"buyer@example.com","uniqueKey":"billing.email.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing.email","typeLabel":"string | null"},"zip_code":{"oneOf":[{"type":"string","description":"Postal code.","example":"01000","uniqueKey":"billing.zip_code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Postal code.","example":"01000","uniqueKey":"billing.zip_code.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing.zip_code","typeLabel":"string | null"},"country":{"oneOf":[{"type":"string","description":"Two-letter country code.","example":"MX","uniqueKey":"billing.country.oneOf.0","typeLabel":"string"},{"type":"null","description":"Two-letter country code.","example":"MX","uniqueKey":"billing.country.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing.country","typeLabel":"string | null"},"state":{"oneOf":[{"type":"string","description":"State or province.","example":"CDMX","uniqueKey":"billing.state.oneOf.0","typeLabel":"string"},{"type":"null","description":"State or province.","example":"CDMX","uniqueKey":"billing.state.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing.state","typeLabel":"string | null"},"city":{"oneOf":[{"type":"string","description":"City.","example":"Ciudad de Mexico","uniqueKey":"billing.city.oneOf.0","typeLabel":"string"},{"type":"null","description":"City.","example":"Ciudad de Mexico","uniqueKey":"billing.city.oneOf.1","typeLabel":"null"}],"uniqueKey":"billing.city","typeLabel":"string | null"}},"uniqueKey":"billing","typeLabel":"object"},"delivery_tracking":{"type":"array","description":"Tracking per package. Return labels are excluded.","items":{"type":"object","description":"Tracking information for one package of the order. When no label exists yet, a single entry with null tracking fields is returned.","properties":{"shipping_number":{"oneOf":[{"type":"string","description":"Carrier tracking number of the package.","example":"TRK000000001","uniqueKey":"delivery_tracking.items.[INDEX].shipping_number.oneOf.0","typeLabel":"string"},{"type":"null","description":"Carrier tracking number of the package.","example":"TRK000000001","uniqueKey":"delivery_tracking.items.[INDEX].shipping_number.oneOf.1","typeLabel":"null"}],"uniqueKey":"delivery_tracking.items.[INDEX].shipping_number","typeLabel":"string | null"},"tracking_url":{"oneOf":[{"type":"string","description":"Carrier tracking page. For Cubbo pickup-point deliveries this is Cubbo's own tracking page.","example":"https://carrier.example.com/track/TRK000000001","uniqueKey":"delivery_tracking.items.[INDEX].tracking_url.oneOf.0","typeLabel":"string"},{"type":"null","description":"Carrier tracking page. For Cubbo pickup-point deliveries this is Cubbo's own tracking page.","example":"https://carrier.example.com/track/TRK000000001","uniqueKey":"delivery_tracking.items.[INDEX].tracking_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"delivery_tracking.items.[INDEX].tracking_url","typeLabel":"string | null"},"cubbo_tracking_url":{"oneOf":[{"type":"string","description":"Cubbo tracking page for the order.","example":"https://tracking.example.com/orders/abc123","uniqueKey":"delivery_tracking.items.[INDEX].cubbo_tracking_url.oneOf.0","typeLabel":"string"},{"type":"null","description":"Cubbo tracking page for the order.","example":"https://tracking.example.com/orders/abc123","uniqueKey":"delivery_tracking.items.[INDEX].cubbo_tracking_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"delivery_tracking.items.[INDEX].cubbo_tracking_url","typeLabel":"string | null"},"service_id":{"oneOf":[{"type":"string","description":"Carrier service used for the label.","example":"express","uniqueKey":"delivery_tracking.items.[INDEX].service_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Carrier service used for the label.","example":"express","uniqueKey":"delivery_tracking.items.[INDEX].service_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"delivery_tracking.items.[INDEX].service_id","typeLabel":"string | null"},"shipping_status":{"oneOf":[{"type":"string","description":"Shipping status of this package (falls back to the order's shipping status).","enum":["shipment_created","awaiting_collection","shipment_collected","shipment_in_transit","shipment_out_for_delivery","shipment_delivered","shipment_partially_delivered","shipment_with_incident","shipment_to_be_self_collected","shipment_canceled","shipment_returned","shipment_not_defined"],"example":"shipment_in_transit","uniqueKey":"delivery_tracking.items.[INDEX].shipping_status.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Shipping status of this package (falls back to the order's shipping status).","uniqueKey":"delivery_tracking.items.[INDEX].shipping_status.oneOf.1","typeLabel":"null"}],"uniqueKey":"delivery_tracking.items.[INDEX].shipping_status","typeLabel":"enum\u003cstring> | null"},"package_index":{"type":"integer","description":"1-based index of this package.","example":1,"uniqueKey":"delivery_tracking.items.[INDEX].package_index","typeLabel":"integer"},"total_packages":{"type":"integer","description":"Total number of packages of the order.","example":1,"uniqueKey":"delivery_tracking.items.[INDEX].total_packages","typeLabel":"integer"}},"uniqueKey":"delivery_tracking.items.[INDEX]","typeLabel":"object"},"uniqueKey":"delivery_tracking","typeLabel":"object[]"},"return_shipping_labels":{"oneOf":[{"type":"array","description":"Valid return labels of the order.","items":{"type":"object","description":"A valid return label attached to the order.","properties":{"shipping_number":{"oneOf":[{"type":"string","description":"Tracking number of the return label.","example":"RTN000000001","uniqueKey":"return_shipping_labels.oneOf.0.items.[INDEX].shipping_number.oneOf.0","typeLabel":"string"},{"type":"null","description":"Tracking number of the return label.","example":"RTN000000001","uniqueKey":"return_shipping_labels.oneOf.0.items.[INDEX].shipping_number.oneOf.1","typeLabel":"null"}],"uniqueKey":"return_shipping_labels.oneOf.0.items.[INDEX].shipping_number","typeLabel":"string | null"},"tracking_url":{"oneOf":[{"type":"string","description":"Carrier tracking page of the return label.","example":"https://carrier.example.com/track/RTN000000001","uniqueKey":"return_shipping_labels.oneOf.0.items.[INDEX].tracking_url.oneOf.0","typeLabel":"string"},{"type":"null","description":"Carrier tracking page of the return label.","example":"https://carrier.example.com/track/RTN000000001","uniqueKey":"return_shipping_labels.oneOf.0.items.[INDEX].tracking_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"return_shipping_labels.oneOf.0.items.[INDEX].tracking_url","typeLabel":"string | null"}},"uniqueKey":"return_shipping_labels.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"return_shipping_labels.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Valid return labels of the order.","items":{"type":"object","description":"A valid return label attached to the order.","properties":{"shipping_number":{"oneOf":[{"type":"string","description":"Tracking number of the return label.","example":"RTN000000001"},{"type":"null","description":"Tracking number of the return label.","example":"RTN000000001"}]},"tracking_url":{"oneOf":[{"type":"string","description":"Carrier tracking page of the return label.","example":"https://carrier.example.com/track/RTN000000001"},{"type":"null","description":"Carrier tracking page of the return label.","example":"https://carrier.example.com/track/RTN000000001"}]}}},"uniqueKey":"return_shipping_labels.oneOf.1","typeLabel":"null"}],"uniqueKey":"return_shipping_labels","typeLabel":"object[] | null"},"proof_of_delivery":{"oneOf":[{"type":"object","description":"Proof of delivery, when the carrier provided one for a shipped or returned order.","properties":{"id":{"type":"integer","description":"Proof of delivery ID.","example":3101,"uniqueKey":"proof_of_delivery.oneOf.0.id","typeLabel":"integer"},"recipient_name":{"oneOf":[{"type":"string","description":"Name of the person who received the package.","example":"Ana Example","uniqueKey":"proof_of_delivery.oneOf.0.recipient_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Name of the person who received the package.","example":"Ana Example","uniqueKey":"proof_of_delivery.oneOf.0.recipient_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"proof_of_delivery.oneOf.0.recipient_name","typeLabel":"string | null"},"recipient_relationship":{"oneOf":[{"type":"string","description":"Relationship of the receiver to the buyer, as reported by the carrier.","example":"self","uniqueKey":"proof_of_delivery.oneOf.0.recipient_relationship.oneOf.0","typeLabel":"string"},{"type":"null","description":"Relationship of the receiver to the buyer, as reported by the carrier.","example":"self","uniqueKey":"proof_of_delivery.oneOf.0.recipient_relationship.oneOf.1","typeLabel":"null"}],"uniqueKey":"proof_of_delivery.oneOf.0.recipient_relationship","typeLabel":"string | null"},"format":{"oneOf":[{"type":"string","description":"Format of the proof files (for example `image`, `pdf`, `base64`).","example":"image","uniqueKey":"proof_of_delivery.oneOf.0.format.oneOf.0","typeLabel":"string"},{"type":"null","description":"Format of the proof files (for example `image`, `pdf`, `base64`).","example":"image","uniqueKey":"proof_of_delivery.oneOf.0.format.oneOf.1","typeLabel":"null"}],"uniqueKey":"proof_of_delivery.oneOf.0.format","typeLabel":"string | null"},"files":{"oneOf":[{"type":"array","description":"Files attached to the proof, or null when there are none.","items":{"type":"object","properties":{"path":{"type":"string","description":"Relative download path.","example":"/rails/active_storage/blobs/redirect/example/pod.jpg","uniqueKey":"proof_of_delivery.oneOf.0.files.oneOf.0.items.[INDEX].path","typeLabel":"string"},"filename":{"type":"string","description":"File name.","example":"pod.jpg","uniqueKey":"proof_of_delivery.oneOf.0.files.oneOf.0.items.[INDEX].filename","typeLabel":"string"},"byte_size":{"type":"integer","description":"Size in bytes.","example":120340,"uniqueKey":"proof_of_delivery.oneOf.0.files.oneOf.0.items.[INDEX].byte_size","typeLabel":"integer"},"content_type":{"type":"string","description":"MIME type.","example":"image/jpeg","uniqueKey":"proof_of_delivery.oneOf.0.files.oneOf.0.items.[INDEX].content_type","typeLabel":"string"},"thumbnail_path":{"oneOf":[{"type":"string","description":"Relative path of a 300x300 thumbnail; only for images.","example":"/rails/active_storage/representations/example/pod.jpg","uniqueKey":"proof_of_delivery.oneOf.0.files.oneOf.0.items.[INDEX].thumbnail_path.oneOf.0","typeLabel":"string"},{"type":"null","description":"Relative path of a 300x300 thumbnail; only for images.","example":"/rails/active_storage/representations/example/pod.jpg","uniqueKey":"proof_of_delivery.oneOf.0.files.oneOf.0.items.[INDEX].thumbnail_path.oneOf.1","typeLabel":"null"}],"uniqueKey":"proof_of_delivery.oneOf.0.files.oneOf.0.items.[INDEX].thumbnail_path","typeLabel":"string | null"}},"uniqueKey":"proof_of_delivery.oneOf.0.files.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"proof_of_delivery.oneOf.0.files.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Files attached to the proof, or null when there are none.","items":{"type":"object","properties":{"path":{"type":"string","description":"Relative download path.","example":"/rails/active_storage/blobs/redirect/example/pod.jpg"},"filename":{"type":"string","description":"File name.","example":"pod.jpg"},"byte_size":{"type":"integer","description":"Size in bytes.","example":120340},"content_type":{"type":"string","description":"MIME type.","example":"image/jpeg"},"thumbnail_path":{"oneOf":[{"type":"string","description":"Relative path of a 300x300 thumbnail; only for images.","example":"/rails/active_storage/representations/example/pod.jpg"},{"type":"null","description":"Relative path of a 300x300 thumbnail; only for images.","example":"/rails/active_storage/representations/example/pod.jpg"}]}}},"uniqueKey":"proof_of_delivery.oneOf.0.files.oneOf.1","typeLabel":"null"}],"uniqueKey":"proof_of_delivery.oneOf.0.files","typeLabel":"object[] | null"}},"uniqueKey":"proof_of_delivery.oneOf.0","typeLabel":"object"},{"type":"null","description":"Proof of delivery, when the carrier provided one for a shipped or returned order.","uniqueKey":"proof_of_delivery.oneOf.1","typeLabel":"null"}],"uniqueKey":"proof_of_delivery","typeLabel":"object | null"},"estimated_time_arrival":{"oneOf":[{"type":"string","format":"date-time","description":"Estimated delivery date.","example":"2026-01-13T00:00:00.000Z","uniqueKey":"estimated_time_arrival.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"Estimated delivery date.","example":"2026-01-13T00:00:00.000Z","uniqueKey":"estimated_time_arrival.oneOf.1","typeLabel":"null"}],"uniqueKey":"estimated_time_arrival","typeLabel":"string\u003cdate-time> | null"},"latest_estimated_time_arrival_range":{"oneOf":[{"type":"object","description":"Latest estimated delivery window, or null when no estimate exists.","properties":{"range_begin":{"type":"string","format":"date-time","description":"Start of the estimated delivery window.","example":"2026-01-13T06:00:00.000Z","uniqueKey":"latest_estimated_time_arrival_range.oneOf.0.range_begin","typeLabel":"string\u003cdate-time>"},"range_end":{"type":"string","format":"date-time","description":"End of the estimated delivery window.","example":"2026-01-14T05:59:59.000Z","uniqueKey":"latest_estimated_time_arrival_range.oneOf.0.range_end","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"latest_estimated_time_arrival_range.oneOf.0","typeLabel":"object"},{"type":"null","description":"Latest estimated delivery window, or null when no estimate exists.","uniqueKey":"latest_estimated_time_arrival_range.oneOf.1","typeLabel":"null"}],"uniqueKey":"latest_estimated_time_arrival_range","typeLabel":"object | null"},"delivered_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the carrier delivered the order.","example":null,"uniqueKey":"delivered_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the carrier delivered the order.","example":null,"uniqueKey":"delivered_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"delivered_at","typeLabel":"string\u003cdate-time> | null"},"updated_at":{"type":"string","format":"date-time","description":"Last update of the order.","example":"2026-01-11T18:31:00.000Z","uniqueKey":"updated_at","typeLabel":"string\u003cdate-time>"},"channel_order_id":{"oneOf":[{"type":"string","description":"ID of the order in the sales channel.","example":"5566778899","uniqueKey":"channel_order_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"ID of the order in the sales channel.","example":"5566778899","uniqueKey":"channel_order_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"channel_order_id","typeLabel":"string | null"},"channel_name":{"oneOf":[{"type":"string","description":"Name of the sales channel the order came from.","example":"shopify","uniqueKey":"channel_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Name of the sales channel the order came from.","example":"shopify","uniqueKey":"channel_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"channel_name","typeLabel":"string | null"},"channel_shipping_line_code":{"oneOf":[{"type":"string","description":"Code of the shipping option chosen at checkout in the sales channel (first shipping line).","example":"standard","uniqueKey":"channel_shipping_line_code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Code of the shipping option chosen at checkout in the sales channel (first shipping line).","example":"standard","uniqueKey":"channel_shipping_line_code.oneOf.1","typeLabel":"null"}],"uniqueKey":"channel_shipping_line_code","typeLabel":"string | null"},"warehouse_timezone":{"oneOf":[{"type":"string","description":"IANA time zone of the warehouse fulfilling the order.","example":"America/Mexico_City","uniqueKey":"warehouse_timezone.oneOf.0","typeLabel":"string"},{"type":"null","description":"IANA time zone of the warehouse fulfilling the order.","example":"America/Mexico_City","uniqueKey":"warehouse_timezone.oneOf.1","typeLabel":"null"}],"uniqueKey":"warehouse_timezone","typeLabel":"string | null"},"shipping_method":{"oneOf":[{"type":"object","description":"Shipping method assigned to the order.","properties":{"id":{"type":"integer","description":"Shipping method ID.","example":42,"uniqueKey":"shipping_method.oneOf.0.id","typeLabel":"integer"},"shipping_name":{"type":"string","description":"Name of the shipping service.","example":"DHL Express","uniqueKey":"shipping_method.oneOf.0.shipping_name","typeLabel":"string"},"carrier_name":{"type":"string","description":"Carrier name as presented to your customers.","example":"DHL","uniqueKey":"shipping_method.oneOf.0.carrier_name","typeLabel":"string"},"capitalized_carrier":{"oneOf":[{"type":"string","description":"Carrier name with the first letter capitalized.","example":"Dhl","uniqueKey":"shipping_method.oneOf.0.capitalized_carrier.oneOf.0","typeLabel":"string"},{"type":"null","description":"Carrier name with the first letter capitalized.","example":"Dhl","uniqueKey":"shipping_method.oneOf.0.capitalized_carrier.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_method.oneOf.0.capitalized_carrier","typeLabel":"string | null"},"is_active":{"type":"boolean","description":"Whether the method is currently available.","example":true,"uniqueKey":"shipping_method.oneOf.0.is_active","typeLabel":"boolean"},"shipping_type":{"oneOf":[{"type":"string","description":"Coverage of the method.","enum":["national","international","pickup",null],"example":"national","uniqueKey":"shipping_method.oneOf.0.shipping_type.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Coverage of the method.","enum":["national","international","pickup",null],"example":"national","uniqueKey":"shipping_method.oneOf.0.shipping_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_method.oneOf.0.shipping_type","typeLabel":"enum\u003cstring> | null"},"delivery_type":{"oneOf":[{"type":"string","description":"Service level.","enum":["SameDay","NextDay","Ground","Pickup","International",null],"example":"Ground","uniqueKey":"shipping_method.oneOf.0.delivery_type.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Service level.","enum":["SameDay","NextDay","Ground","Pickup","International",null],"example":"Ground","uniqueKey":"shipping_method.oneOf.0.delivery_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_method.oneOf.0.delivery_type","typeLabel":"enum\u003cstring> | null"},"country":{"type":"string","description":"Two-letter country code the method operates in.","example":"MX","uniqueKey":"shipping_method.oneOf.0.country","typeLabel":"string"},"is_cod":{"type":"boolean","description":"Whether the method supports cash on delivery.","example":false,"uniqueKey":"shipping_method.oneOf.0.is_cod","typeLabel":"boolean"},"extended_zone":{"type":"boolean","description":"Whether the carrier delivers to extended zones.","example":true,"uniqueKey":"shipping_method.oneOf.0.extended_zone","typeLabel":"boolean"},"po_box_dropoff":{"type":"boolean","description":"Whether the carrier delivers to PO boxes.","example":true,"uniqueKey":"shipping_method.oneOf.0.po_box_dropoff","typeLabel":"boolean"},"provides_pod":{"type":"boolean","description":"Whether the carrier provides proof of delivery.","example":false,"uniqueKey":"shipping_method.oneOf.0.provides_pod","typeLabel":"boolean"},"contract_provider":{"oneOf":[{"type":"string","description":"Carrier contract used.","example":null,"uniqueKey":"shipping_method.oneOf.0.contract_provider.oneOf.0","typeLabel":"string"},{"type":"null","description":"Carrier contract used.","example":null,"uniqueKey":"shipping_method.oneOf.0.contract_provider.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_method.oneOf.0.contract_provider","typeLabel":"string | null"},"enable_multipackage":{"type":"boolean","description":"Whether multi-package shipments are enabled.","example":false,"uniqueKey":"shipping_method.oneOf.0.enable_multipackage","typeLabel":"boolean"},"non_working_days":{"type":"array","items":{"type":"integer","uniqueKey":"shipping_method.oneOf.0.non_working_days.items.[INDEX]","typeLabel":"integer"},"description":"Weekdays the carrier does not operate (0 = Sunday).","example":[0,6],"uniqueKey":"shipping_method.oneOf.0.non_working_days","typeLabel":"integer[]"},"dispatch_carrier_alias":{"oneOf":[{"type":"string","description":"Alias used at dispatch.","example":null,"uniqueKey":"shipping_method.oneOf.0.dispatch_carrier_alias.oneOf.0","typeLabel":"string"},{"type":"null","description":"Alias used at dispatch.","example":null,"uniqueKey":"shipping_method.oneOf.0.dispatch_carrier_alias.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_method.oneOf.0.dispatch_carrier_alias","typeLabel":"string | null"},"handles_fragile":{"type":"boolean","description":"Whether the carrier handles fragile goods.","example":false,"uniqueKey":"shipping_method.oneOf.0.handles_fragile","typeLabel":"boolean"},"multipackage_label_mode":{"type":"string","description":"How multi-package labels are produced.","enum":["per_package","bulk"],"example":"bulk","uniqueKey":"shipping_method.oneOf.0.multipackage_label_mode","typeLabel":"enum\u003cstring>"},"generates_label_per_package":{"type":"boolean","description":"Whether one label is generated per package.","example":false,"uniqueKey":"shipping_method.oneOf.0.generates_label_per_package","typeLabel":"boolean"},"carrier_supports_per_box_label":{"type":"boolean","description":"Whether the carrier mints one label per box at packing. Not in use yet.","example":false,"uniqueKey":"shipping_method.oneOf.0.carrier_supports_per_box_label","typeLabel":"boolean"}},"uniqueKey":"shipping_method.oneOf.0","typeLabel":"object"},{"type":"null","description":"Shipping method assigned to the order.","uniqueKey":"shipping_method.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_method","typeLabel":"object | null"},"order_lines":{"type":"array","description":"Lines of the order.","items":{"type":"object","description":"A line of an order (one SKU and its quantity).","properties":{"id":{"type":"integer","description":"Order line ID.","example":5551,"uniqueKey":"order_lines.items.[INDEX].id","typeLabel":"integer"},"name":{"oneOf":[{"type":"string","description":"Product name at the time of the order.","example":"Red T-shirt M","uniqueKey":"order_lines.items.[INDEX].name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Product name at the time of the order.","example":"Red T-shirt M","uniqueKey":"order_lines.items.[INDEX].name.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_lines.items.[INDEX].name","typeLabel":"string | null"},"sku":{"oneOf":[{"type":"string","description":"SKU ordered.","example":"SKU-RED-M","uniqueKey":"order_lines.items.[INDEX].sku.oneOf.0","typeLabel":"string"},{"type":"null","description":"SKU ordered.","example":"SKU-RED-M","uniqueKey":"order_lines.items.[INDEX].sku.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_lines.items.[INDEX].sku","typeLabel":"string | null"},"quantity":{"type":"integer","description":"Units ordered.","example":2,"uniqueKey":"order_lines.items.[INDEX].quantity","typeLabel":"integer"},"generated":{"type":"boolean","description":"True when Cubbo generated the line automatically (for example a kit component or a promotional insert).","example":false,"uniqueKey":"order_lines.items.[INDEX].generated","typeLabel":"boolean"},"price_per_item":{"oneOf":[{"type":"string","description":"Unit price as a decimal string.","example":"449.5","uniqueKey":"order_lines.items.[INDEX].price_per_item.oneOf.0","typeLabel":"string"},{"type":"null","description":"Unit price as a decimal string.","example":"449.5","uniqueKey":"order_lines.items.[INDEX].price_per_item.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_lines.items.[INDEX].price_per_item","typeLabel":"string | null"},"discount_per_item":{"oneOf":[{"type":"string","description":"Unit discount as a decimal string.","example":"0.0","uniqueKey":"order_lines.items.[INDEX].discount_per_item.oneOf.0","typeLabel":"string"},{"type":"null","description":"Unit discount as a decimal string.","example":"0.0","uniqueKey":"order_lines.items.[INDEX].discount_per_item.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_lines.items.[INDEX].discount_per_item","typeLabel":"string | null"},"product":{"oneOf":[{"type":"object","description":"The product behind the line, when included by the endpoint. `null` while the line's SKU does not exist in the store (an order created with an unknown SKU; see `POST /orders`).","properties":{"id":{"type":"integer","description":"Product ID.","example":777,"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.id","typeLabel":"integer"},"name":{"type":"string","description":"Product name.","example":"Red T-shirt M","uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.name","typeLabel":"string"},"billing_name":{"oneOf":[{"type":"string","description":"Name used on invoices.","example":"T-shirt","uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.billing_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Name used on invoices.","example":"T-shirt","uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.billing_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.billing_name","typeLabel":"string | null"},"description":{"oneOf":[{"type":"string","description":"Product description (HTML).","example":null,"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Product description (HTML).","example":null,"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.description.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.description","typeLabel":"string | null"},"has_imei":{"type":"boolean","description":"Whether units of this product carry an IMEI.","example":false,"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.has_imei","typeLabel":"boolean"},"is_fragile":{"type":"boolean","description":"Whether the product needs fragile handling.","example":false,"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.is_fragile","typeLabel":"boolean"},"is_kit":{"type":"boolean","description":"Whether the product is a kit of other products.","example":false,"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.is_kit","typeLabel":"boolean"},"bar_code":{"oneOf":[{"type":"string","description":"Barcode (UPC/EAN).","example":"7500000000001","uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.bar_code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Barcode (UPC/EAN).","example":"7500000000001","uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.bar_code.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.bar_code","typeLabel":"string | null"},"is_dropshipping":{"type":"boolean","description":"Whether the product is fulfilled by a third party.","example":false,"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.is_dropshipping","typeLabel":"boolean"},"is_scannable":{"type":"boolean","description":"Whether units are scanned during picking.","example":true,"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.is_scannable","typeLabel":"boolean"},"price":{"oneOf":[{"type":"string","description":"Product price as a decimal string.","example":"449.5","uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.price.oneOf.0","typeLabel":"string"},{"type":"null","description":"Product price as a decimal string.","example":"449.5","uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.price.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.price","typeLabel":"string | null"},"weight":{"oneOf":[{"type":"number","description":"Product weight.","example":0.3,"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.weight.oneOf.0","typeLabel":"number"},{"type":"null","description":"Product weight.","example":0.3,"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.weight.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.weight","typeLabel":"number | null"},"product_codes":{"type":"array","description":"SKUs registered for the product.","items":{"type":"object","properties":{"id":{"type":"integer","description":"Product code ID.","example":9001,"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.product_codes.items.[INDEX].id","typeLabel":"integer"},"sku":{"type":"string","description":"SKU.","example":"SKU-RED-M","uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.product_codes.items.[INDEX].sku","typeLabel":"string"}},"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.product_codes.items.[INDEX]","typeLabel":"object"},"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0.product_codes","typeLabel":"object[]"}},"uniqueKey":"order_lines.items.[INDEX].product.oneOf.0","typeLabel":"object"},{"type":"null","description":"The product behind the line, when included by the endpoint. `null` while the line's SKU does not exist in the store (an order created with an unknown SKU; see `POST /orders`).","uniqueKey":"order_lines.items.[INDEX].product.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_lines.items.[INDEX].product","typeLabel":"object | null"},"stock_units":{"type":"array","description":"Physical units assigned to the line, when included by the endpoint.","items":{"type":"object","description":"A physical unit assigned to an order line. In `GET /orders` only `id`, `imei` (when the product tracks IMEI) and `unit_code` (when requested by order number, for unit-code products in `packing`/`shipped`) are returned.","properties":{"id":{"type":"integer","description":"Stock unit ID.","example":31001,"uniqueKey":"order_lines.items.[INDEX].stock_units.items.[INDEX].id","typeLabel":"integer"},"status":{"type":"string","description":"Stock unit status.","example":"PICKED","uniqueKey":"order_lines.items.[INDEX].stock_units.items.[INDEX].status","typeLabel":"string"},"product_id":{"type":"integer","description":"Product ID of the unit.","example":777,"uniqueKey":"order_lines.items.[INDEX].stock_units.items.[INDEX].product_id","typeLabel":"integer"},"picked_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the unit was picked.","example":"2026-01-11T15:00:00.000Z","uniqueKey":"order_lines.items.[INDEX].stock_units.items.[INDEX].picked_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the unit was picked.","example":"2026-01-11T15:00:00.000Z","uniqueKey":"order_lines.items.[INDEX].stock_units.items.[INDEX].picked_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_lines.items.[INDEX].stock_units.items.[INDEX].picked_at","typeLabel":"string\u003cdate-time> | null"},"created_at":{"type":"string","format":"date-time","description":"Creation time.","example":"2025-12-01T10:00:00.000Z","uniqueKey":"order_lines.items.[INDEX].stock_units.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","description":"Last update time.","example":"2026-01-11T15:00:00.000Z","uniqueKey":"order_lines.items.[INDEX].stock_units.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"},"imei":{"type":"object","description":"IMEI of the unit, only for products that track IMEI.","properties":{"id":{"type":"integer","description":"IMEI record ID.","example":12,"uniqueKey":"order_lines.items.[INDEX].stock_units.items.[INDEX].imei.id","typeLabel":"integer"},"imei":{"type":"string","description":"The IMEI number.","example":"000000000000000","uniqueKey":"order_lines.items.[INDEX].stock_units.items.[INDEX].imei.imei","typeLabel":"string"}},"uniqueKey":"order_lines.items.[INDEX].stock_units.items.[INDEX].imei","typeLabel":"object"},"unit_code":{"type":"string","description":"Serial / unit code of the unit, only for products that require unit codes and only when the request filters by `order_number`.","example":"UC-0001","uniqueKey":"order_lines.items.[INDEX].stock_units.items.[INDEX].unit_code","typeLabel":"string"}},"uniqueKey":"order_lines.items.[INDEX].stock_units.items.[INDEX]","typeLabel":"object"},"uniqueKey":"order_lines.items.[INDEX].stock_units","typeLabel":"object[]"}},"uniqueKey":"order_lines.items.[INDEX]","typeLabel":"object"},"uniqueKey":"order_lines","typeLabel":"object[]"},"invoices":{"type":"array","description":"NF-e documents attached to the order (Brazil).","items":{"type":"object","description":"An NF-e (Brazilian electronic invoice) attached to an order. Fiscal events (cancellations, corrections) are not listed; only the documents themselves.","properties":{"id":{"type":"integer","description":"Invoice ID.","example":7801,"uniqueKey":"invoices.items.[INDEX].id","typeLabel":"integer"},"invoice_type":{"oneOf":[{"type":"string","description":"Where the invoice was issued. `WEBMANIA` and `BLING` are issued through Cubbo's fiscal integration; `IOTA` and `EXTERNAL` were issued by the client's own system; `WEBMANIA_CTE` / `WEBMANIA_NFSE` are transport and service documents.","enum":["WEBMANIA","SELIA_BR","WEBMANIA_CTE","WEBMANIA_NFSE","NATURA","BLING","IOTA","EXTERNAL",null],"example":"WEBMANIA","uniqueKey":"invoices.items.[INDEX].invoice_type.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Where the invoice was issued. `WEBMANIA` and `BLING` are issued through Cubbo's fiscal integration; `IOTA` and `EXTERNAL` were issued by the client's own system; `WEBMANIA_CTE` / `WEBMANIA_NFSE` are transport and service documents.","enum":["WEBMANIA","SELIA_BR","WEBMANIA_CTE","WEBMANIA_NFSE","NATURA","BLING","IOTA","EXTERNAL",null],"example":"WEBMANIA","uniqueKey":"invoices.items.[INDEX].invoice_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"invoices.items.[INDEX].invoice_type","typeLabel":"enum\u003cstring> | null"},"status":{"oneOf":[{"type":"string","description":"Fiscal status. `PREAPPROVED` means registered and awaiting confirmation from the fiscal provider.","enum":["APPROVED","REJECTED","CANCELLED","DENIED","PROCESSING","CONTINGENCY","PREAPPROVED",null],"example":"APPROVED","uniqueKey":"invoices.items.[INDEX].status.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Fiscal status. `PREAPPROVED` means registered and awaiting confirmation from the fiscal provider.","enum":["APPROVED","REJECTED","CANCELLED","DENIED","PROCESSING","CONTINGENCY","PREAPPROVED",null],"example":"APPROVED","uniqueKey":"invoices.items.[INDEX].status.oneOf.1","typeLabel":"null"}],"uniqueKey":"invoices.items.[INDEX].status","typeLabel":"enum\u003cstring> | null"},"invoiceable_id":{"type":"integer","description":"ID of the order the invoice belongs to.","example":987654,"uniqueKey":"invoices.items.[INDEX].invoiceable_id","typeLabel":"integer"},"invoiceable_type":{"type":"string","description":"Type of the document the invoice belongs to; `Order` here.","example":"Order","uniqueKey":"invoices.items.[INDEX].invoiceable_type","typeLabel":"string"},"operation_nature":{"oneOf":[{"type":"string","description":"Nature of the operation (natureza da operacao).","example":"Venda de mercadoria","uniqueKey":"invoices.items.[INDEX].operation_nature.oneOf.0","typeLabel":"string"},{"type":"null","description":"Nature of the operation (natureza da operacao).","example":"Venda de mercadoria","uniqueKey":"invoices.items.[INDEX].operation_nature.oneOf.1","typeLabel":"null"}],"uniqueKey":"invoices.items.[INDEX].operation_nature","typeLabel":"string | null"},"operation_type":{"oneOf":[{"type":"string","description":"Direction of the operation, as sent when the invoice was attached: `SAIDA`/`ENTRADA` or `OUTGOING`/`INCOMING`.","example":"OUTGOING","uniqueKey":"invoices.items.[INDEX].operation_type.oneOf.0","typeLabel":"string"},{"type":"null","description":"Direction of the operation, as sent when the invoice was attached: `SAIDA`/`ENTRADA` or `OUTGOING`/`INCOMING`.","example":"OUTGOING","uniqueKey":"invoices.items.[INDEX].operation_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"invoices.items.[INDEX].operation_type","typeLabel":"string | null"},"key":{"oneOf":[{"type":"string","description":"The 44-digit NF-e access key.","example":"00000000000000000000000000000000000000000000","uniqueKey":"invoices.items.[INDEX].key.oneOf.0","typeLabel":"string"},{"type":"null","description":"The 44-digit NF-e access key.","example":"00000000000000000000000000000000000000000000","uniqueKey":"invoices.items.[INDEX].key.oneOf.1","typeLabel":"null"}],"uniqueKey":"invoices.items.[INDEX].key","typeLabel":"string | null"},"xml_file":{"oneOf":[{"type":"object","description":"The authorized NF-e XML, or null if not yet available.","properties":{"path":{"type":"string","description":"Relative download path.","example":"/rails/active_storage/blobs/redirect/example/nfe.xml","uniqueKey":"invoices.items.[INDEX].xml_file.oneOf.0.path","typeLabel":"string"},"filename":{"type":"string","description":"File name.","example":"nfe.xml","uniqueKey":"invoices.items.[INDEX].xml_file.oneOf.0.filename","typeLabel":"string"},"byte_size":{"type":"integer","description":"Size in bytes.","example":10240,"uniqueKey":"invoices.items.[INDEX].xml_file.oneOf.0.byte_size","typeLabel":"integer"},"content_type":{"type":"string","description":"MIME type.","example":"application/xml","uniqueKey":"invoices.items.[INDEX].xml_file.oneOf.0.content_type","typeLabel":"string"},"url":{"type":"string","description":"Absolute download URL.","example":"https://api.cubbo.com/rails/active_storage/blobs/redirect/example/nfe.xml","uniqueKey":"invoices.items.[INDEX].xml_file.oneOf.0.url","typeLabel":"string"}},"uniqueKey":"invoices.items.[INDEX].xml_file.oneOf.0","typeLabel":"object"},{"type":"null","description":"The authorized NF-e XML, or null if not yet available.","uniqueKey":"invoices.items.[INDEX].xml_file.oneOf.1","typeLabel":"null"}],"uniqueKey":"invoices.items.[INDEX].xml_file","typeLabel":"object | null"},"pdf_file":{"oneOf":[{"type":"object","description":"The DANFE (printable invoice) PDF, or null if not yet available.","properties":{"path":{"type":"string","description":"Relative download path.","example":"/rails/active_storage/blobs/redirect/example/nfe.xml","uniqueKey":"invoices.items.[INDEX].pdf_file.oneOf.0.path","typeLabel":"string"},"filename":{"type":"string","description":"File name.","example":"nfe.xml","uniqueKey":"invoices.items.[INDEX].pdf_file.oneOf.0.filename","typeLabel":"string"},"byte_size":{"type":"integer","description":"Size in bytes.","example":10240,"uniqueKey":"invoices.items.[INDEX].pdf_file.oneOf.0.byte_size","typeLabel":"integer"},"content_type":{"type":"string","description":"MIME type.","example":"application/xml","uniqueKey":"invoices.items.[INDEX].pdf_file.oneOf.0.content_type","typeLabel":"string"},"url":{"type":"string","description":"Absolute download URL.","example":"https://api.cubbo.com/rails/active_storage/blobs/redirect/example/nfe.xml","uniqueKey":"invoices.items.[INDEX].pdf_file.oneOf.0.url","typeLabel":"string"}},"uniqueKey":"invoices.items.[INDEX].pdf_file.oneOf.0","typeLabel":"object"},{"type":"null","description":"The DANFE (printable invoice) PDF, or null if not yet available.","uniqueKey":"invoices.items.[INDEX].pdf_file.oneOf.1","typeLabel":"null"}],"uniqueKey":"invoices.items.[INDEX].pdf_file","typeLabel":"object | null"},"label_pdf_file":{"oneOf":[{"type":"object","description":"The DANFE in label format (DANFE etiqueta) PDF, or null if not available.","properties":{"path":{"type":"string","description":"Relative download path.","example":"/rails/active_storage/blobs/redirect/example/nfe.xml","uniqueKey":"invoices.items.[INDEX].label_pdf_file.oneOf.0.path","typeLabel":"string"},"filename":{"type":"string","description":"File name.","example":"nfe.xml","uniqueKey":"invoices.items.[INDEX].label_pdf_file.oneOf.0.filename","typeLabel":"string"},"byte_size":{"type":"integer","description":"Size in bytes.","example":10240,"uniqueKey":"invoices.items.[INDEX].label_pdf_file.oneOf.0.byte_size","typeLabel":"integer"},"content_type":{"type":"string","description":"MIME type.","example":"application/xml","uniqueKey":"invoices.items.[INDEX].label_pdf_file.oneOf.0.content_type","typeLabel":"string"},"url":{"type":"string","description":"Absolute download URL.","example":"https://api.cubbo.com/rails/active_storage/blobs/redirect/example/nfe.xml","uniqueKey":"invoices.items.[INDEX].label_pdf_file.oneOf.0.url","typeLabel":"string"}},"uniqueKey":"invoices.items.[INDEX].label_pdf_file.oneOf.0","typeLabel":"object"},{"type":"null","description":"The DANFE in label format (DANFE etiqueta) PDF, or null if not available.","uniqueKey":"invoices.items.[INDEX].label_pdf_file.oneOf.1","typeLabel":"null"}],"uniqueKey":"invoices.items.[INDEX].label_pdf_file","typeLabel":"object | null"}},"uniqueKey":"invoices.items.[INDEX]","typeLabel":"object"},"uniqueKey":"invoices","typeLabel":"object[]"},"store":{"oneOf":[{"type":"object","description":"Store the order belongs to.","properties":{"id":{"type":"integer","description":"Store ID.","example":1234,"uniqueKey":"store.oneOf.0.id","typeLabel":"integer"},"name":{"type":"string","description":"Store name.","example":"Example Store","uniqueKey":"store.oneOf.0.name","typeLabel":"string"}},"uniqueKey":"store.oneOf.0","typeLabel":"object"},{"type":"null","description":"Store the order belongs to.","uniqueKey":"store.oneOf.1","typeLabel":"null"}],"uniqueKey":"store","typeLabel":"object | null"},"channel_integration":{"oneOf":[{"type":"object","description":"Sales-channel integration the order came from.","properties":{"id":{"type":"integer","description":"Integration ID.","example":55,"uniqueKey":"channel_integration.oneOf.0.id","typeLabel":"integer"},"channel_type_name":{"type":"string","description":"Sales channel type (for example `shopify`, `vtex`, `woocommerce`, `meli`, `openapi`).","example":"shopify","uniqueKey":"channel_integration.oneOf.0.channel_type_name","typeLabel":"string"}},"uniqueKey":"channel_integration.oneOf.0","typeLabel":"object"},{"type":"null","description":"Sales-channel integration the order came from.","uniqueKey":"channel_integration.oneOf.1","typeLabel":"null"}],"uniqueKey":"channel_integration","typeLabel":"object | null"},"return":{"oneOf":[{"type":"object","description":"The return opened for this order, if any. Use `GET /returns/{return_id}` for the full return.","properties":{"id":{"type":"integer","description":"Return ID.","example":501,"uniqueKey":"return.oneOf.0.id","typeLabel":"integer"},"status":{"type":"string","description":"Return status.","example":"pending","uniqueKey":"return.oneOf.0.status","typeLabel":"string"},"return_type":{"type":"string","description":"Kind of return (for example a simple return or an exchange).","example":"SIMPLE_RETURN","uniqueKey":"return.oneOf.0.return_type","typeLabel":"string"},"notes":{"oneOf":[{"type":"string","description":"Notes attached to the return.","example":null,"uniqueKey":"return.oneOf.0.notes.oneOf.0","typeLabel":"string"},{"type":"null","description":"Notes attached to the return.","example":null,"uniqueKey":"return.oneOf.0.notes.oneOf.1","typeLabel":"null"}],"uniqueKey":"return.oneOf.0.notes","typeLabel":"string | null"},"created_at":{"type":"string","format":"date-time","description":"When the return was created.","example":"2026-01-20T10:00:00.000Z","uniqueKey":"return.oneOf.0.created_at","typeLabel":"string\u003cdate-time>"},"expected_products":{"oneOf":[{"type":"array","description":"Products expected back, as product ID and quantity.","items":{"type":"object","properties":{"product_id":{"type":"integer","description":"Product ID.","example":777,"uniqueKey":"return.oneOf.0.expected_products.oneOf.0.items.[INDEX].product_id","typeLabel":"integer"},"quantity":{"type":"integer","description":"Units expected.","example":1,"uniqueKey":"return.oneOf.0.expected_products.oneOf.0.items.[INDEX].quantity","typeLabel":"integer"}},"uniqueKey":"return.oneOf.0.expected_products.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"return.oneOf.0.expected_products.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Products expected back, as product ID and quantity.","items":{"type":"object","properties":{"product_id":{"type":"integer","description":"Product ID.","example":777},"quantity":{"type":"integer","description":"Units expected.","example":1}}},"uniqueKey":"return.oneOf.0.expected_products.oneOf.1","typeLabel":"null"}],"uniqueKey":"return.oneOf.0.expected_products","typeLabel":"object[] | null"}},"additionalProperties":true,"uniqueKey":"return.oneOf.0","typeLabel":"object"},{"type":"null","description":"The return opened for this order, if any. Use `GET /returns/{return_id}` for the full return.","uniqueKey":"return.oneOf.1","typeLabel":"null"}],"uniqueKey":"return","typeLabel":"object | null"},"created_by_return":{"oneOf":[{"type":"object","description":"The return that created this order (for exchanges), if any.","properties":{"id":{"type":"integer","description":"Return ID.","example":501,"uniqueKey":"created_by_return.oneOf.0.id","typeLabel":"integer"},"status":{"type":"string","description":"Return status.","example":"pending","uniqueKey":"created_by_return.oneOf.0.status","typeLabel":"string"},"return_type":{"type":"string","description":"Kind of return (for example a simple return or an exchange).","example":"SIMPLE_RETURN","uniqueKey":"created_by_return.oneOf.0.return_type","typeLabel":"string"},"notes":{"oneOf":[{"type":"string","description":"Notes attached to the return.","example":null,"uniqueKey":"created_by_return.oneOf.0.notes.oneOf.0","typeLabel":"string"},{"type":"null","description":"Notes attached to the return.","example":null,"uniqueKey":"created_by_return.oneOf.0.notes.oneOf.1","typeLabel":"null"}],"uniqueKey":"created_by_return.oneOf.0.notes","typeLabel":"string | null"},"created_at":{"type":"string","format":"date-time","description":"When the return was created.","example":"2026-01-20T10:00:00.000Z","uniqueKey":"created_by_return.oneOf.0.created_at","typeLabel":"string\u003cdate-time>"},"expected_products":{"oneOf":[{"type":"array","description":"Products expected back, as product ID and quantity.","items":{"type":"object","properties":{"product_id":{"type":"integer","description":"Product ID.","example":777,"uniqueKey":"created_by_return.oneOf.0.expected_products.oneOf.0.items.[INDEX].product_id","typeLabel":"integer"},"quantity":{"type":"integer","description":"Units expected.","example":1,"uniqueKey":"created_by_return.oneOf.0.expected_products.oneOf.0.items.[INDEX].quantity","typeLabel":"integer"}},"uniqueKey":"created_by_return.oneOf.0.expected_products.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"created_by_return.oneOf.0.expected_products.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Products expected back, as product ID and quantity.","items":{"type":"object","properties":{"product_id":{"type":"integer","description":"Product ID.","example":777},"quantity":{"type":"integer","description":"Units expected.","example":1}}},"uniqueKey":"created_by_return.oneOf.0.expected_products.oneOf.1","typeLabel":"null"}],"uniqueKey":"created_by_return.oneOf.0.expected_products","typeLabel":"object[] | null"}},"additionalProperties":true,"uniqueKey":"created_by_return.oneOf.0","typeLabel":"object"},{"type":"null","description":"The return that created this order (for exchanges), if any.","uniqueKey":"created_by_return.oneOf.1","typeLabel":"null"}],"uniqueKey":"created_by_return","typeLabel":"object | null"},"order_histories":{"type":"array","description":"Order timeline. Only returned by `GET /orders` with `include_event_history=true`.","items":{"type":"object","description":"An event in the order timeline (status change, tracking update, incident). `GET /orders` with `include_event_history=true` returns only `new_status`, `incident_description`, `timestamp` and `origin`.","properties":{"id":{"type":"integer","description":"Event ID.","example":120001,"uniqueKey":"order_histories.items.[INDEX].id","typeLabel":"integer"},"order_id":{"type":"integer","description":"Order ID.","example":987654,"uniqueKey":"order_histories.items.[INDEX].order_id","typeLabel":"integer"},"created_by_id":{"oneOf":[{"type":"integer","description":"ID of the user who triggered the event, if any.","example":null,"uniqueKey":"order_histories.items.[INDEX].created_by_id.oneOf.0","typeLabel":"integer"},{"type":"null","description":"ID of the user who triggered the event, if any.","example":null,"uniqueKey":"order_histories.items.[INDEX].created_by_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_histories.items.[INDEX].created_by_id","typeLabel":"integer | null"},"previous_status":{"oneOf":[{"type":"string","description":"Status before the event.","example":"packing","uniqueKey":"order_histories.items.[INDEX].previous_status.oneOf.0","typeLabel":"string"},{"type":"null","description":"Status before the event.","example":"packing","uniqueKey":"order_histories.items.[INDEX].previous_status.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_histories.items.[INDEX].previous_status","typeLabel":"string | null"},"new_status":{"oneOf":[{"type":"string","description":"Status after the event (an order status or a shipping status).","example":"shipped","uniqueKey":"order_histories.items.[INDEX].new_status.oneOf.0","typeLabel":"string"},{"type":"null","description":"Status after the event (an order status or a shipping status).","example":"shipped","uniqueKey":"order_histories.items.[INDEX].new_status.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_histories.items.[INDEX].new_status","typeLabel":"string | null"},"action":{"oneOf":[{"type":"string","description":"Kind of event (for example `order_status_update`, `tracking_update`, `cancel`).","example":"order_status_update","uniqueKey":"order_histories.items.[INDEX].action.oneOf.0","typeLabel":"string"},{"type":"null","description":"Kind of event (for example `order_status_update`, `tracking_update`, `cancel`).","example":"order_status_update","uniqueKey":"order_histories.items.[INDEX].action.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_histories.items.[INDEX].action","typeLabel":"string | null"},"metadata":{"oneOf":[{"type":"object","description":"Additional event data.","example":{},"uniqueKey":"order_histories.items.[INDEX].metadata.oneOf.0","typeLabel":"object"},{"type":"null","description":"Additional event data.","example":{},"uniqueKey":"order_histories.items.[INDEX].metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_histories.items.[INDEX].metadata","typeLabel":"object | null"},"origin":{"oneOf":[{"type":"string","description":"Who or what produced the event.","enum":["cubbo","integration_webhook","shipping_webhook","tracking_watcher","cubbo_user","cubbo_user_import","cubbo_user_api","cubbo_business_rule","awaiting_client_invoice","homolog_invoice_precheck","cubbo_automation","tracking_app","system_auto_coverage_retry","zapier","integration_api",null],"example":"shipping_webhook","uniqueKey":"order_histories.items.[INDEX].origin.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Who or what produced the event.","enum":["cubbo","integration_webhook","shipping_webhook","tracking_watcher","cubbo_user","cubbo_user_import","cubbo_user_api","cubbo_business_rule","awaiting_client_invoice","homolog_invoice_precheck","cubbo_automation","tracking_app","system_auto_coverage_retry","zapier","integration_api",null],"example":"shipping_webhook","uniqueKey":"order_histories.items.[INDEX].origin.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_histories.items.[INDEX].origin","typeLabel":"enum\u003cstring> | null"},"reference_timestamp":{"oneOf":[{"type":"string","format":"date-time","description":"When the event actually happened (for tracking events, the carrier's timestamp).","example":"2026-01-11T18:30:00.000Z","uniqueKey":"order_histories.items.[INDEX].reference_timestamp.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the event actually happened (for tracking events, the carrier's timestamp).","example":"2026-01-11T18:30:00.000Z","uniqueKey":"order_histories.items.[INDEX].reference_timestamp.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_histories.items.[INDEX].reference_timestamp","typeLabel":"string\u003cdate-time> | null"},"timestamp":{"oneOf":[{"type":"string","format":"date-time","description":"Same as `reference_timestamp`.","example":"2026-01-11T18:30:00.000Z","uniqueKey":"order_histories.items.[INDEX].timestamp.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"Same as `reference_timestamp`.","example":"2026-01-11T18:30:00.000Z","uniqueKey":"order_histories.items.[INDEX].timestamp.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_histories.items.[INDEX].timestamp","typeLabel":"string\u003cdate-time> | null"},"incident_description":{"oneOf":[{"type":"string","description":"Carrier description of the incident; only when `new_status` is `shipment_with_incident`.","example":null,"uniqueKey":"order_histories.items.[INDEX].incident_description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Carrier description of the incident; only when `new_status` is `shipment_with_incident`.","example":null,"uniqueKey":"order_histories.items.[INDEX].incident_description.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_histories.items.[INDEX].incident_description","typeLabel":"string | null"},"difal_error_description":{"oneOf":[{"type":"string","description":"Error message(s) from the DIFAL guide issuer; only for DIFAL error events (Brazil).","example":null,"uniqueKey":"order_histories.items.[INDEX].difal_error_description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Error message(s) from the DIFAL guide issuer; only for DIFAL error events (Brazil).","example":null,"uniqueKey":"order_histories.items.[INDEX].difal_error_description.oneOf.1","typeLabel":"null"}],"uniqueKey":"order_histories.items.[INDEX].difal_error_description","typeLabel":"string | null"},"created_by_cubbo_user":{"type":"boolean","description":"True when the event was triggered by Cubbo staff rather than a user of your account.","example":false,"uniqueKey":"order_histories.items.[INDEX].created_by_cubbo_user","typeLabel":"boolean"},"created_at":{"type":"string","format":"date-time","description":"When the event was recorded.","example":"2026-01-11T18:31:00.000Z","uniqueKey":"order_histories.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","description":"Last update of the event record.","example":"2026-01-11T18:31:00.000Z","uniqueKey":"order_histories.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"order_histories.items.[INDEX]","typeLabel":"object"},"uniqueKey":"order_histories","typeLabel":"object[]"},"warnings":{"type":"array","description":"Present only when the order was created with something it still needs from you. `UNIDENTIFIED_PRODUCT` lists, in `context.skus`, the SKUs not found in the store's catalog; the order waits with missing information until those products exist. `UNRECOGNIZED_CITY_CODE` gives, in `context.city_code`, the Colombian `shipping.city_code` Cubbo does not know; the order waits in `error` until you correct it with `PUT /orders/{id}`.","items":{"type":"object","required":["code","message","context"],"properties":{"code":{"type":"string","enum":["UNIDENTIFIED_PRODUCT","UNRECOGNIZED_CITY_CODE"],"example":"UNIDENTIFIED_PRODUCT","isRequired":true,"uniqueKey":"warnings.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","example":"skus SKU-UNKNOWN not found in Cubbo: the order was created with missing information until the products exist","isRequired":true,"uniqueKey":"warnings.items.[INDEX].message","typeLabel":"string"},"context":{"type":"object","properties":{"skus":{"type":"array","items":{"type":"string","uniqueKey":"warnings.items.[INDEX].context.skus.items.[INDEX]","typeLabel":"string"},"example":["SKU-UNKNOWN"],"uniqueKey":"warnings.items.[INDEX].context.skus","typeLabel":"string[]"},"city_code":{"type":"string","example":"99999","uniqueKey":"warnings.items.[INDEX].context.city_code","typeLabel":"string"}},"isRequired":true,"uniqueKey":"warnings.items.[INDEX].context","typeLabel":"object"}},"uniqueKey":"warnings.items.[INDEX]","typeLabel":"object"},"uniqueKey":"warnings","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"example":{"id":987654,"store_id":1234,"order_number":"ORD-0001","status":"initial","channel_created_at":"2026-10-12T15:04:05.000Z","order_date":"2026-10-12T15:04:05.000Z","shipping_date":null,"pending_at":null,"shipping_email":"buyer@example.com","shipping_status":null,"is_paid":true,"is_cod":false,"cod_amount":null,"requires_document_return":false,"requires_pickup_on_delivery":false,"has_carrier_insurance":false,"has_missing_info":false,"missing_info":null,"shipping_address_1":"Av. Reforma 123","currency":"MXN","total_price":"598.0","discount_price":"0.0","buyer_shipping_price":null,"extra_fees_price":null,"is_pick_and_ship":false,"is_b2b":false,"pick_n_ship_status":null,"return_shipping_labels":[],"shipping":{"first_name":"Jaime","last_name":"Carrera","company":null,"phone":"5555555555","address_1":"Av. Reforma 123","address_2":"Piso 4","email":"buyer@example.com","zip_code":"06600","country":"MX","state":"CDMX","city":"Ciudad de México","number":null,"interior_number":null,"neighborhood":null,"references":"Blue door","city_code":null},"billing":{"first_name":null,"last_name":null,"company":null,"phone":null,"tax_id":null,"tax_regime":null,"state_registration":null,"address_1":null,"address_2":null,"number":null,"interior_number":null,"neighborhood":null,"email":null,"zip_code":null,"country":null,"state":null,"city":null},"delivery_tracking":[{"shipping_number":null,"tracking_url":null,"cubbo_tracking_url":"https://tracking.cubbo.com/t/abc123","service_id":null,"shipping_status":null,"package_index":1,"total_packages":1}],"proof_of_delivery":null,"estimated_time_arrival":null,"delivered_at":null,"updated_at":"2026-10-12T15:04:05.000Z","is_click_and_collect":false,"click_and_collect_metadata":null,"latest_estimated_time_arrival_range":null,"channel_order_id":null,"channel_name":"openapi","channel_shipping_line_code":null,"warehouse_timezone":"America/Mexico_City","is_multi_package":false,"is_first_time_buyer":true,"is_subscription_renewal":false,"shipping_method":{"id":12,"shipping_name":"Estafeta Terrestre","is_active":true,"carrier_name":"ESTAFETA","shipping_type":"national","delivery_type":"Ground","country":"MX"},"order_lines":[{"id":55501,"name":"Red T-shirt M","sku":"SKU-RED-M","quantity":2,"generated":false,"price_per_item":"299.0","discount_per_item":"0.0"}]},"examples":{"Example":{"title":"Example","value":{"id":987654,"store_id":1234,"order_number":"ORD-0001","status":"initial","channel_created_at":"2026-10-12T15:04:05.000Z","order_date":"2026-10-12T15:04:05.000Z","shipping_date":null,"pending_at":null,"shipping_email":"buyer@example.com","shipping_status":null,"is_paid":true,"is_cod":false,"cod_amount":null,"requires_document_return":false,"requires_pickup_on_delivery":false,"has_carrier_insurance":false,"has_missing_info":false,"missing_info":null,"shipping_address_1":"Av. Reforma 123","currency":"MXN","total_price":"598.0","discount_price":"0.0","buyer_shipping_price":null,"extra_fees_price":null,"is_pick_and_ship":false,"is_b2b":false,"pick_n_ship_status":null,"return_shipping_labels":[],"shipping":{"first_name":"Jaime","last_name":"Carrera","company":null,"phone":"5555555555","address_1":"Av. Reforma 123","address_2":"Piso 4","email":"buyer@example.com","zip_code":"06600","country":"MX","state":"CDMX","city":"Ciudad de México","number":null,"interior_number":null,"neighborhood":null,"references":"Blue door","city_code":null},"billing":{"first_name":null,"last_name":null,"company":null,"phone":null,"tax_id":null,"tax_regime":null,"state_registration":null,"address_1":null,"address_2":null,"number":null,"interior_number":null,"neighborhood":null,"email":null,"zip_code":null,"country":null,"state":null,"city":null},"delivery_tracking":[{"shipping_number":null,"tracking_url":null,"cubbo_tracking_url":"https://tracking.cubbo.com/t/abc123","service_id":null,"shipping_status":null,"package_index":1,"total_packages":1}],"proof_of_delivery":null,"estimated_time_arrival":null,"delivered_at":null,"updated_at":"2026-10-12T15:04:05.000Z","is_click_and_collect":false,"click_and_collect_metadata":null,"latest_estimated_time_arrival_range":null,"channel_order_id":null,"channel_name":"openapi","channel_shipping_line_code":null,"warehouse_timezone":"America/Mexico_City","is_multi_package":false,"is_first_time_buyer":true,"is_subscription_renewal":false,"shipping_method":{"id":12,"shipping_name":"Estafeta Terrestre","is_active":true,"carrier_name":"ESTAFETA","shipping_type":"national","delivery_type":"Ground","country":"MX"},"order_lines":[{"id":55501,"name":"Red T-shirt M","sku":"SKU-RED-M","quantity":2,"generated":false,"price_per_item":"299.0","discount_per_item":"0.0"}]}}},"exampleType":"examples"}},"exampleType":"examples"},"c1cf7d8f-6918-473a-8406-5f0f722f09ec":{"description":"Missing or invalid token, wrong credentials, or no access to the requested store.","content":{"application/json":{"schema":{"type":"object","description":"Error body returned by every failed request.","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable description of the failure. For `401` responses it is always `Unauthorized`.","example":"Parameter store_id is required","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"message":{"type":"string","description":"Present on `401` responses only; the reason the request was rejected.","example":"invalid token","uniqueKey":"message","typeLabel":"string"},"code":{"oneOf":[{"type":"string","description":"Stable machine-readable code, present on some order, return and replenishment errors.","example":"ORDER_ALREADY_EXISTS","uniqueKey":"code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Stable machine-readable code, present on some order, return and replenishment errors.","example":"ORDER_ALREADY_EXISTS","uniqueKey":"code.oneOf.1","typeLabel":"null"}],"uniqueKey":"code","typeLabel":"string | null"},"context":{"oneOf":[{"type":"object","description":"Extra data about the failure when available, for example the id of the conflicting order.","additionalProperties":true,"example":{"order_id":987654},"uniqueKey":"context.oneOf.0","typeLabel":"object"},{"type":"null","description":"Extra data about the failure when available, for example the id of the conflicting order.","additionalProperties":true,"example":{"order_id":987654},"uniqueKey":"context.oneOf.1","typeLabel":"null"}],"uniqueKey":"context","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"invalidToken":{"title":"invalidToken","value":{"error":"Unauthorized","message":"invalid token"}},"noHeader":{"title":"noHeader","value":{"error":"Unauthorized","message":"no authorization header found"}},"storeNotAllowed":{"title":"storeNotAllowed","value":{"error":"Unauthorized","message":"not allowed to show? this Store"}}},"exampleType":"examples"}},"exampleType":"examples"},"b8a69301-a187-4c98-a3d9-5b855580037d":{"description":"Another request for the same order number is still being processed (or a previous one was interrupted; the lock expires on its own within a few minutes). Nothing was created by this request. Wait for the number of seconds in the `Retry-After` header and retry with the same payload; the retry converges on the real outcome.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","example":5}}},"content":{"application/json":{"schema":{"type":"object","required":["error","code"],"properties":{"error":{"type":"string","description":"Human-readable message naming the contended order number.","example":"another request for order ORD-0001 is already being processed, retry in 5 seconds","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","enum":["DUPLICATE_REQUEST_IN_FLIGHT"],"description":"Fixed code for this condition.","example":"DUPLICATE_REQUEST_IN_FLIGHT","isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"transaction_id":{"oneOf":[{"type":"string","description":"Identifier of the request currently holding the lock; useful when contacting support.","example":"c0ffee00-0000-4000-8000-000000000001","uniqueKey":"transaction_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Identifier of the request currently holding the lock; useful when contacting support.","example":"c0ffee00-0000-4000-8000-000000000001","uniqueKey":"transaction_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"transaction_id","typeLabel":"string | null"},"transaction_key":{"oneOf":[{"type":"string","description":"The lock key that was contended.","example":"api_create_orders:1234:ORD-0001","uniqueKey":"transaction_key.oneOf.0","typeLabel":"string"},{"type":"null","description":"The lock key that was contended.","example":"api_create_orders:1234:ORD-0001","uniqueKey":"transaction_key.oneOf.1","typeLabel":"null"}],"uniqueKey":"transaction_key","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":"another request for order ORD-0001 is already being processed, retry in 5 seconds","code":"DUPLICATE_REQUEST_IN_FLIGHT","transaction_id":"c0ffee00-0000-4000-8000-000000000001","transaction_key":"api_create_orders:1234:ORD-0001"},"examples":{"Example":{"title":"Example","value":{"error":"another request for order ORD-0001 is already being processed, retry in 5 seconds","code":"DUPLICATE_REQUEST_IN_FLIGHT","transaction_id":"c0ffee00-0000-4000-8000-000000000001","transaction_key":"api_create_orders:1234:ORD-0001"}}},"exampleType":"examples"}},"exampleType":"examples"},"544eb646-6cd9-4d91-a7e5-58e2486cd6a8":{"description":"Validation or business error. `code` identifies the failure when one is defined; `context` carries extra data for some codes (for example the existing `order_id` on `ORDER_ALREADY_EXISTS`).","content":{"application/json":{"schema":{"type":"object","description":"Error body of `POST /orders` and `POST /orders/create-and-ship`.","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable message.","example":"order with order_number ORD-0001 already exists with id 987654","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"oneOf":[{"type":"string","description":"Machine-readable code. `null` for parameter errors, empty string for business errors without a dedicated code; shipping-method lookups use the legacy codes `\"404\"` and `\"400\"`.","example":"ORDER_ALREADY_EXISTS","uniqueKey":"code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Machine-readable code. `null` for parameter errors, empty string for business errors without a dedicated code; shipping-method lookups use the legacy codes `\"404\"` and `\"400\"`.","example":"ORDER_ALREADY_EXISTS","uniqueKey":"code.oneOf.1","typeLabel":"null"}],"uniqueKey":"code","typeLabel":"string | null"},"context":{"oneOf":[{"type":"object","description":"Extra data for some codes, for example `{order_id}` on `ORDER_ALREADY_EXISTS`.","additionalProperties":true,"example":{"order_id":987654},"uniqueKey":"context.oneOf.0","typeLabel":"object"},{"type":"null","description":"Extra data for some codes, for example `{order_id}` on `ORDER_ALREADY_EXISTS`.","additionalProperties":true,"example":{"order_id":987654},"uniqueKey":"context.oneOf.1","typeLabel":"null"}],"uniqueKey":"context","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"missingParam":{"title":"missingParam","summary":"A required parameter is missing (any `param!` failure)","value":{"error":"Parameter store_id is required","code":null,"context":null}},"invalidParamType":{"title":"invalidParamType","summary":"A parameter has the wrong type","value":{"error":"'abc' is not a valid Integer","code":null,"context":null}},"codAmountNegative":{"title":"codAmountNegative","summary":"cod_amount below its minimum","value":{"error":"Parameter cod_amount cannot be less than 0","code":null,"context":null}},"brazilStore":{"title":"brazilStore","summary":"The store ships from Brazil","value":{"error":"store is from Brazil, use /brazil/orders endpoint","code":"","context":null}},"missingZipCode":{"title":"missingZipCode","value":{"error":"zip_code is required for this warehouse's country","code":"MISSING_ZIP_CODE","context":null}},"carrierInsuranceNotAvailable":{"title":"carrierInsuranceNotAvailable","value":{"error":"has_carrier_insurance is only available for stores in CL","code":"CARRIER_INSURANCE_NOT_AVAILABLE","context":null}},"codAmountNotAvailable":{"title":"codAmountNotAvailable","value":{"error":"cod_amount is only available for stores in CL. Cash on delivery elsewhere collects the order total.","code":"COD_AMOUNT_NOT_AVAILABLE","context":null}},"documentReturnNotAvailable":{"title":"documentReturnNotAvailable","value":{"error":"requires_document_return is only available for stores in CL.","code":"DOCUMENT_RETURN_NOT_AVAILABLE","context":null}},"pickupOnDeliveryNotAvailable":{"title":"pickupOnDeliveryNotAvailable","value":{"error":"requires_pickup_on_delivery is only available for stores in CL.","code":"PICKUP_ON_DELIVERY_NOT_AVAILABLE","context":null}},"pickupOnDeliveryB2b":{"title":"pickupOnDeliveryB2b","summary":"The order resolves to B2B (explicit is_b2b or a B2B-only store)","value":{"error":"requires_pickup_on_delivery is a D2C-only service.","code":"PICKUP_ON_DELIVERY_B2B_UNSUPPORTED","context":null}},"pickupOnDeliveryReturnMethodNotConfigured":{"title":"pickupOnDeliveryReturnMethodNotConfigured","value":{"error":"The dedicated Blue Express return method is not configured.","code":"PICKUP_ON_DELIVERY_RETURN_METHOD_NOT_CONFIGURED","context":null}},"documentReturnAndPickupExclusive":{"title":"documentReturnAndPickupExclusive","value":{"error":"requires_document_return and requires_pickup_on_delivery cannot be combined on the same order.","code":"DOCUMENT_RETURN_PICKUP_ON_DELIVERY_EXCLUSIVE","context":null}},"channelIntegrationNotFound":{"title":"channelIntegrationNotFound","summary":"Your API credentials are not linked to an API integration on this store","value":{"error":"Channel integration for openapi not found, contact support.","code":"","context":null}},"orderAlreadyExists":{"title":"orderAlreadyExists","value":{"error":"order with order_number ORD-0001 already exists with id 987654","code":"ORDER_ALREADY_EXISTS","context":{"order_id":987654}}},"shippingMethodMissing":{"title":"shippingMethodMissing","summary":"Neither shipping_method_id nor shipping_line_code was sent","value":{"error":"Information is missing, shipping_method_id or shipping_line_code","code":"400","context":null}},"skusMissing":{"title":"skusMissing","value":{"error":"Provide skus for all products","code":"","context":null}},"noSkus":{"title":"noSkus","value":{"error":"No skus provided","code":"","context":null}},"skuNotFound":{"title":"skuNotFound","summary":"A SKU is not in the store's catalog and the request has no channel_name","value":{"error":"skus SKU-UNKNOWN not found in Cubbo","code":"","context":null}},"unitCodeRequired":{"title":"unitCodeRequired","summary":"The product tracks personalized units, so each line needs a unit_code","value":{"error":"unit_code is required for sku SKU-RED-M: each unit belongs to one recipient","code":"UNIT_CODE_REQUIRED","context":null}},"personalizedUnitInKit":{"title":"personalizedUnitInKit","value":{"error":"sku KIT-01 is a kit holding a personalized unit, which cannot be ordered as a kit","code":"PERSONALIZED_UNIT_IN_KIT","context":null}},"invalidUnitCodeLine":{"title":"invalidUnitCodeLine","value":{"error":"unit_code needs a sale line of quantity 1 of a product that requires unit codes (sku SKU-RED-M)","code":"INVALID_UNIT_CODE_LINE","context":null}},"duplicateUnitCode":{"title":"duplicateUnitCode","value":{"error":"unit_code UC-0001 is requested twice","code":"DUPLICATE_UNIT_CODE","context":null}},"discountsExceedValue":{"title":"discountsExceedValue","summary":"The discounts are larger than what the products are worth, so the total would be negative","value":{"error":"discounts exceed the value of the products","code":"INVALID_PRODUCT_DISCOUNT","context":null}},"cncServiceCodeInvalid":{"title":"cncServiceCodeInvalid","value":{"error":"click_and_collect_service_code is invalid","code":"404","context":null}},"cncLocationNotConfirmed":{"title":"cncLocationNotConfirmed","value":{"error":"Couldn't confirm cnc location for CUBBOCNCEST001, try requesting a new cnc service code","code":"404","context":null}},"cncNoShippingMethod":{"title":"cncNoShippingMethod","value":{"error":"No shipping method found for click and collect with service code CUBBOCNCEST001, contact support","code":"404","context":null}},"shippingLineCodeNotFound":{"title":"shippingLineCodeNotFound","value":{"error":"No shipping configuration found with name 'Express' for this integration","code":"404","context":null}},"shippingMethodNoCoverage":{"title":"shippingMethodNoCoverage","value":{"error":"The shipping method ESTAFETA does not have coverage in this zip code, 06600","code":"404","context":null}},"internationalMethodOnDomesticOrder":{"title":"internationalMethodOnDomesticOrder","value":{"error":"The shipping method DHL is international and this order ships within MX. Assign a national shipping method.","code":"NATIONAL_SHIPPING_METHOD_EXPECTED","context":null}},"storeBusinessModelUnset":{"title":"storeBusinessModelUnset","summary":"The store is enabled for neither B2B nor D2C; contact support","value":{"error":"Store 1234 has neither b2b nor d2c enabled","code":"store_business_model_unset","context":{"store_id":1234,"b2b":false,"d2c":false}}},"shippingDocumentUrlUnreachable":{"title":"shippingDocumentUrlUnreachable","value":{"error":"Information is missing, unable to obtain pdf document from url: https://example.com/label.pdf. response: 404 Not Found","code":"400","context":null}},"shippingDocumentTypeInvalid":{"title":"shippingDocumentTypeInvalid","value":{"error":"Information is missing, The document type file is not valid.","code":"400","context":null}}},"exampleType":"examples"}},"exampleType":"examples"},"8412bf25-eb0e-4459-8957-67f7c0334b4a":{"description":"Unexpected error. Nothing was created; retry later or contact support.","content":{"application/json":{"schema":{"type":"object","description":"Error body returned by every failed request.","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable description of the failure. For `401` responses it is always `Unauthorized`.","example":"Parameter store_id is required","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"message":{"type":"string","description":"Present on `401` responses only; the reason the request was rejected.","example":"invalid token","uniqueKey":"message","typeLabel":"string"},"code":{"oneOf":[{"type":"string","description":"Stable machine-readable code, present on some order, return and replenishment errors.","example":"ORDER_ALREADY_EXISTS","uniqueKey":"code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Stable machine-readable code, present on some order, return and replenishment errors.","example":"ORDER_ALREADY_EXISTS","uniqueKey":"code.oneOf.1","typeLabel":"null"}],"uniqueKey":"code","typeLabel":"string | null"},"context":{"oneOf":[{"type":"object","description":"Extra data about the failure when available, for example the id of the conflicting order.","additionalProperties":true,"example":{"order_id":987654},"uniqueKey":"context.oneOf.0","typeLabel":"object"},{"type":"null","description":"Extra data about the failure when available, for example the id of the conflicting order.","additionalProperties":true,"example":{"order_id":987654},"uniqueKey":"context.oneOf.1","typeLabel":"null"}],"uniqueKey":"context","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":"unexpected error"},"examples":{"Example":{"title":"Example","value":{"error":"unexpected error"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"fd9426e4-1b23-49bf-bd70-529529e87cf4":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token returned by `POST /auth/token`, sent as `Authorization: Bearer \u003ctoken>`.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"30628f1a-73a6-48fb-b75f-22c715a140c8":{"url":"https://api.cubbo.com/v1","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token returned by `POST /auth/token`, sent as `Authorization: Bearer \u003ctoken>`.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Token returned by `POST /auth/token`, sent as `Authorization: Bearer \u003ctoken>`.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"cubbo","siteName":"Cubbo Developers","title":"Create an order - Cubbo Developers","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/orders/create-an-order","matchLevel":0},"es":{"href":"/api-reference/orders/create-an-order","matchLevel":0},"pt-BR":{"href":"/api-reference/orders/create-an-order","matchLevel":0}}},"lastModified":"2026-11-10T14:52:57.267Z","originalFileLocation":"api-reference/orders/create-an-order.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Creates a sales order for a store whose warehouse is in Mexico, Colombia, Chile or the United States, and queues it for processing. Use it for every non-Brazil store; a store served from a Brazil warehouse is refused and must use POST /brazil/orders. The request needs a store, a unique order_number per store, a recipient address, at least one product line and a way to pick the carrier: - shipping_line_code: the exact name of a shipping method you created in the Cubbo app (Integrations \u0026gt; Open API \u0026gt; Shipping Methods). Cubbo picks the carrier with the configuration assigned to it. - shipping_method_id: a specific Cubbo shipping method, taken from the shipping_method_id of an option returned by GET /shipping-methods/quote. - The order is returned immediately in its initial status. Address, coverage, stock and carrier validations run asynchronously; poll GET /orders and read status, has_missing_info and missing_info to learn whether it was accepted. - Every product is identified by SKU. Without channel_name, an unknown SKU rejects the whole request with 422. With channel_name (an order relayed from a sales channel), the order is created anyway: a line whose SKU is unknown keeps that SKU without a product, and the response lists those SKUs in warnings with the code UNIDENTIFIED_PRODUCT. Processing then leaves the order with missing information (status error; with include_event_history=true, GET /orders shows the code UNIDENTIFIED_PRODUCT in the error event) until the product exists. Creating the product or adding the SKU to an existing product in the Cubbo app processes the order again and the line takes the product; creating it with POST /products without variants does not trigger that reprocess today. - A line sent without price_per_item takes the product\u0026#x27;s price. On a line whose SKU is unknown there is no product price yet, so the line counts as zero in the order total, and so does its discount; once the product exists, the line takes the product\u0026#x27;s price and the order total is recomputed (a kit without its own price is worth its components). A product price smaller than the line\u0026#x27;s discount is not taken. Discounts larger than what the products are worth are rejected with 422 INVALID_PRODUCT_DISCOUNT. - A unit_code sent on a line whose SKU is unknown is kept. The line must still have quantity 1, and one SKU cannot name the same code twice: otherwise the request is rejected with 422, as for a known SKU. The rest is checked once the product exists: if the line can never be fulfilled (a kit, or a product that does not track unit codes and has no unit carrying that code), the order waits with missing information, code INVALID_UNIT_CODE_LINE; two lines whose SKUs turn out to be the same product and name the same code give DUPLICATE_UNIT_CODE on the later line. Correct the line by editing the order in the Cubbo app; PUT /orders/{id} does not replace the products of an order with a pinned line. - zip_code is mandatory when the warehouse is in Mexico (and Brazil); it is optional for Chile and Colombia. - Chile: when shipping.city cannot be identified (a misspelling, or a province instead of a city), an order sent with shipping_method_id is not refused. It is created and moves to error until you correct shipping.city with PUT /orders/{id} or in the Cubbo app, where the order shows the reason. An order that ships on your own label (Blue Express EX, with the label attached) continues normally. A shipping.city that is identified but not covered by the method is still refused with 422. - Colombia: carriers deliver by the DANE (DIVIPOLA) code of the destination city. Cubbo finds it from shipping.city and shipping.province, or you send it in shipping.city_code: when present, the code decides the destination and the city and province are not looked up. A 5-digit code (a municipality) stands for its main town; an 8-digit code is a populated center; a code missing its leading zero (4 or 7 digits) is completed. An order whose shipping.city_code Cubbo does not know is not refused: the response lists it in warnings with the code UNRECOGNIZED_CITY_CODE, and the order moves to error with that code (the code you sent is in additional_info.city_code) until you correct it with PUT /orders/{id}. Without city_code, an order sent with shipping_method_id whose city and province cannot be identified is still refused with 422. - Duplicate protection: an order_number that already exists in the store answers 422 with code ORDER_ALREADY_EXISTS and the existing order_id in context. While another request for the same store_id + order_number is still being processed you get 409 DUPLICATE_REQUEST_IN_FLIGHT with a Retry-After header; retry after that delay and you will converge on the real outcome (200, 422 or ORDER_ALREADY_EXISTS). - Complementary carrier services (has_carrier_insurance, cod_amount, requires_document_return, requires_pickup_on_delivery) are currently honoured only for stores with a warehouse in Chile; sending true (or a non-zero amount) from any other country is refused with a typed error code rather than silently ignored. - Click and collect: send is_click_and_collect: true and the click_and_collect_service_code you obtained from GET /carrier-services/pickup-locations. Cubbo replaces the shipping method you sent with the pickup carrier\u0026#x27;s method. A full shipping address is still required. - is_b2b only matters for stores enabled for both B2B and D2C (\u0026quot;mixed\u0026quot;); omit it to create a consumer (D2C) order. Stores enabled for a single model always get that model. - Error bodies on this endpoint carry an error message plus a machine-readable code (empty string or null when the error has no code) and an optional context object.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Cubbo Developers\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create an order - Cubbo Developers\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a sales order for a store whose warehouse is in Mexico, Colombia, Chile or the United States, and queues it for processing. Use it for every non-Brazil store; a store served from a Brazil warehouse is refused and must use POST /brazil/orders. The request needs a store, a unique order_number per store, a recipient address, at least one product line and a way to pick the carrier: - shipping_line_code: the exact name of a shipping method you created in the Cubbo app (Integrations \u0026gt; Open API \u0026gt; Shipping Methods). Cubbo picks the carrier with the configuration assigned to it. - shipping_method_id: a specific Cubbo shipping method, taken from the shipping_method_id of an option returned by GET /shipping-methods/quote. - The order is returned immediately in its initial status. Address, coverage, stock and carrier validations run asynchronously; poll GET /orders and read status, has_missing_info and missing_info to learn whether it was accepted. - Every product is identified by SKU. Without channel_name, an unknown SKU rejects the whole request with 422. With channel_name (an order relayed from a sales channel), the order is created anyway: a line whose SKU is unknown keeps that SKU without a product, and the response lists those SKUs in warnings with the code UNIDENTIFIED_PRODUCT. Processing then leaves the order with missing information (status error; with include_event_history=true, GET /orders shows the code UNIDENTIFIED_PRODUCT in the error event) until the product exists. Creating the product or adding the SKU to an existing product in the Cubbo app processes the order again and the line takes the product; creating it with POST /products without variants does not trigger that reprocess today. - A line sent without price_per_item takes the product\u0026#x27;s price. On a line whose SKU is unknown there is no product price yet, so the line counts as zero in the order total, and so does its discount; once the product exists, the line takes the product\u0026#x27;s price and the order total is recomputed (a kit without its own price is worth its components). A product price smaller than the line\u0026#x27;s discount is not taken. Discounts larger than what the products are worth are rejected with 422 INVALID_PRODUCT_DISCOUNT. - A unit_code sent on a line whose SKU is unknown is kept. The line must still have quantity 1, and one SKU cannot name the same code twice: otherwise the request is rejected with 422, as for a known SKU. The rest is checked once the product exists: if the line can never be fulfilled (a kit, or a product that does not track unit codes and has no unit carrying that code), the order waits with missing information, code INVALID_UNIT_CODE_LINE; two lines whose SKUs turn out to be the same product and name the same code give DUPLICATE_UNIT_CODE on the later line. Correct the line by editing the order in the Cubbo app; PUT /orders/{id} does not replace the products of an order with a pinned line. - zip_code is mandatory when the warehouse is in Mexico (and Brazil); it is optional for Chile and Colombia. - Chile: when shipping.city cannot be identified (a misspelling, or a province instead of a city), an order sent with shipping_method_id is not refused. It is created and moves to error until you correct shipping.city with PUT /orders/{id} or in the Cubbo app, where the order shows the reason. An order that ships on your own label (Blue Express EX, with the label attached) continues normally. A shipping.city that is identified but not covered by the method is still refused with 422. - Colombia: carriers deliver by the DANE (DIVIPOLA) code of the destination city. Cubbo finds it from shipping.city and shipping.province, or you send it in shipping.city_code: when present, the code decides the destination and the city and province are not looked up. A 5-digit code (a municipality) stands for its main town; an 8-digit code is a populated center; a code missing its leading zero (4 or 7 digits) is completed. An order whose shipping.city_code Cubbo does not know is not refused: the response lists it in warnings with the code UNRECOGNIZED_CITY_CODE, and the order moves to error with that code (the code you sent is in additional_info.city_code) until you correct it with PUT /orders/{id}. Without city_code, an order sent with shipping_method_id whose city and province cannot be identified is still refused with 422. - Duplicate protection: an order_number that already exists in the store answers 422 with code ORDER_ALREADY_EXISTS and the existing order_id in context. While another request for the same store_id + order_number is still being processed you get 409 DUPLICATE_REQUEST_IN_FLIGHT with a Retry-After header; retry after that delay and you will converge on the real outcome (200, 422 or ORDER_ALREADY_EXISTS). - Complementary carrier services (has_carrier_insurance, cod_amount, requires_document_return, requires_pickup_on_delivery) are currently honoured only for stores with a warehouse in Chile; sending true (or a non-zero amount) from any other country is refused with a typed error code rather than silently ignored. - Click and collect: send is_click_and_collect: true and the click_and_collect_service_code you obtained from GET /carrier-services/pickup-locations. Cubbo replaces the shipping method you sent with the pickup carrier\u0026#x27;s method. A full shipping address is still required. - is_b2b only matters for stores enabled for both B2B and D2C (\u0026quot;mixed\u0026quot;); omit it to create a consumer (D2C) order. Stores enabled for a single model always get that model. - Error bodies on this endpoint carry an error message plus a machine-readable code (empty string or null when the error has no code) and an optional context object.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Cubbo Developers\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.cubbo.com/api-reference/orders/create-an-order\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cubbo.mintlify.site/_mintlify/api/og/v2?division=Orders\u0026amp;title=Create+an+order\u0026amp;description=Creates+a+sales+order+for+a+store+whose+warehouse+is+in+Mexico%2C+Colombia%2C+Chile+or+the%0AUnited+States%2C+and+queues+it+for+processing.+Use+it+for+every+non-Brazil+\u0026amp;theme=43761a2dfbeb2a4d767b8dde\u0026amp;signature=de340e8b8ea52b36cd98b11eb38b19382e31f0239b5d083fe3343711f17413c0\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create an order - Cubbo Developers\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a sales order for a store whose warehouse is in Mexico, Colombia, Chile or the United States, and queues it for processing. Use it for every non-Brazil store; a store served from a Brazil warehouse is refused and must use POST /brazil/orders. The request needs a store, a unique order_number per store, a recipient address, at least one product line and a way to pick the carrier: - shipping_line_code: the exact name of a shipping method you created in the Cubbo app (Integrations \u0026gt; Open API \u0026gt; Shipping Methods). Cubbo picks the carrier with the configuration assigned to it. - shipping_method_id: a specific Cubbo shipping method, taken from the shipping_method_id of an option returned by GET /shipping-methods/quote. - The order is returned immediately in its initial status. Address, coverage, stock and carrier validations run asynchronously; poll GET /orders and read status, has_missing_info and missing_info to learn whether it was accepted. - Every product is identified by SKU. Without channel_name, an unknown SKU rejects the whole request with 422. With channel_name (an order relayed from a sales channel), the order is created anyway: a line whose SKU is unknown keeps that SKU without a product, and the response lists those SKUs in warnings with the code UNIDENTIFIED_PRODUCT. Processing then leaves the order with missing information (status error; with include_event_history=true, GET /orders shows the code UNIDENTIFIED_PRODUCT in the error event) until the product exists. Creating the product or adding the SKU to an existing product in the Cubbo app processes the order again and the line takes the product; creating it with POST /products without variants does not trigger that reprocess today. - A line sent without price_per_item takes the product\u0026#x27;s price. On a line whose SKU is unknown there is no product price yet, so the line counts as zero in the order total, and so does its discount; once the product exists, the line takes the product\u0026#x27;s price and the order total is recomputed (a kit without its own price is worth its components). A product price smaller than the line\u0026#x27;s discount is not taken. Discounts larger than what the products are worth are rejected with 422 INVALID_PRODUCT_DISCOUNT. - A unit_code sent on a line whose SKU is unknown is kept. The line must still have quantity 1, and one SKU cannot name the same code twice: otherwise the request is rejected with 422, as for a known SKU. The rest is checked once the product exists: if the line can never be fulfilled (a kit, or a product that does not track unit codes and has no unit carrying that code), the order waits with missing information, code INVALID_UNIT_CODE_LINE; two lines whose SKUs turn out to be the same product and name the same code give DUPLICATE_UNIT_CODE on the later line. Correct the line by editing the order in the Cubbo app; PUT /orders/{id} does not replace the products of an order with a pinned line. - zip_code is mandatory when the warehouse is in Mexico (and Brazil); it is optional for Chile and Colombia. - Chile: when shipping.city cannot be identified (a misspelling, or a province instead of a city), an order sent with shipping_method_id is not refused. It is created and moves to error until you correct shipping.city with PUT /orders/{id} or in the Cubbo app, where the order shows the reason. An order that ships on your own label (Blue Express EX, with the label attached) continues normally. A shipping.city that is identified but not covered by the method is still refused with 422. - Colombia: carriers deliver by the DANE (DIVIPOLA) code of the destination city. Cubbo finds it from shipping.city and shipping.province, or you send it in shipping.city_code: when present, the code decides the destination and the city and province are not looked up. A 5-digit code (a municipality) stands for its main town; an 8-digit code is a populated center; a code missing its leading zero (4 or 7 digits) is completed. An order whose shipping.city_code Cubbo does not know is not refused: the response lists it in warnings with the code UNRECOGNIZED_CITY_CODE, and the order moves to error with that code (the code you sent is in additional_info.city_code) until you correct it with PUT /orders/{id}. Without city_code, an order sent with shipping_method_id whose city and province cannot be identified is still refused with 422. - Duplicate protection: an order_number that already exists in the store answers 422 with code ORDER_ALREADY_EXISTS and the existing order_id in context. While another request for the same store_id + order_number is still being processed you get 409 DUPLICATE_REQUEST_IN_FLIGHT with a Retry-After header; retry after that delay and you will converge on the real outcome (200, 422 or ORDER_ALREADY_EXISTS). - Complementary carrier services (has_carrier_insurance, cod_amount, requires_document_return, requires_pickup_on_delivery) are currently honoured only for stores with a warehouse in Chile; sending true (or a non-zero amount) from any other country is refused with a typed error code rather than silently ignored. - Click and collect: send is_click_and_collect: true and the click_and_collect_service_code you obtained from GET /carrier-services/pickup-locations. Cubbo replaces the shipping method you sent with the pickup carrier\u0026#x27;s method. A full shipping address is still required. - is_b2b only matters for stores enabled for both B2B and D2C (\u0026quot;mixed\u0026quot;); omit it to create a consumer (D2C) order. Stores enabled for a single model always get that model. - Error bodies on this endpoint carry an error message plus a machine-readable code (empty string or null when the error has no code) and an optional context object.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cubbo.mintlify.site/_mintlify/api/og/v2?division=Orders\u0026amp;title=Create+an+order\u0026amp;description=Creates+a+sales+order+for+a+store+whose+warehouse+is+in+Mexico%2C+Colombia%2C+Chile+or+the%0AUnited+States%2C+and+queues+it+for+processing.+Use+it+for+every+non-Brazil+\u0026amp;theme=43761a2dfbeb2a4d767b8dde\u0026amp;signature=de340e8b8ea52b36cd98b11eb38b19382e31f0239b5d083fe3343711f17413c0\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Cubbo Developers\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#327cfb\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.cubbo.com/api-reference/orders/create-an-order\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/orders/create-an-order.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.cubbo.com/#organization\",\"name\":\"Cubbo Developers\",\"url\":\"https://developers.cubbo.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cubbo/RGfmvgvbM1HVXepF/logo/light.svg?fit=max\u0026auto=format\u0026n=RGfmvgvbM1HVXepF\u0026q=85\u0026s=208df5125f7962b06468c3c835605bd0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developers.cubbo.com#website\",\"name\":\"Cubbo Developers\",\"url\":\"https://developers.cubbo.com\",\"publisher\":{\"@id\":\"https://developers.cubbo.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.cubbo.com/api-reference/orders/create-an-order#webpage\",\"url\":\"https://developers.cubbo.com/api-reference/orders/create-an-order\",\"name\":\"Create an order\",\"description\":\"Creates a sales order for a store whose warehouse is in Mexico, Colombia, Chile or the United States, and queues it for processing. Use it for every non-Brazil store; a store served from a Brazil warehouse is refused and must use POST /brazil/orders. The request needs a store, a unique order_number per store, a recipient address, at least one product line and a way to pick the carrier: - shipping_line_code: the exact name of a shipping method you created in the Cubbo app (Integrations > Open API > Shipping Methods). Cubbo picks the carrier with the configuration assigned to it. - shipping_method_id: a specific Cubbo shipping method, taken from the shipping_method_id of an option returned by GET /shipping-methods/quote. - The order is returned immediately in its initial status. Address, coverage, stock and carrier validations run asynchronously; poll GET /orders and read status, has_missing_info and missing_info to learn whether it was accepted. - Every product is identified by SKU. Without channel_name, an unknown SKU rejects the whole request with 422. With channel_name (an order relayed from a sales channel), the order is created anyway: a line whose SKU is unknown keeps that SKU without a product, and the response lists those SKUs in warnings with the code UNIDENTIFIED_PRODUCT. Processing then leaves the order with missing information (status error; with include_event_history=true, GET /orders shows the code UNIDENTIFIED_PRODUCT in the error event) until the product exists. Creating the product or adding the SKU to an existing product in the Cubbo app processes the order again and the line takes the product; creating it with POST /products without variants does not trigger that reprocess today. - A line sent without price_per_item takes the product's price. On a line whose SKU is unknown there is no product price yet, so the line counts as zero in the order total, and so does its discount; once the product exists, the line takes the product's price and the order total is recomputed (a kit without its own price is worth its components). A product price smaller than the line's discount is not taken. Discounts larger than what the products are worth are rejected with 422 INVALID_PRODUCT_DISCOUNT. - A unit_code sent on a line whose SKU is unknown is kept. The line must still have quantity 1, and one SKU cannot name the same code twice: otherwise the request is rejected with 422, as for a known SKU. The rest is checked once the product exists: if the line can never be fulfilled (a kit, or a product that does not track unit codes and has no unit carrying that code), the order waits with missing information, code INVALID_UNIT_CODE_LINE; two lines whose SKUs turn out to be the same product and name the same code give DUPLICATE_UNIT_CODE on the later line. Correct the line by editing the order in the Cubbo app; PUT /orders/{id} does not replace the products of an order with a pinned line. - zip_code is mandatory when the warehouse is in Mexico (and Brazil); it is optional for Chile and Colombia. - Chile: when shipping.city cannot be identified (a misspelling, or a province instead of a city), an order sent with shipping_method_id is not refused. It is created and moves to error until you correct shipping.city with PUT /orders/{id} or in the Cubbo app, where the order shows the reason. An order that ships on your own label (Blue Express EX, with the label attached) continues normally. A shipping.city that is identified but not covered by the method is still refused with 422. - Colombia: carriers deliver by the DANE (DIVIPOLA) code of the destination city. Cubbo finds it from shipping.city and shipping.province, or you send it in shipping.city_code: when present, the code decides the destination and the city and province are not looked up. A 5-digit code (a municipality) stands for its main town; an 8-digit code is a populated center; a code missing its leading zero (4 or 7 digits) is completed. An order whose shipping.city_code Cubbo does not know is not refused: the response lists it in warnings with the code UNRECOGNIZED_CITY_CODE, and the order moves to error with that code (the code you sent is in additional_info.city_code) until you correct it with PUT /orders/{id}. Without city_code, an order sent with shipping_method_id whose city and province cannot be identified is still refused with 422. - Duplicate protection: an order_number that already exists in the store answers 422 with code ORDER_ALREADY_EXISTS and the existing order_id in context. While another request for the same store_id + order_number is still being processed you get 409 DUPLICATE_REQUEST_IN_FLIGHT with a Retry-After header; retry after that delay and you will converge on the real outcome (200, 422 or ORDER_ALREADY_EXISTS). - Complementary carrier services (has_carrier_insurance, cod_amount, requires_document_return, requires_pickup_on_delivery) are currently honoured only for stores with a warehouse in Chile; sending true (or a non-zero amount) from any other country is refused with a typed error code rather than silently ignored. - Click and collect: send is_click_and_collect: true and the click_and_collect_service_code you obtained from GET /carrier-services/pickup-locations. Cubbo replaces the shipping method you sent with the pickup carrier's method. A full shipping address is still required. - is_b2b only matters for stores enabled for both B2B and D2C (\\\"mixed\\\"); omit it to create a consumer (D2C) order. Stores enabled for a single model always get that model. - Error bodies on this endpoint carry an error message plus a machine-readable code (empty string or null when the error has no code) and an optional context object.\",\"dateModified\":\"2026-11-10T14:52:57.267Z\",\"isPartOf\":{\"@id\":\"https://developers.cubbo.com#website\"},\"breadcrumb\":{\"@id\":\"https://developers.cubbo.com/api-reference/orders/create-an-order#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.cubbo.com/api-reference/orders/create-an-order#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Orders\",\"item\":\"https://developers.cubbo.com/api-reference/orders/create-an-order-for-a-brazil-store\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create an order\",\"item\":\"https://developers.cubbo.com/api-reference/orders/create-an-order\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://developers.cubbo.com/api-reference/orders/create-an-order#apireference\",\"headline\":\"Create an order\",\"name\":\"Create an order\",\"description\":\"Creates a sales order for a store whose warehouse is in Mexico, Colombia, Chile or the United States, and queues it for processing. Use it for every non-Brazil store; a store served from a Brazil warehouse is refused and must use POST /brazil/orders. The request needs a store, a unique order_number per store, a recipient address, at least one product line and a way to pick the carrier: - shipping_line_code: the exact name of a shipping method you created in the Cubbo app (Integrations > Open API > Shipping Methods). Cubbo picks the carrier with the configuration assigned to it. - shipping_method_id: a specific Cubbo shipping method, taken from the shipping_method_id of an option returned by GET /shipping-methods/quote. - The order is returned immediately in its initial status. Address, coverage, stock and carrier validations run asynchronously; poll GET /orders and read status, has_missing_info and missing_info to learn whether it was accepted. - Every product is identified by SKU. Without channel_name, an unknown SKU rejects the whole request with 422. With channel_name (an order relayed from a sales channel), the order is created anyway: a line whose SKU is unknown keeps that SKU without a product, and the response lists those SKUs in warnings with the code UNIDENTIFIED_PRODUCT. Processing then leaves the order with missing information (status error; with include_event_history=true, GET /orders shows the code UNIDENTIFIED_PRODUCT in the error event) until the product exists. Creating the product or adding the SKU to an existing product in the Cubbo app processes the order again and the line takes the product; creating it with POST /products without variants does not trigger that reprocess today. - A line sent without price_per_item takes the product's price. On a line whose SKU is unknown there is no product price yet, so the line counts as zero in the order total, and so does its discount; once the product exists, the line takes the product's price and the order total is recomputed (a kit without its own price is worth its components). A product price smaller than the line's discount is not taken. Discounts larger than what the products are worth are rejected with 422 INVALID_PRODUCT_DISCOUNT. - A unit_code sent on a line whose SKU is unknown is kept. The line must still have quantity 1, and one SKU cannot name the same code twice: otherwise the request is rejected with 422, as for a known SKU. The rest is checked once the product exists: if the line can never be fulfilled (a kit, or a product that does not track unit codes and has no unit carrying that code), the order waits with missing information, code INVALID_UNIT_CODE_LINE; two lines whose SKUs turn out to be the same product and name the same code give DUPLICATE_UNIT_CODE on the later line. Correct the line by editing the order in the Cubbo app; PUT /orders/{id} does not replace the products of an order with a pinned line. - zip_code is mandatory when the warehouse is in Mexico (and Brazil); it is optional for Chile and Colombia. - Chile: when shipping.city cannot be identified (a misspelling, or a province instead of a city), an order sent with shipping_method_id is not refused. It is created and moves to error until you correct shipping.city with PUT /orders/{id} or in the Cubbo app, where the order shows the reason. An order that ships on your own label (Blue Express EX, with the label attached) continues normally. A shipping.city that is identified but not covered by the method is still refused with 422. - Colombia: carriers deliver by the DANE (DIVIPOLA) code of the destination city. Cubbo finds it from shipping.city and shipping.province, or you send it in shipping.city_code: when present, the code decides the destination and the city and province are not looked up. A 5-digit code (a municipality) stands for its main town; an 8-digit code is a populated center; a code missing its leading zero (4 or 7 digits) is completed. An order whose shipping.city_code Cubbo does not know is not refused: the response lists it in warnings with the code UNRECOGNIZED_CITY_CODE, and the order moves to error with that code (the code you sent is in additional_info.city_code) until you correct it with PUT /orders/{id}. Without city_code, an order sent with shipping_method_id whose city and province cannot be identified is still refused with 422. - Duplicate protection: an order_number that already exists in the store answers 422 with code ORDER_ALREADY_EXISTS and the existing order_id in context. While another request for the same store_id + order_number is still being processed you get 409 DUPLICATE_REQUEST_IN_FLIGHT with a Retry-After header; retry after that delay and you will converge on the real outcome (200, 422 or ORDER_ALREADY_EXISTS). - Complementary carrier services (has_carrier_insurance, cod_amount, requires_document_return, requires_pickup_on_delivery) are currently honoured only for stores with a warehouse in Chile; sending true (or a non-zero amount) from any other country is refused with a typed error code rather than silently ignored. - Click and collect: send is_click_and_collect: true and the click_and_collect_service_code you obtained from GET /carrier-services/pickup-locations. Cubbo replaces the shipping method you sent with the pickup carrier's method. A full shipping address is still required. - is_b2b only matters for stores enabled for both B2B and D2C (\\\"mixed\\\"); omit it to create a consumer (D2C) order. Stores enabled for a single model always get that model. - Error bodies on this endpoint carry an error message plus a machine-readable code (empty string or null when the error has no code) and an optional context object.\",\"url\":\"https://developers.cubbo.com/api-reference/orders/create-an-order\",\"mainEntityOfPage\":{\"@id\":\"https://developers.cubbo.com/api-reference/orders/create-an-order#webpage\"},\"dateModified\":\"2026-11-10T14:52:57.267Z\",\"publisher\":{\"@id\":\"https://developers.cubbo.com/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.cubbo.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Cubbo Developers\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Cubbo Developers\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/orders/create-an-order.md","siteName":"Cubbo Developers","nav":{"global":null,"languages":[{"language":"en","default":true,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API reference","groups":[{"group":"Authentication","pages":[{"title":"Obtain an access token","deprecated":null,"version":null,"openapi":"/openapi.yaml post /auth/token","href":"/api-reference/authentication/obtain-an-access-token"}]},{"group":"Orders","pages":[{"title":"Create an order for a Brazil store","deprecated":null,"version":null,"openapi":"/openapi.yaml post /brazil/orders","href":"/api-reference/orders/create-an-order-for-a-brazil-store"},{"title":"List orders","description":"Returns a paginated list of a store's orders with their order lines, invoices (NF-e, Brazil only),\nshipping method, delivery tracking and, optionally, the order's event history. Use it to sync order\nstatus and tracking into your own systems. Filter by status, order type, order number, buyer email\nor date ranges.\n\n- Results are paginated: `page` (default 1) and `per_page` (default 10, capped at 100). The `meta`\n object tells you whether more pages exist.\n- Filtering `status` by `processing` also returns orders in `picking` and `packing`, since all three\n mean \"being prepared in the warehouse\".\n- `order_number` accepts a single string or an array of strings (`order_number[]=ORD-0001\u0026order_number[]=ORD-0002`).\n When you filter by order number, stock units of products that use unit codes also expose their\n `unit_code` while the order is `packing` or `shipped`.\n- `sort_by` accepts any order field (for example `created_at`, `channel_created_at`, `shipping_date`,\n `updated_at`), or `shipping_methods.\u003cfield>` / `stores.\u003cfield>`; an unknown field returns 422\n `Field not found`. `sort` is `desc` unless you pass `asc`. Without `sort_by` the order of results is not guaranteed.\n- `include_event_history=true` adds `order_histories` to every order (status changes, tracking\n updates and incidents).\n- `is_b2b` is only present for stores that handle both B2B and D2C orders.\n- Each order in this list carries the subset of `Order` fields listed in the response schema\n description; the full `Order` object is returned by the create and update endpoints.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders","href":"/api-reference/orders/list-orders"},{"title":"Create an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders","href":"/api-reference/orders/create-an-order"},{"title":"Update an order","description":"Replaces the editable parts of an order that has not entered fulfillment yet: shipping and\nbilling addresses, payment flag, shipping method, product lines and client-uploaded shipping\ndocuments. After a successful update the order goes back to `initial` and is re-validated and\nre-processed by Cubbo, so the response shows the order as it was saved, not its final status.\n- Allowed only while the order is in `unpaid`, `empty`, `error`, `cancelation_window`,\n `awaiting_fulfillment_request`, `entirely_dropshipping`, `backorder`, `hold` or `pending`.\n An order still in `initial` has not been processed yet and is refused (retry later). Orders in\n `processing` or any later status cannot be updated with this endpoint.\n- On a pick-and-ship store an order that already generated its label cannot be modified.\n- Only the keys you send are changed. `shipping` and `billing`, when present, replace the whole\n address block (fields you omit become empty). `products`, when present and non-empty,\n replaces every order line with the list you send; each line keeps the price it was created\n with (a price sent here is ignored) and a product new to the order gets no price.\n- `products` cannot be sent for an order that has a line pinned to a unit code, and it cannot\n pin one (`unit_code` on a product is refused).\n- The D2C/B2B classification (`is_b2b`) is immutable: on a store that handles both models a\n value different from the order's is refused; on a single-model store it is ignored.\n- When you change `shipping` without sending `shipping_method_id`, an order created through a\n sales-channel integration with a shipping-method mapping gets its shipping method re-evaluated\n during re-processing, unless the order ships on the marketplace's own label.\n- Chile: when you send `shipping_method_id` and `shipping.city` cannot be\n identified, the update is still saved with the rest of your changes. The order goes back to\n `error` until `shipping.city` is corrected.\n- Colombia: unlike the other `shipping` fields, `shipping.city_code` is kept when you leave it\n out, unless the same update changes `shipping.city` or `shipping.province`; send it as `null`\n to clear it, and the city and province decide the destination again. A code Cubbo does not know is saved with the rest of your changes and the\n order goes back to `error` (`UNRECOGNIZED_CITY_CODE`) until it is corrected.\n- A marketplace order that ships on the marketplace's own label can only move to another\n marketplace-label shipping method; the refusal carries the code\n `MARKETPLACE_WITH_EXTERNAL_GUIDE` so you can tell it apart from a fixable validation error.\n- `shipping_documents`, when present, deletes every document previously uploaded by you\n (`document_type` other than `file`) and stores the new ones. Documents generated by Cubbo\n are kept. A label sent as a URL (`document_type: url`) is not downloaded on update: when\n the order already has its label, the URL is ignored and the order keeps its labels.\n- When the order's shipping method ships on your own label (an external guide), the order must\n still have a label after the update. If it has none and you do not send one (as `base64`),\n or your `shipping_documents` would replace it with none, the update is refused with\n `MISSING_EXTERNAL_LABEL` and nothing is changed; when the only label you sent was a URL,\n the code is `LABEL_URL_NOT_SUPPORTED_ON_UPDATE`. Send the label in the same request, or\n upload it first with `PATCH /orders/{id}/upload-shipping-documents`. A label still being\n fetched from the URL you sent when creating the order counts as present.\n- `channel_order_id` and `channel_name` are set when the order is created and cannot be changed\n here. Sending a value different from the order's own is refused with\n `UNSUPPORTED_UPDATE_FIELDS`; sending the order's current values (for example the order as\n returned by `GET /orders`) is accepted. Other keys this endpoint does not list are ignored.\n- Requires an API user with the \"orders update\" permission and access to the store. Note that\n a permission failure inside this action is currently answered with `500 unexpected error`\n rather than `401`.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml put /orders/{id}","href":"/api-reference/orders/update-an-order"},{"title":"Update shipping contact and address fields","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}","href":"/api-reference/orders/update-shipping-contact-and-address-fields"},{"title":"Put an order on hold","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}/hold","href":"/api-reference/orders/put-an-order-on-hold"},{"title":"Release an order from hold","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}/unhold","href":"/api-reference/orders/release-an-order-from-hold"},{"title":"Upload shipping documents to an order","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}/upload-shipping-documents","href":"/api-reference/orders/upload-shipping-documents-to-an-order"},{"title":"Attach NF-e invoices issued through Cubbo's fiscal integration","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/{order_id}/attach-invoice","href":"/api-reference/orders/attach-nf-e-invoices-issued-through-cubbos-fiscal-integration"},{"title":"List orders waiting for an NF-e","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/awaiting-invoice","href":"/api-reference/orders/list-orders-waiting-for-an-nf-e"},{"title":"Cancel an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/cancel","href":"/api-reference/orders/cancel-an-order"},{"title":"Create a pick-and-ship order and buy its labels","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/create-and-ship","href":"/api-reference/orders/create-a-pick-and-ship-order-and-buy-its-labels"},{"title":"Delete an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/delete","href":"/api-reference/orders/delete-an-order"},{"title":"List orders with selected fields","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/with-fields","href":"/api-reference/orders/list-orders-with-selected-fields"}]},{"group":"Click and collect","pages":[{"title":"List pickup locations near a postal code (public)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /carrier-services/pickup-locations","href":"/api-reference/click-and-collect/list-pickup-locations-near-a-postal-code-public"},{"title":"Convert an order to click and collect","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{order_id}/convert-to-click-and-collect","href":"/api-reference/click-and-collect/convert-an-order-to-click-and-collect"},{"title":"List click-and-collect pickup points eligible for an order","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/{order_id}/pickup-points","href":"/api-reference/click-and-collect/list-click-and-collect-pickup-points-eligible-for-an-order"}]},{"group":"Inventory","pages":[{"title":"List products with stock","deprecated":null,"version":null,"openapi":"/openapi.yaml get /inventory","href":"/api-reference/inventory/list-products-with-stock"},{"title":"Create a product","deprecated":null,"version":null,"openapi":"/openapi.yaml post /products","href":"/api-reference/inventory/create-a-product"},{"title":"Update a product","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /products/{id}","href":"/api-reference/inventory/update-a-product"}]},{"group":"Lots","pages":[{"title":"List the lots of a product","deprecated":null,"version":null,"openapi":"/openapi.yaml get /lots","href":"/api-reference/lots/list-the-lots-of-a-product"},{"title":"Put a lot on hold","deprecated":null,"version":null,"openapi":"/openapi.yaml post /lots/hold/store/{store_id}","href":"/api-reference/lots/put-a-lot-on-hold"},{"title":"Release a lot from hold","deprecated":null,"version":null,"openapi":"/openapi.yaml post /lots/unhold/store/{store_id}","href":"/api-reference/lots/release-a-lot-from-hold"},{"title":"Create a lot or update its expiration date","deprecated":null,"version":null,"openapi":"/openapi.yaml post /lots/upsert","href":"/api-reference/lots/create-a-lot-or-update-its-expiration-date"}]},{"group":"Shipping labels","pages":[{"title":"List an order's shipping labels","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/{order_id}/shipping-labels","href":"/api-reference/shipping-labels/list-an-orders-shipping-labels"},{"title":"Get a shipping label","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-labels/{shipping_label_id}","href":"/api-reference/shipping-labels/get-a-shipping-label"}]},{"group":"Replenishments","pages":[{"title":"Create a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml post /replenishments","href":"/api-reference/replenishments/create-a-replenishment"},{"title":"Get a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml get /replenishments/{replenishment_id}","href":"/api-reference/replenishments/get-a-replenishment"},{"title":"Update a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /replenishments/{replenishment_id}","href":"/api-reference/replenishments/update-a-replenishment"},{"title":"Attach an NF-e issued through Cubbo's Brazilian invoicing provider","deprecated":null,"version":null,"openapi":"/openapi.yaml post /replenishments/{replenishment_id}/attach-invoice","href":"/api-reference/replenishments/attach-an-nf-e-issued-through-cubbos-brazilian-invoicing-provider"},{"title":"Record or clear an invoice issuing error","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /replenishments/{replenishment_id}/invoice-issuing-error","href":"/api-reference/replenishments/record-or-clear-an-invoice-issuing-error"},{"title":"Get the variance report of a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml get /replenishments/{replenishment_id}/variance-report","href":"/api-reference/replenishments/get-the-variance-report-of-a-replenishment"}]},{"group":"Reports","pages":[{"title":"Inventory transactions report","deprecated":null,"version":null,"openapi":"/openapi.yaml get /reports/inventory-transactions","href":"/api-reference/reports/inventory-transactions-report"}]},{"group":"Returns","pages":[{"title":"Request a return for a shipped order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns","href":"/api-reference/returns/request-a-return-for-a-shipped-order"},{"title":"Get a return","deprecated":null,"version":null,"openapi":"/openapi.yaml get /returns/{return_id}","href":"/api-reference/returns/get-a-return"},{"title":"Register the inbound NF-e issued for a return (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns/{return_id}/attach-invoice","href":"/api-reference/returns/register-the-inbound-nf-e-issued-for-a-return-brazil"},{"title":"Cancel a pending return","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /returns/{return_id}/cancel","href":"/api-reference/returns/cancel-a-pending-return"},{"title":"Decide what to do with an order returned by the carrier","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns/{return_id}/decision","href":"/api-reference/returns/decide-what-to-do-with-an-order-returned-by-the-carrier"},{"title":"List returns that still need an inbound NF-e (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /returns/awaiting-invoice","href":"/api-reference/returns/list-returns-that-still-need-an-inbound-nf-e-brazil"}]},{"group":"Shipping methods","pages":[{"title":"List active shipping methods available to a store","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-methods","href":"/api-reference/shipping-methods/list-active-shipping-methods-available-to-a-store"},{"title":"Check which shipping method a shipping configuration would select for a postcode","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-methods/configuration-coverage","href":"/api-reference/shipping-methods/check-which-shipping-method-a-shipping-configuration-would-select-for-a-postcode"},{"title":"Quote shipping options for a destination and package","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-methods/quote","href":"/api-reference/shipping-methods/quote-shipping-options-for-a-destination-and-package"}]},{"group":"Stores","pages":[{"title":"Update your own store","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /store","href":"/api-reference/stores/update-your-own-store"},{"title":"Upload the store's digital certificate and set NF-e numbering (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /store/digital-certificate","href":"/api-reference/stores/upload-the-stores-digital-certificate-and-set-nf-e-numbering-brazil"},{"title":"Provision the store's fiscal account (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /store/fiscal-account","href":"/api-reference/stores/provision-the-stores-fiscal-account-brazil"},{"title":"Create a store from an existing one","deprecated":null,"version":null,"openapi":"/openapi.yaml post /stores","href":"/api-reference/stores/create-a-store-from-an-existing-one"}]},{"group":"Webhooks","pages":[{"title":"Order status changed","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook orderUpdated","href":"/api-reference/webhooks/order-status-changed"},{"title":"Order shipped fulfilled","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook orderFulfilled","href":"/api-reference/webhooks/order-shipped-fulfilled"},{"title":"Carrier tracking status changed","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook shippingUpdated","href":"/api-reference/webhooks/carrier-tracking-status-changed"},{"title":"Inventory snapshot after a stock movement","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook inventoryMovement","href":"/api-reference/webhooks/inventory-snapshot-after-a-stock-movement"},{"title":"Replenishment announced","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook replenishmentCreated","href":"/api-reference/webhooks/replenishment-announced"},{"title":"Replenishment appointment booked or canceled","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook replenishmentScheduled","href":"/api-reference/webhooks/replenishment-appointment-booked-or-canceled"},{"title":"Replenishment status changed","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook replenishmentStatus","href":"/api-reference/webhooks/replenishment-status-changed"}]}]}]},{"language":"es","navbar":{"links":[{"href":"https://cubbo.com","label":"Cubbo"}],"primary":{"type":"button","label":"Obtener credenciales","href":"https://app.cubbo.com/stores"}},"tabs":[{"tab":"Guías","pages":[{"title":"Guías","href":"/es"}]},{"tab":"Referencia de la API","groups":[{"group":"Authentication","pages":[{"title":"Obtain an access token","deprecated":null,"version":null,"openapi":"/openapi.yaml post /auth/token","href":"/api-reference/authentication/obtain-an-access-token"}]},{"group":"Orders","pages":[{"title":"Create an order for a Brazil store","deprecated":null,"version":null,"openapi":"/openapi.yaml post /brazil/orders","href":"/api-reference/orders/create-an-order-for-a-brazil-store"},{"title":"List orders","description":"Returns a paginated list of a store's orders with their order lines, invoices (NF-e, Brazil only),\nshipping method, delivery tracking and, optionally, the order's event history. Use it to sync order\nstatus and tracking into your own systems. Filter by status, order type, order number, buyer email\nor date ranges.\n\n- Results are paginated: `page` (default 1) and `per_page` (default 10, capped at 100). The `meta`\n object tells you whether more pages exist.\n- Filtering `status` by `processing` also returns orders in `picking` and `packing`, since all three\n mean \"being prepared in the warehouse\".\n- `order_number` accepts a single string or an array of strings (`order_number[]=ORD-0001\u0026order_number[]=ORD-0002`).\n When you filter by order number, stock units of products that use unit codes also expose their\n `unit_code` while the order is `packing` or `shipped`.\n- `sort_by` accepts any order field (for example `created_at`, `channel_created_at`, `shipping_date`,\n `updated_at`), or `shipping_methods.\u003cfield>` / `stores.\u003cfield>`; an unknown field returns 422\n `Field not found`. `sort` is `desc` unless you pass `asc`. Without `sort_by` the order of results is not guaranteed.\n- `include_event_history=true` adds `order_histories` to every order (status changes, tracking\n updates and incidents).\n- `is_b2b` is only present for stores that handle both B2B and D2C orders.\n- Each order in this list carries the subset of `Order` fields listed in the response schema\n description; the full `Order` object is returned by the create and update endpoints.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders","href":"/api-reference/orders/list-orders"},{"title":"Create an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders","href":"/api-reference/orders/create-an-order"},{"title":"Update an order","description":"Replaces the editable parts of an order that has not entered fulfillment yet: shipping and\nbilling addresses, payment flag, shipping method, product lines and client-uploaded shipping\ndocuments. After a successful update the order goes back to `initial` and is re-validated and\nre-processed by Cubbo, so the response shows the order as it was saved, not its final status.\n- Allowed only while the order is in `unpaid`, `empty`, `error`, `cancelation_window`,\n `awaiting_fulfillment_request`, `entirely_dropshipping`, `backorder`, `hold` or `pending`.\n An order still in `initial` has not been processed yet and is refused (retry later). Orders in\n `processing` or any later status cannot be updated with this endpoint.\n- On a pick-and-ship store an order that already generated its label cannot be modified.\n- Only the keys you send are changed. `shipping` and `billing`, when present, replace the whole\n address block (fields you omit become empty). `products`, when present and non-empty,\n replaces every order line with the list you send; each line keeps the price it was created\n with (a price sent here is ignored) and a product new to the order gets no price.\n- `products` cannot be sent for an order that has a line pinned to a unit code, and it cannot\n pin one (`unit_code` on a product is refused).\n- The D2C/B2B classification (`is_b2b`) is immutable: on a store that handles both models a\n value different from the order's is refused; on a single-model store it is ignored.\n- When you change `shipping` without sending `shipping_method_id`, an order created through a\n sales-channel integration with a shipping-method mapping gets its shipping method re-evaluated\n during re-processing, unless the order ships on the marketplace's own label.\n- Chile: when you send `shipping_method_id` and `shipping.city` cannot be\n identified, the update is still saved with the rest of your changes. The order goes back to\n `error` until `shipping.city` is corrected.\n- Colombia: unlike the other `shipping` fields, `shipping.city_code` is kept when you leave it\n out, unless the same update changes `shipping.city` or `shipping.province`; send it as `null`\n to clear it, and the city and province decide the destination again. A code Cubbo does not know is saved with the rest of your changes and the\n order goes back to `error` (`UNRECOGNIZED_CITY_CODE`) until it is corrected.\n- A marketplace order that ships on the marketplace's own label can only move to another\n marketplace-label shipping method; the refusal carries the code\n `MARKETPLACE_WITH_EXTERNAL_GUIDE` so you can tell it apart from a fixable validation error.\n- `shipping_documents`, when present, deletes every document previously uploaded by you\n (`document_type` other than `file`) and stores the new ones. Documents generated by Cubbo\n are kept. A label sent as a URL (`document_type: url`) is not downloaded on update: when\n the order already has its label, the URL is ignored and the order keeps its labels.\n- When the order's shipping method ships on your own label (an external guide), the order must\n still have a label after the update. If it has none and you do not send one (as `base64`),\n or your `shipping_documents` would replace it with none, the update is refused with\n `MISSING_EXTERNAL_LABEL` and nothing is changed; when the only label you sent was a URL,\n the code is `LABEL_URL_NOT_SUPPORTED_ON_UPDATE`. Send the label in the same request, or\n upload it first with `PATCH /orders/{id}/upload-shipping-documents`. A label still being\n fetched from the URL you sent when creating the order counts as present.\n- `channel_order_id` and `channel_name` are set when the order is created and cannot be changed\n here. Sending a value different from the order's own is refused with\n `UNSUPPORTED_UPDATE_FIELDS`; sending the order's current values (for example the order as\n returned by `GET /orders`) is accepted. Other keys this endpoint does not list are ignored.\n- Requires an API user with the \"orders update\" permission and access to the store. Note that\n a permission failure inside this action is currently answered with `500 unexpected error`\n rather than `401`.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml put /orders/{id}","href":"/api-reference/orders/update-an-order"},{"title":"Update shipping contact and address fields","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}","href":"/api-reference/orders/update-shipping-contact-and-address-fields"},{"title":"Put an order on hold","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}/hold","href":"/api-reference/orders/put-an-order-on-hold"},{"title":"Release an order from hold","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}/unhold","href":"/api-reference/orders/release-an-order-from-hold"},{"title":"Upload shipping documents to an order","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}/upload-shipping-documents","href":"/api-reference/orders/upload-shipping-documents-to-an-order"},{"title":"Attach NF-e invoices issued through Cubbo's fiscal integration","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/{order_id}/attach-invoice","href":"/api-reference/orders/attach-nf-e-invoices-issued-through-cubbos-fiscal-integration"},{"title":"List orders waiting for an NF-e","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/awaiting-invoice","href":"/api-reference/orders/list-orders-waiting-for-an-nf-e"},{"title":"Cancel an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/cancel","href":"/api-reference/orders/cancel-an-order"},{"title":"Create a pick-and-ship order and buy its labels","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/create-and-ship","href":"/api-reference/orders/create-a-pick-and-ship-order-and-buy-its-labels"},{"title":"Delete an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/delete","href":"/api-reference/orders/delete-an-order"},{"title":"List orders with selected fields","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/with-fields","href":"/api-reference/orders/list-orders-with-selected-fields"}]},{"group":"Click and collect","pages":[{"title":"List pickup locations near a postal code (public)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /carrier-services/pickup-locations","href":"/api-reference/click-and-collect/list-pickup-locations-near-a-postal-code-public"},{"title":"Convert an order to click and collect","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{order_id}/convert-to-click-and-collect","href":"/api-reference/click-and-collect/convert-an-order-to-click-and-collect"},{"title":"List click-and-collect pickup points eligible for an order","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/{order_id}/pickup-points","href":"/api-reference/click-and-collect/list-click-and-collect-pickup-points-eligible-for-an-order"}]},{"group":"Inventory","pages":[{"title":"List products with stock","deprecated":null,"version":null,"openapi":"/openapi.yaml get /inventory","href":"/api-reference/inventory/list-products-with-stock"},{"title":"Create a product","deprecated":null,"version":null,"openapi":"/openapi.yaml post /products","href":"/api-reference/inventory/create-a-product"},{"title":"Update a product","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /products/{id}","href":"/api-reference/inventory/update-a-product"}]},{"group":"Lots","pages":[{"title":"List the lots of a product","deprecated":null,"version":null,"openapi":"/openapi.yaml get /lots","href":"/api-reference/lots/list-the-lots-of-a-product"},{"title":"Put a lot on hold","deprecated":null,"version":null,"openapi":"/openapi.yaml post /lots/hold/store/{store_id}","href":"/api-reference/lots/put-a-lot-on-hold"},{"title":"Release a lot from hold","deprecated":null,"version":null,"openapi":"/openapi.yaml post /lots/unhold/store/{store_id}","href":"/api-reference/lots/release-a-lot-from-hold"},{"title":"Create a lot or update its expiration date","deprecated":null,"version":null,"openapi":"/openapi.yaml post /lots/upsert","href":"/api-reference/lots/create-a-lot-or-update-its-expiration-date"}]},{"group":"Shipping labels","pages":[{"title":"List an order's shipping labels","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/{order_id}/shipping-labels","href":"/api-reference/shipping-labels/list-an-orders-shipping-labels"},{"title":"Get a shipping label","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-labels/{shipping_label_id}","href":"/api-reference/shipping-labels/get-a-shipping-label"}]},{"group":"Replenishments","pages":[{"title":"Create a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml post /replenishments","href":"/api-reference/replenishments/create-a-replenishment"},{"title":"Get a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml get /replenishments/{replenishment_id}","href":"/api-reference/replenishments/get-a-replenishment"},{"title":"Update a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /replenishments/{replenishment_id}","href":"/api-reference/replenishments/update-a-replenishment"},{"title":"Attach an NF-e issued through Cubbo's Brazilian invoicing provider","deprecated":null,"version":null,"openapi":"/openapi.yaml post /replenishments/{replenishment_id}/attach-invoice","href":"/api-reference/replenishments/attach-an-nf-e-issued-through-cubbos-brazilian-invoicing-provider"},{"title":"Record or clear an invoice issuing error","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /replenishments/{replenishment_id}/invoice-issuing-error","href":"/api-reference/replenishments/record-or-clear-an-invoice-issuing-error"},{"title":"Get the variance report of a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml get /replenishments/{replenishment_id}/variance-report","href":"/api-reference/replenishments/get-the-variance-report-of-a-replenishment"}]},{"group":"Reports","pages":[{"title":"Inventory transactions report","deprecated":null,"version":null,"openapi":"/openapi.yaml get /reports/inventory-transactions","href":"/api-reference/reports/inventory-transactions-report"}]},{"group":"Returns","pages":[{"title":"Request a return for a shipped order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns","href":"/api-reference/returns/request-a-return-for-a-shipped-order"},{"title":"Get a return","deprecated":null,"version":null,"openapi":"/openapi.yaml get /returns/{return_id}","href":"/api-reference/returns/get-a-return"},{"title":"Register the inbound NF-e issued for a return (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns/{return_id}/attach-invoice","href":"/api-reference/returns/register-the-inbound-nf-e-issued-for-a-return-brazil"},{"title":"Cancel a pending return","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /returns/{return_id}/cancel","href":"/api-reference/returns/cancel-a-pending-return"},{"title":"Decide what to do with an order returned by the carrier","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns/{return_id}/decision","href":"/api-reference/returns/decide-what-to-do-with-an-order-returned-by-the-carrier"},{"title":"List returns that still need an inbound NF-e (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /returns/awaiting-invoice","href":"/api-reference/returns/list-returns-that-still-need-an-inbound-nf-e-brazil"}]},{"group":"Shipping methods","pages":[{"title":"List active shipping methods available to a store","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-methods","href":"/api-reference/shipping-methods/list-active-shipping-methods-available-to-a-store"},{"title":"Check which shipping method a shipping configuration would select for a postcode","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-methods/configuration-coverage","href":"/api-reference/shipping-methods/check-which-shipping-method-a-shipping-configuration-would-select-for-a-postcode"},{"title":"Quote shipping options for a destination and package","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-methods/quote","href":"/api-reference/shipping-methods/quote-shipping-options-for-a-destination-and-package"}]},{"group":"Stores","pages":[{"title":"Update your own store","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /store","href":"/api-reference/stores/update-your-own-store"},{"title":"Upload the store's digital certificate and set NF-e numbering (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /store/digital-certificate","href":"/api-reference/stores/upload-the-stores-digital-certificate-and-set-nf-e-numbering-brazil"},{"title":"Provision the store's fiscal account (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /store/fiscal-account","href":"/api-reference/stores/provision-the-stores-fiscal-account-brazil"},{"title":"Create a store from an existing one","deprecated":null,"version":null,"openapi":"/openapi.yaml post /stores","href":"/api-reference/stores/create-a-store-from-an-existing-one"}]},{"group":"Webhooks","pages":[{"title":"Order status changed","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook orderUpdated","href":"/api-reference/webhooks/order-status-changed"},{"title":"Order shipped fulfilled","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook orderFulfilled","href":"/api-reference/webhooks/order-shipped-fulfilled"},{"title":"Carrier tracking status changed","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook shippingUpdated","href":"/api-reference/webhooks/carrier-tracking-status-changed"},{"title":"Inventory snapshot after a stock movement","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook inventoryMovement","href":"/api-reference/webhooks/inventory-snapshot-after-a-stock-movement"},{"title":"Replenishment announced","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook replenishmentCreated","href":"/api-reference/webhooks/replenishment-announced"},{"title":"Replenishment appointment booked or canceled","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook replenishmentScheduled","href":"/api-reference/webhooks/replenishment-appointment-booked-or-canceled"},{"title":"Replenishment status changed","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook replenishmentStatus","href":"/api-reference/webhooks/replenishment-status-changed"}]}]}]},{"language":"pt-BR","navbar":{"links":[{"href":"https://cubbo.com","label":"Cubbo"}],"primary":{"type":"button","label":"Obter credenciais","href":"https://app.cubbo.com/stores"}},"tabs":[{"tab":"Guias","pages":[{"title":"Guias","href":"/pt-BR"}]},{"tab":"Referência da API","groups":[{"group":"Authentication","pages":[{"title":"Obtain an access token","deprecated":null,"version":null,"openapi":"/openapi.yaml post /auth/token","href":"/api-reference/authentication/obtain-an-access-token"}]},{"group":"Orders","pages":[{"title":"Create an order for a Brazil store","deprecated":null,"version":null,"openapi":"/openapi.yaml post /brazil/orders","href":"/api-reference/orders/create-an-order-for-a-brazil-store"},{"title":"List orders","description":"Returns a paginated list of a store's orders with their order lines, invoices (NF-e, Brazil only),\nshipping method, delivery tracking and, optionally, the order's event history. Use it to sync order\nstatus and tracking into your own systems. Filter by status, order type, order number, buyer email\nor date ranges.\n\n- Results are paginated: `page` (default 1) and `per_page` (default 10, capped at 100). The `meta`\n object tells you whether more pages exist.\n- Filtering `status` by `processing` also returns orders in `picking` and `packing`, since all three\n mean \"being prepared in the warehouse\".\n- `order_number` accepts a single string or an array of strings (`order_number[]=ORD-0001\u0026order_number[]=ORD-0002`).\n When you filter by order number, stock units of products that use unit codes also expose their\n `unit_code` while the order is `packing` or `shipped`.\n- `sort_by` accepts any order field (for example `created_at`, `channel_created_at`, `shipping_date`,\n `updated_at`), or `shipping_methods.\u003cfield>` / `stores.\u003cfield>`; an unknown field returns 422\n `Field not found`. `sort` is `desc` unless you pass `asc`. Without `sort_by` the order of results is not guaranteed.\n- `include_event_history=true` adds `order_histories` to every order (status changes, tracking\n updates and incidents).\n- `is_b2b` is only present for stores that handle both B2B and D2C orders.\n- Each order in this list carries the subset of `Order` fields listed in the response schema\n description; the full `Order` object is returned by the create and update endpoints.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders","href":"/api-reference/orders/list-orders"},{"title":"Create an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders","href":"/api-reference/orders/create-an-order"},{"title":"Update an order","description":"Replaces the editable parts of an order that has not entered fulfillment yet: shipping and\nbilling addresses, payment flag, shipping method, product lines and client-uploaded shipping\ndocuments. After a successful update the order goes back to `initial` and is re-validated and\nre-processed by Cubbo, so the response shows the order as it was saved, not its final status.\n- Allowed only while the order is in `unpaid`, `empty`, `error`, `cancelation_window`,\n `awaiting_fulfillment_request`, `entirely_dropshipping`, `backorder`, `hold` or `pending`.\n An order still in `initial` has not been processed yet and is refused (retry later). Orders in\n `processing` or any later status cannot be updated with this endpoint.\n- On a pick-and-ship store an order that already generated its label cannot be modified.\n- Only the keys you send are changed. `shipping` and `billing`, when present, replace the whole\n address block (fields you omit become empty). `products`, when present and non-empty,\n replaces every order line with the list you send; each line keeps the price it was created\n with (a price sent here is ignored) and a product new to the order gets no price.\n- `products` cannot be sent for an order that has a line pinned to a unit code, and it cannot\n pin one (`unit_code` on a product is refused).\n- The D2C/B2B classification (`is_b2b`) is immutable: on a store that handles both models a\n value different from the order's is refused; on a single-model store it is ignored.\n- When you change `shipping` without sending `shipping_method_id`, an order created through a\n sales-channel integration with a shipping-method mapping gets its shipping method re-evaluated\n during re-processing, unless the order ships on the marketplace's own label.\n- Chile: when you send `shipping_method_id` and `shipping.city` cannot be\n identified, the update is still saved with the rest of your changes. The order goes back to\n `error` until `shipping.city` is corrected.\n- Colombia: unlike the other `shipping` fields, `shipping.city_code` is kept when you leave it\n out, unless the same update changes `shipping.city` or `shipping.province`; send it as `null`\n to clear it, and the city and province decide the destination again. A code Cubbo does not know is saved with the rest of your changes and the\n order goes back to `error` (`UNRECOGNIZED_CITY_CODE`) until it is corrected.\n- A marketplace order that ships on the marketplace's own label can only move to another\n marketplace-label shipping method; the refusal carries the code\n `MARKETPLACE_WITH_EXTERNAL_GUIDE` so you can tell it apart from a fixable validation error.\n- `shipping_documents`, when present, deletes every document previously uploaded by you\n (`document_type` other than `file`) and stores the new ones. Documents generated by Cubbo\n are kept. A label sent as a URL (`document_type: url`) is not downloaded on update: when\n the order already has its label, the URL is ignored and the order keeps its labels.\n- When the order's shipping method ships on your own label (an external guide), the order must\n still have a label after the update. If it has none and you do not send one (as `base64`),\n or your `shipping_documents` would replace it with none, the update is refused with\n `MISSING_EXTERNAL_LABEL` and nothing is changed; when the only label you sent was a URL,\n the code is `LABEL_URL_NOT_SUPPORTED_ON_UPDATE`. Send the label in the same request, or\n upload it first with `PATCH /orders/{id}/upload-shipping-documents`. A label still being\n fetched from the URL you sent when creating the order counts as present.\n- `channel_order_id` and `channel_name` are set when the order is created and cannot be changed\n here. Sending a value different from the order's own is refused with\n `UNSUPPORTED_UPDATE_FIELDS`; sending the order's current values (for example the order as\n returned by `GET /orders`) is accepted. Other keys this endpoint does not list are ignored.\n- Requires an API user with the \"orders update\" permission and access to the store. Note that\n a permission failure inside this action is currently answered with `500 unexpected error`\n rather than `401`.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml put /orders/{id}","href":"/api-reference/orders/update-an-order"},{"title":"Update shipping contact and address fields","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}","href":"/api-reference/orders/update-shipping-contact-and-address-fields"},{"title":"Put an order on hold","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}/hold","href":"/api-reference/orders/put-an-order-on-hold"},{"title":"Release an order from hold","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}/unhold","href":"/api-reference/orders/release-an-order-from-hold"},{"title":"Upload shipping documents to an order","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}/upload-shipping-documents","href":"/api-reference/orders/upload-shipping-documents-to-an-order"},{"title":"Attach NF-e invoices issued through Cubbo's fiscal integration","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/{order_id}/attach-invoice","href":"/api-reference/orders/attach-nf-e-invoices-issued-through-cubbos-fiscal-integration"},{"title":"List orders waiting for an NF-e","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/awaiting-invoice","href":"/api-reference/orders/list-orders-waiting-for-an-nf-e"},{"title":"Cancel an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/cancel","href":"/api-reference/orders/cancel-an-order"},{"title":"Create a pick-and-ship order and buy its labels","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/create-and-ship","href":"/api-reference/orders/create-a-pick-and-ship-order-and-buy-its-labels"},{"title":"Delete an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/delete","href":"/api-reference/orders/delete-an-order"},{"title":"List orders with selected fields","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/with-fields","href":"/api-reference/orders/list-orders-with-selected-fields"}]},{"group":"Click and collect","pages":[{"title":"List pickup locations near a postal code (public)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /carrier-services/pickup-locations","href":"/api-reference/click-and-collect/list-pickup-locations-near-a-postal-code-public"},{"title":"Convert an order to click and collect","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{order_id}/convert-to-click-and-collect","href":"/api-reference/click-and-collect/convert-an-order-to-click-and-collect"},{"title":"List click-and-collect pickup points eligible for an order","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/{order_id}/pickup-points","href":"/api-reference/click-and-collect/list-click-and-collect-pickup-points-eligible-for-an-order"}]},{"group":"Inventory","pages":[{"title":"List products with stock","deprecated":null,"version":null,"openapi":"/openapi.yaml get /inventory","href":"/api-reference/inventory/list-products-with-stock"},{"title":"Create a product","deprecated":null,"version":null,"openapi":"/openapi.yaml post /products","href":"/api-reference/inventory/create-a-product"},{"title":"Update a product","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /products/{id}","href":"/api-reference/inventory/update-a-product"}]},{"group":"Lots","pages":[{"title":"List the lots of a product","deprecated":null,"version":null,"openapi":"/openapi.yaml get /lots","href":"/api-reference/lots/list-the-lots-of-a-product"},{"title":"Put a lot on hold","deprecated":null,"version":null,"openapi":"/openapi.yaml post /lots/hold/store/{store_id}","href":"/api-reference/lots/put-a-lot-on-hold"},{"title":"Release a lot from hold","deprecated":null,"version":null,"openapi":"/openapi.yaml post /lots/unhold/store/{store_id}","href":"/api-reference/lots/release-a-lot-from-hold"},{"title":"Create a lot or update its expiration date","deprecated":null,"version":null,"openapi":"/openapi.yaml post /lots/upsert","href":"/api-reference/lots/create-a-lot-or-update-its-expiration-date"}]},{"group":"Shipping labels","pages":[{"title":"List an order's shipping labels","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/{order_id}/shipping-labels","href":"/api-reference/shipping-labels/list-an-orders-shipping-labels"},{"title":"Get a shipping label","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-labels/{shipping_label_id}","href":"/api-reference/shipping-labels/get-a-shipping-label"}]},{"group":"Replenishments","pages":[{"title":"Create a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml post /replenishments","href":"/api-reference/replenishments/create-a-replenishment"},{"title":"Get a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml get /replenishments/{replenishment_id}","href":"/api-reference/replenishments/get-a-replenishment"},{"title":"Update a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /replenishments/{replenishment_id}","href":"/api-reference/replenishments/update-a-replenishment"},{"title":"Attach an NF-e issued through Cubbo's Brazilian invoicing provider","deprecated":null,"version":null,"openapi":"/openapi.yaml post /replenishments/{replenishment_id}/attach-invoice","href":"/api-reference/replenishments/attach-an-nf-e-issued-through-cubbos-brazilian-invoicing-provider"},{"title":"Record or clear an invoice issuing error","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /replenishments/{replenishment_id}/invoice-issuing-error","href":"/api-reference/replenishments/record-or-clear-an-invoice-issuing-error"},{"title":"Get the variance report of a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml get /replenishments/{replenishment_id}/variance-report","href":"/api-reference/replenishments/get-the-variance-report-of-a-replenishment"}]},{"group":"Reports","pages":[{"title":"Inventory transactions report","deprecated":null,"version":null,"openapi":"/openapi.yaml get /reports/inventory-transactions","href":"/api-reference/reports/inventory-transactions-report"}]},{"group":"Returns","pages":[{"title":"Request a return for a shipped order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns","href":"/api-reference/returns/request-a-return-for-a-shipped-order"},{"title":"Get a return","deprecated":null,"version":null,"openapi":"/openapi.yaml get /returns/{return_id}","href":"/api-reference/returns/get-a-return"},{"title":"Register the inbound NF-e issued for a return (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns/{return_id}/attach-invoice","href":"/api-reference/returns/register-the-inbound-nf-e-issued-for-a-return-brazil"},{"title":"Cancel a pending return","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /returns/{return_id}/cancel","href":"/api-reference/returns/cancel-a-pending-return"},{"title":"Decide what to do with an order returned by the carrier","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns/{return_id}/decision","href":"/api-reference/returns/decide-what-to-do-with-an-order-returned-by-the-carrier"},{"title":"List returns that still need an inbound NF-e (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /returns/awaiting-invoice","href":"/api-reference/returns/list-returns-that-still-need-an-inbound-nf-e-brazil"}]},{"group":"Shipping methods","pages":[{"title":"List active shipping methods available to a store","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-methods","href":"/api-reference/shipping-methods/list-active-shipping-methods-available-to-a-store"},{"title":"Check which shipping method a shipping configuration would select for a postcode","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-methods/configuration-coverage","href":"/api-reference/shipping-methods/check-which-shipping-method-a-shipping-configuration-would-select-for-a-postcode"},{"title":"Quote shipping options for a destination and package","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-methods/quote","href":"/api-reference/shipping-methods/quote-shipping-options-for-a-destination-and-package"}]},{"group":"Stores","pages":[{"title":"Update your own store","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /store","href":"/api-reference/stores/update-your-own-store"},{"title":"Upload the store's digital certificate and set NF-e numbering (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /store/digital-certificate","href":"/api-reference/stores/upload-the-stores-digital-certificate-and-set-nf-e-numbering-brazil"},{"title":"Provision the store's fiscal account (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /store/fiscal-account","href":"/api-reference/stores/provision-the-stores-fiscal-account-brazil"},{"title":"Create a store from an existing one","deprecated":null,"version":null,"openapi":"/openapi.yaml post /stores","href":"/api-reference/stores/create-a-store-from-an-existing-one"}]},{"group":"Webhooks","pages":[{"title":"Order status changed","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook orderUpdated","href":"/api-reference/webhooks/order-status-changed"},{"title":"Order shipped fulfilled","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook orderFulfilled","href":"/api-reference/webhooks/order-shipped-fulfilled"},{"title":"Carrier tracking status changed","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook shippingUpdated","href":"/api-reference/webhooks/carrier-tracking-status-changed"},{"title":"Inventory snapshot after a stock movement","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook inventoryMovement","href":"/api-reference/webhooks/inventory-snapshot-after-a-stock-movement"},{"title":"Replenishment announced","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook replenishmentCreated","href":"/api-reference/webhooks/replenishment-announced"},{"title":"Replenishment appointment booked or canceled","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook replenishmentScheduled","href":"/api-reference/webhooks/replenishment-appointment-booked-or-canceled"},{"title":"Replenishment status changed","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook replenishmentStatus","href":"/api-reference/webhooks/replenishment-status-changed"}]}]}]}]},"basePath":"","title":"Create an order - Cubbo Developers","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DdEMm2kG.js","utils-BMo572L7.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C-4m9KAx.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DPLK2Oq9.js","snippetPresets-BKjfJMC9.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-DTsgtCEj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C8vmhyQM.js","shallow-r9w8LQGS.js","getApiPlaygroundDisplay-DjPI64HQ.js","CodeSnippet-C8Bvhl16.js","CodeSnippets-BtWUwcMy.js","Page-BIYvYBgk.js","getPastedJson-Dcm_3Pgl.js","icon-BXwrTpjc.js","MethodPill-CcjfVmmy.js","DuplicateIcon-BuKIbXAQ.js","createIcon-DaL9yXsO.js","DynamicMarkdown-Co5nikxh.js","SectionHeading-P4UNTsMZ.js","axios-vUo_bRtp.js","Markdown-CEfymfIH.js","clsx-Dq9TQuNi.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-D2J8knkn.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BgZ2ThuU.js"]}