curl --request PUT \
--url https://api.cubbo.com/v1/orders/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"store_id": 1234,
"is_paid": true,
"shipping_method_id": 77,
"shipping": {
"first_name": "Jane",
"last_name": "Buyer",
"phone": "5551234567",
"address1": "Calle Falsa 123",
"address2": "Depto 4",
"interior_number": "4",
"country": "MX",
"city": "Ciudad de Mexico",
"province": "CDMX",
"zip_code": "06600"
},
"products": [
{
"sku": "SKU-RED-M",
"quantity": 2
},
{
"sku": "SKU-BLUE-L",
"quantity": 1
}
]
}
'{
"id": 123456,
"store_id": 1234,
"order_number": "ORD-0001",
"status": "initial",
"is_paid": true,
"shipping_email": "buyer@example.com",
"shipping": {
"first_name": "Jane",
"last_name": "Buyer",
"address_1": "Calle Falsa 123",
"city": "Ciudad de Mexico",
"state": "CDMX",
"zip_code": "06600",
"country": "MX",
"city_code": null
},
"order_lines": [
{
"sku": "SKU-RED-M",
"quantity": 2
},
{
"sku": "SKU-BLUE-L",
"quantity": 1
}
]
}Update an order
Replaces the editable parts of an order that has not entered fulfillment yet: shipping and
billing addresses, payment flag, shipping method, product lines and client-uploaded shipping
documents. After a successful update the order goes back to initial and is re-validated and
re-processed by Cubbo, so the response shows the order as it was saved, not its final status.
- Allowed only while the order is in
unpaid,empty,error,cancelation_window,awaiting_fulfillment_request,entirely_dropshipping,backorder,holdorpending. An order still ininitialhas not been processed yet and is refused (retry later). Orders inprocessingor any later status cannot be updated with this endpoint. - On a pick-and-ship store an order that already generated its label cannot be modified.
- Only the keys you send are changed.
shippingandbilling, when present, replace the whole address block (fields you omit become empty).products, when present and non-empty, replaces every order line with the list you send; each line keeps the price it was created with (a price sent here is ignored) and a product new to the order gets no price. productscannot be sent for an order that has a line pinned to a unit code, and it cannot pin one (unit_codeon a product is refused).- The D2C/B2B classification (
is_b2b) is immutable: on a store that handles both models a value different from the order’s is refused; on a single-model store it is ignored. - When you change
shippingwithout sendingshipping_method_id, an order created through a sales-channel integration with a shipping-method mapping gets its shipping method re-evaluated during re-processing, unless the order ships on the marketplace’s own label. - Chile: when you send
shipping_method_idandshipping.citycannot be identified, the update is still saved with the rest of your changes. The order goes back toerroruntilshipping.cityis corrected. - Colombia: unlike the other
shippingfields,shipping.city_codeis kept when you leave it out, unless the same update changesshipping.cityorshipping.province; send it asnullto 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 order goes back toerror(UNRECOGNIZED_CITY_CODE) until it is corrected. - A marketplace order that ships on the marketplace’s own label can only move to another
marketplace-label shipping method; the refusal carries the code
MARKETPLACE_WITH_EXTERNAL_GUIDEso you can tell it apart from a fixable validation error. shipping_documents, when present, deletes every document previously uploaded by you (document_typeother thanfile) and stores the new ones. Documents generated by Cubbo are kept. A label sent as a URL (document_type: url) is not downloaded on update: when the order already has its label, the URL is ignored and the order keeps its labels.- When the order’s shipping method ships on your own label (an external guide), the order must
still have a label after the update. If it has none and you do not send one (as
base64), or yourshipping_documentswould replace it with none, the update is refused withMISSING_EXTERNAL_LABELand nothing is changed; when the only label you sent was a URL, the code isLABEL_URL_NOT_SUPPORTED_ON_UPDATE. Send the label in the same request, or upload it first withPATCH /orders/{id}/upload-shipping-documents. A label still being fetched from the URL you sent when creating the order counts as present. channel_order_idandchannel_nameare set when the order is created and cannot be changed here. Sending a value different from the order’s own is refused withUNSUPPORTED_UPDATE_FIELDS; sending the order’s current values (for example the order as returned byGET /orders) is accepted. Other keys this endpoint does not list are ignored.- Requires an API user with the “orders update” permission and access to the store. Note that
a permission failure inside this action is currently answered with
500 unexpected errorrather than401.
curl --request PUT \
--url https://api.cubbo.com/v1/orders/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"store_id": 1234,
"is_paid": true,
"shipping_method_id": 77,
"shipping": {
"first_name": "Jane",
"last_name": "Buyer",
"phone": "5551234567",
"address1": "Calle Falsa 123",
"address2": "Depto 4",
"interior_number": "4",
"country": "MX",
"city": "Ciudad de Mexico",
"province": "CDMX",
"zip_code": "06600"
},
"products": [
{
"sku": "SKU-RED-M",
"quantity": 2
},
{
"sku": "SKU-BLUE-L",
"quantity": 1
}
]
}
'{
"id": 123456,
"store_id": 1234,
"order_number": "ORD-0001",
"status": "initial",
"is_paid": true,
"shipping_email": "buyer@example.com",
"shipping": {
"first_name": "Jane",
"last_name": "Buyer",
"address_1": "Calle Falsa 123",
"city": "Ciudad de Mexico",
"state": "CDMX",
"zip_code": "06600",
"country": "MX",
"city_code": null
},
"order_lines": [
{
"sku": "SKU-RED-M",
"quantity": 2
},
{
"sku": "SKU-BLUE-L",
"quantity": 1
}
]
}Authorizations
Body
Full update of an order. Only the keys present are applied; see the endpoint description for replacement semantics.
Id of the shipping method to assign. Get it from GET /shipping-methods/quote (shipping_method_id of each option). It must be active and cover the (updated) shipping address; an international method is refused for a destination inside the warehouse's country. In Chile a shipping.city that cannot be identified is not refused; the update is saved and the order waits in error until it is corrected.
77
Response
The updated order (with its order lines) as saved, before re-processing.
An order as returned by the Orders endpoints. Scalar fields are always available; associations
(shipping_method, order_lines, invoices, store, channel_integration, return,
created_by_return, order_histories) are present only when the endpoint includes them. Each
endpoint's response description lists the fields it returns.
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.
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 "shipped"
Carrier-side status of the shipment.
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 "shipment_in_transit"