post
https://{store}/api/rest/orders//remove-items
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) |
Canceled quantities
An item with canceled quantities can be fully removed, as long as none of it has been shipped or invoiced. Zoey returns the item's open quantity to stock, plus any canceled units that were not returned to stock when they were canceled. A partial removal still can't take the quantity below the shipped plus canceled quantity. To put canceled quantities back instead, use Restore Canceled Items.
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…
