Update Full Order
Replaces the order's line items with the list you send, at the prices you send. Use it when your system holds the final version of the order and you want the store to match it. You can also update the status, shipments, payments and metafields in the same request.
To change only some lines or fields, use Update Order instead.
HTTP Request
- URL:
/orders/update-all/{id} - Method:
PUT - Headers:
accessToken: Required. Your API access token.Content-Type:application/json
- Required scope:
READ_WRITE_ORDER
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | String | Required. The ID of the order to update. |
Request Body
The request body is a JSON object with at least one field.
| Field | Type | Required | Description |
|---|---|---|---|
orderStatus | String | No | pending, processing, partially fulfilled, fulfilled, restocked or cancelled. |
paymentStatus | String | No | unpaid, authorized, declined, partially paid, paid, partially refunded or refunded. |
notes | String | No | Internal staff notes. |
lineItems | Array | No | The complete list of line items. See Line Item Object. |
fulfilledItems | Array | No | Shipments to record. See Fulfilled Item Object. |
payments | Array | No | Payments to record. Same fields as in Update Order. |
metaFields | Array | No | Custom field values, each with code and value. Existing codes are updated and new codes are added. |
Line Item Object
To keep an existing line, send its lineItemId. To add a product, send its sku or a product metaField.
| Field | Type | Required | Description |
|---|---|---|---|
lineItemId | String | No | ID of an existing line to keep. |
quantity | Number | Yes | Quantity. |
price | Number | Yes | Unit price. |
sku | String | No | SKU of the product to add. |
metaField | Object | No | Find the product to add by a product metafield, for example { "code": "erpItemId", "value": "100245" }. |
options | Array | No | Variant options of the product to add, for example [{ "name": "Size", "value": "Large" }]. |
Fulfilled Item Object
| Field | Type | Required | Description |
|---|---|---|---|
items | Array | Yes | Shipped lines. Each needs quantity and one of lineItemId, sku (with options for variants) or metaField. |
carrier | String | No | Carrier name or code. |
trackingNumber | String | No | Tracking number. |
cURL Example
curl --location --request PUT '<BASE_URL>/orders/update-all/664f2310d5775459152d6dd8' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"orderStatus": "processing",
"lineItems": [
{ "lineItemId": "664f2310d5775459152d6ddb", "quantity": 10, "price": 44.5 },
{ "sku": "GLV-2210", "quantity": 24, "price": 6.75, "options": [{ "name": "Size", "value": "Large" }] }
],
"metaFields": [{ "code": "erpOrderId", "value": "SO-88213" }]
}'
Response
- 200 OK: The order was updated. If no order exists with this ID, the response has
"success": false. - 400 Bad Request: The access token is missing or invalid, the body is empty, or a value is not valid.
Sample JSON Response
{
"success": true,
"message": "Order updated successfully",
"data": {
"id": "664f2310d5775459152d6dd8",
"entityId": "ORD-1042",
"orderStatus": "processing",
"lineItems": [
{
"id": "664f2310d5775459152d6ddb",
"productId": "663a0cbe516313e5bc94ab30",
"name": "Safety Glasses",
"sku": "SFTY-4006",
"quantity": 10,
"price": 44.5,
"extendedTotalPrice": 445,
"fulfilledQuantity": 0,
"returned": false
},
{
"id": "6650a0b1d5775459152d7110",
"productId": "663a0cbe516313e5bc94ab2c",
"variantId": "663a0cbe516313e5bc94ab2f",
"name": "Work Gloves",
"sku": "GLV-2210-L",
"productSku": "GLV-2210",
"options": [{ "optionName": "Size", "optionValueLabel": "Large", "optionValue": "L" }],
"quantity": 24,
"price": 6.75,
"extendedTotalPrice": 162,
"fulfilledQuantity": 0,
"returned": false
}
],
"subTotal": 607,
"shippingCost": 12,
"taxAmount": 0,
"total": 619
}
}
Response Details
Order Data
| Field | Type | Description |
|---|---|---|
success | Boolean | Whether the order was updated. |
message | String | Result message. |
data | Object | The updated order. See Get Order for all fields. |
Notes
- When you send
lineItems, any existing line not in the list is removed. Leave outlineItemsto keep the current lines. - Line totals are
price × quantity. The subtotal is the sum of the lines, and the total is subtotal plus shipping plus tax. - When you send
payments, the payment status is set from the amount paid. - After a shipment, the order status becomes
fulfilledwhen every line is fully shipped, orpartially fulfilledotherwise, unless you sendorderStatus. - The customer receives an order update email.