# Cancel an order **POST /v1/orders/cancel_order** Request cancellation of an order. Only warehouse orders in 'new' or 'backordered' status can be cancelled. Orders that have progressed to batched, picked, packed, departed, or complete cannot be cancelled. Cancellation is asynchronous — the response confirms that cancellation has been initiated, not that it is complete. When an order has multiple warehouse orders, some may be cancelled while others cannot, resulting in a partial cancellation (HTTP 206). ## Servers - Public API: https://api.pattern.com/hub (Public API) - Staging API: https://stage-api.pattern.com/hub (Staging API) ## Authentication methods - Bearer auth ## Parameters ### Query parameters - **market_order_id** (string) Marketplace order ID to cancel ## Responses ### 422 Missing or invalid parameters #### Body: application/json (object) - **errors** (array[string]) ### 200 All warehouse orders successfully initiated for cancellation #### Body: application/json (object) - **market_order_id** (string) Marketplace order ID - **success** (boolean) Whether any warehouse orders were successfully cancelled - **message** (string) Cancellation result message - **cancelled_orders** (array[object]) Warehouse orders that were successfully initiated for cancellation - **non_cancellable_orders** (array[object]) Warehouse orders that could not be cancelled ### 206 Partial cancellation — some warehouse orders cancelled, others could not be #### Body: application/json (object) - **market_order_id** (string) Marketplace order ID - **success** (boolean) Whether any warehouse orders were successfully cancelled - **message** (string) Cancellation result message - **cancelled_orders** (array[object]) Warehouse orders that were successfully initiated for cancellation - **non_cancellable_orders** (array[object]) Warehouse orders that could not be cancelled ### 409 No warehouse orders could be cancelled — all beyond cancellable status #### Body: application/json (object) - **market_order_id** (string) Marketplace order ID - **success** (boolean) Whether any warehouse orders were successfully cancelled - **message** (string) Cancellation result message - **cancelled_orders** (array[object]) Warehouse orders that were successfully initiated for cancellation - **non_cancellable_orders** (array[object]) Warehouse orders that could not be cancelled [Powered by Bump.sh](https://bump.sh)