Skip to main content
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 the update_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

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. Key fields:
string
Order status. One of pending, confirmed, shipped, delivered, canceled, returned, exchange.
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.
array
Replacement order line items (each item carries productId, quantity, varientId, pricing, etc.).
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

  • Status transitions are guarded: an order already delivered or canceled cannot have its status changed.
  • Setting paymentMethod to a cash/offline method moves the order to paid.
  • Use restock: true on a cancel/return to return inventory to stock.

Error Codes