Skip to main content

Cancel purchase order

PATCH 

/v1/entities/:entity_id/purchase_orders/:uuid/cancel

Cancels a purchase order that has not started receiving stock.

Requires the purchase_orders:write scope.

A purchase order can be cancelled while its status is draft or ordered, it has no receipts, and none of its incoming stock has been updated in Shopify yet. Otherwise the request returns 422. The is_cancellable field says whether a purchase order can be cancelled now. An API key can cancel a purchase order, but cannot mark one as ordered, receive it or delete it.

An in_transit purchase order can be cancelled while none of its Shopify transfers has been created in Shopify. The response is 200 with status still in_transit; it changes to cancelled once the transfers are withdrawn, shortly after. Sending the cancel again in the meantime returns the same 200. If a transfer already exists in Shopify, the request returns 422 and you cancel the transfer in Shopify instead; if the transfers are still syncing, it returns 422 and you try again shortly.

Request​

Responses​

Purchase order cancelled. For an in_transit purchase order, the cancel was accepted and status stays in_transit until the transfers are withdrawn.