Remove Items

Request Fields:

FieldTypeRequiredDescription
itemsarrayConditionalArray of items to remove. Required unless remove_additional_items is true.
items[].item_idintegerYesOrder item ID (sales_flat_order_item.item_id)
items[].qtynumberNoQuantity to remove (if not provided, removes entire item)
previewbooleanNoIf true, returns what the order would look like without saving changes (dry-run)
remove_additional_itemsbooleanNoIf 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:

CodeDescriptionExample
400Cannot remove last item"Cannot remove all items from order. Use cancel order instead."
400Item partially shipped"Cannot remove item %s because %s units have been shipped."
400Item partially invoiced"Cannot remove item %s because %s units have been invoiced."
400No additional items"No additional order items found on this order."
400Negative quantity"Quantity must be greater than 0 for item X." (code: ORDEDIT-INPUT-ERROR-CODE-002)
400Extreme quantity"Quantity cannot exceed 10,000 for item X." (code: ORDEDIT-INPUT-ERROR-CODE-002)
401Unauthorized"Invalid authentication credentials."
404Order not found"Order not found."
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Order entity ID

Body Params
items
array of objects
items
boolean
boolean
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Response

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json