Skip to main content
PATCH
Update Order

Update Order

Updates an existing order. This is a merchant-scoped endpoint authenticated with a merchant session (JWT) — the one the admin’s order page and the update_order MCP tool use. Apps use the App API instead: fulfillments to ship, refunds to refund, and order metafields for their own data.

Request

The route is PATCH /orders/update-signle-order/:orderId (the path is spelled that way). The orderId path segment is the order’s ID.

Path Parameters

string
required
The unique order ID.

Body Parameters

The body is a partial order — every field is optional and only the supplied fields are changed; each is written to the order as sent. Line items can’t be changed on this endpoint. Key fields:
string
Order status. One of pending, confirmed, paid, partial, shipped, delivered, delivery_failed, canceled, abandoned, payment_failed, returned, exchange.paid, partial, abandoned and payment_failed were previously written by the platform but rejected by this endpoint’s validation; they are now accepted. Omitting status leaves the order’s status untouched.delivery_failed records an attempted delivery that did not arrive (RTO, refused, undeliverable address). It is not a cancellation: nothing is refunded, nothing is restocked, no cancellation email is sent and orders/cancelled is not fired. Those remain separate merchant decisions, and the order can still move on to delivered, canceled, or a fresh fulfillment. It is only accepted from partial or shipped.
string
Carrier / courier name for the shipment.
string
Tracking number for the shipment.
string
Digital delivery payload (keys / file URLs) for digital orders.
string
Delivery date (ISO-8601).
boolean
When true on a return/cancel update, stock is incremented back for every non-custom line item that had stock deducted (idempotent).
string
Staff member who performed the action (recorded for audit).
string
Order notes.
string
Customer name for the shipping/contact details.
string
Customer email address.
string
Customer phone number.
string
Street address.
string
City.
string
State / province.
string
Country.
string
Postal / ZIP code.

Response

The platform returns the standard response envelope. data is the updated order object.
integer
HTTP status code.
string
Result state (success, error).
string
Optional message (may be null).
object
The updated order object.

Example Response

Notes

  • There is no terminal-state guard here: the merchant can move an order to any status. Side effects fire on the transition only:
    • confirmed / shipped / delivered stamp the matching date; shipped also emails the shopper their tracking (non-digital orders).
    • canceled stamps cancelled_at, releases the order’s stock (unless restock handles it), sends the cancellation email and fires orders/cancelled — once; re-sending canceled is a no-op. The financial state becomes voided when nothing was ever captured (COD and other pay-on-delivery methods) and stays paid when money was captured — cancelling does not refund on its own.
    • delivery_failed is only accepted from partial or shipped (otherwise 400); it is not a cancellation — nothing is refunded or restocked.
    • paid sends the order-confirmation emails.
  • restock: true returns every line’s stock (idempotent).
  • Every update fires orders/updated, plus orders/fulfilled / orders/cancelled on those transitions.

Error Codes