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

orderId
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:
status
string
Order status. One of pending, confirmed, shipped, delivered, canceled, returned, exchange.
courierName
string
Carrier / courier name for the shipment.
trackingNumber
string
Tracking number for the shipment.
digitaldata
string
Digital delivery payload (keys / file URLs) for digital orders.
deliveryDate
string
Delivery date (ISO-8601).
restock
boolean
When true on a return/cancel update, stock is incremented back for every non-custom line item that had stock deducted (idempotent).
staffId
string
Staff member who performed the action (recorded for audit).
notes
string
Order notes.
products
array
Replacement order line items (each item carries productId, quantity, varientId, pricing, etc.).
clientName
string
Customer name for the shipping/contact details.
email
string
Customer email address.
mobileNumber
string
Customer phone number.
address
string
Street address.
city
string
City.
state
string
State / province.
country
string
Country.
pinCode
string
Postal / ZIP code.

Response

The platform returns the standard response envelope. data is the updated order object.
status
integer
HTTP status code.
state
string
Result state (success, error).
message
string
Optional message (may be null).
data
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

StatusStateDescription
401errorInvalid or missing authentication
404errorOrder with the specified ID does not exist
400errorInvalid request body, or status change blocked (e.g. delivered/canceled order)