Cancel Items

This endpoint allows for Canceling individual Item Quantities on an Order. Note that if canceling all items on an Order that the entire Order will be canceled.

Upon successful completion, a comment will be added to the Order indicating items have been canceled. This comment will not be visible to the customer who placed the Order.

Item Quantities that have already been Invoiced/Shipped cannot be canceled.

Canceled quantities can be put back later with Restore Canceled Items (/sales2/order/restoreCanceledItems). When return_to_stock is 1, Zoey records how much went back to stock so a restore can take exactly that back out.

Items cannot be Canceled for Orders that are in the complete, closed, or canceled state.

ParamTypeNotesRequired
order_idintegerThe internal ID of the Order object. Note that this is not the customer facing Order Number.Yes
reasonstringThe reason why the items are being canceled. This will be included in the Order comment indicating items have been canceled.Yes
return_to_stockinteger1/0 flag indicating if the canceled quantity should be returned to stock.No
itemsArray of ItemYes

Item

ParamTypeNotesRequired
item_idintegerThe unique ID for this Order Item. This value can be found in the item_id field when retrieving an Order with the APIYes
qty_to_cancelfloatThe quantity to cancel. Note that this cannot be greater than the quantity ordered for the item.Yes
uses_packagesinteger1/0 flag indicating if the item uses packaging.No
package_infoPackageInfoWhen uses_packages is 1, provide the package_info column to specify the multiplier.No

PackageInfo

ParamTypeNotesRequired
incrementfloatThe qty_to_cancel will be multiplied by this value when canceling an item that uses packagingYes
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
Responses

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