post
https://{store}/api/rest/orders//versions
Request Fields:
| Field | Type | Required | Description |
|---|---|---|---|
| items | array | Conditional | Array of items to remove. Required unless remove_additional_items is true. |
| items[].item_id | integer | Yes | Order item ID (sales_flat_order_item.item_id) |
| items[].qty | number | No | Quantity to remove (if not provided, removes entire item) |
| preview | boolean | No | If true, returns what the order would look like without saving changes (dry-run) |
| remove_additional_items | boolean | No | If true, automatically removes all items added via AddItems API (marked with is_additional_order_item flag) |
Error Responses:
| Code | Description | Example |
|---|---|---|
| 400 | Cannot remove last item | "Cannot remove all items from order. Use cancel order instead." |
| 400 | Item partially shipped | "Cannot remove item %s because %s units have been shipped." |
| 400 | Item partially invoiced | "Cannot remove item %s because %s units have been invoiced." |
| 400 | No additional items | "No additional order items found on this order." |
| 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) |
| 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…
