Restore Canceled Items

This endpoint restores canceled Item Quantities on an Order: the reverse of Cancel Items. The restored quantity becomes open again on the same Order Item, ready to ship and invoice.

Upon successful completion, a comment is added to the Order with each restored quantity, how much was taken out of stock, and the reason. This comment is not visible to the customer who placed the Order.

Only canceled quantities can be restored: qty_to_restore cannot be greater than the item's canceled quantity.

Canceled Items cannot be restored for Orders in the canceled, closed or payment_review state. A complete Order goes back to processing after a restore.

Bundle products and gift cards cannot be restored.

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 restored. This will be included in the Order comment.Yes
deduct_from_stockbooleanLeave out to match the cancellation: the quantity the cancellation returned to stock is taken back out (for items canceled before this was tracked, the store's Return Qty to Stock When Order is Canceled setting decides). true takes every restored unit out of stock; false leaves stock unchanged. When units are taken out of stock and a product doesn't have enough (and doesn't allow backorders), nothing is restored.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 API. Use the parent item for a configurable product.Yes
qty_to_restorefloatThe quantity to restore. Note that this cannot be greater than the item's canceled quantity.Yes

Error codes (in the error message)

CodeDescription
SORCI-E-001The Order is canceled, closed or in payment review.
SORCI-E-002No item with a quantity above 0 was provided.
SORCI-E-003Invalid quantity: item not found on the Order, a child item, or more than its canceled quantity.
SORCI-E-004Bundle or gift card item.
SORCI-E-005No reason provided.
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