post
https://{store}/api/rest/orders//edit-items
Request Fields:
| Field | Type | Required | Description |
|---|---|---|---|
| items | array | Yes | Array of items to edit |
| items[].item_id | integer | Preferred | Order item ID (most explicit - use this if available) |
| items[].sku | string | Alternative | Product SKU (fallback - matches first item with this SKU) |
| items[].product_id | integer | Legacy | Product entity ID (legacy support - matches first item) |
| items[].qty | number | No | New quantity (for sparse update) |
| items[].price | number | No | New price per unit (for sparse update) |
| preview | boolean | No | If true, returns what the order would look like without saving changes (dry-run) |
When the same product exists multiple times on an order (e.g., with different prices or delivery dates), you must use
item_idto specify which item to edit. Theskuandproduct_idoptions will match the first item only.
Error Responses:
| Code | Description | Example |
|---|---|---|
| 400 | Order has bills | "Cannot edit items on Order 200000123 because it has Open and/or Paid bills." |
| 400 | Order has shipments | "Cannot edit items on Order because it has shipments." |
| 400 | Product not on order | "Product 'SKU-123' does not exist on order." |
| 400 | Multiple items, use item_id | "Multiple items with SKU 'ABC-123'. Use item_id instead." |
| 400 | No changes detected | "No changes detected. All items have the same quantity and price as the current order." |
| 400 | Negative/zero price | "Price must be greater than 0 for item X." (code: ORDEDIT-INPUT-ERROR-CODE-001) |
| 400 | Negative quantity | "Quantity must be greater than 0 for item X." (code: ORDEDIT-INPUT-ERROR-CODE-002) |
| 400 | Extreme quantity | "Quantity cannot exceed 10,000 for item X." (code: ORDEDIT-INPUT-ERROR-CODE-002) |
| 400 | Zero quantity | "Use remove-items endpoint to remove item from order." (code: ORDEDIT-EDIT-ERROR-CODE-014) |
| 401 | Unauthorized | "Invalid authentication credentials." |
| 404 | Order not found | "Order not found." |
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
