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.
| Param | Type | Notes | Required |
|---|---|---|---|
| order_id | integer | The internal ID of the Order object. Note that this is not the customer facing Order Number. | Yes |
| reason | string | The reason why the items are being canceled. This will be included in the Order comment indicating items have been canceled. | Yes |
| return_to_stock | integer | 1/0 flag indicating if the canceled quantity should be returned to stock. | No |
| items | Array of Item | Yes |
Item
| Param | Type | Notes | Required |
|---|---|---|---|
| item_id | integer | The unique ID for this Order Item. This value can be found in the item_id field when retrieving an Order with the API | Yes |
| qty_to_cancel | float | The quantity to cancel. Note that this cannot be greater than the quantity ordered for the item. | Yes |
| uses_packages | integer | 1/0 flag indicating if the item uses packaging. | No |
| package_info | PackageInfo | When uses_packages is 1, provide the package_info column to specify the multiplier. | No |
PackageInfo
| Param | Type | Notes | Required |
|---|---|---|---|
| increment | float | The qty_to_cancel will be multiplied by this value when canceling an item that uses packaging | Yes |
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
