Update Order
Orders
Update Order
Update an existing order
PUT
Update Order
Update Order
Updates an existing order. This is a merchant-scoped endpoint authenticated with a merchant session (JWT). The same capability is also available through theupdate_order MCP tool.
There is also
PATCH /orders/update-signle-order/:orderId for lighter
single-order field updates. Both accept the same body shape.Request
The route is
PUT /orders/update/:orderId — the orderId path segment is
the order’s ID.Path Parameters
The unique order ID.
Body Parameters
The body is a partial order — every field is optional and only the supplied fields are changed. Key fields:Order status. One of
pending, confirmed, shipped, delivered,
canceled, returned, exchange.Carrier / courier name for the shipment.
Tracking number for the shipment.
Digital delivery payload (keys / file URLs) for digital orders.
Delivery date (ISO-8601).
When
true on a return/cancel update, stock is incremented back for every
non-custom line item that had stock deducted (idempotent).Staff member who performed the action (recorded for audit).
Order notes.
Replacement order line items (each item carries
productId, quantity,
varientId, pricing, etc.).Customer name for the shipping/contact details.
Customer email address.
Customer phone number.
Street address.
City.
State / province.
Country.
Postal / ZIP code.
Response
The platform returns the standard response envelope.data is the updated
order object.
HTTP status code.
Result state (
success, error).Optional message (may be
null).The updated order object.
Example Response
Notes
- Status transitions are guarded: an order already
deliveredorcanceledcannot have its status changed. - Setting
paymentMethodto a cash/offline method moves the order topaid. - Use
restock: trueon a cancel/return to return inventory to stock.
Error Codes
| Status | State | Description |
|---|---|---|
401 | error | Invalid or missing authentication |
404 | error | Order with the specified ID does not exist |
400 | error | Invalid request body, or status change blocked (e.g. delivered/canceled order) |