# Order Cancellation Use the Order Cancellation endpoint to cancel entire orders or specific line items (bag items) before the shipment moves beyond the invoicing or packing stage. Once a shipment is invoiced, partial cancellations are no longer permitted. > **Request Type**: `POST` **Scheme**: `HTTPS` **Endpoint**: `https://{{host}}/oms/v3/shipment/cancel` Try out Fynd Konnect's Order Cancellation Endpoint br **Common Request Header** | Header | Mandatory | Description | | --- | --- | --- | | `x-access-token` | Yes | Access token used for authenticating API requests to Fynd Konnect | Important Considerations - Supports bulk cancellations of upto 20 orders. - A valid `reasonCode` must be provided for each bag item in the request. - Entire shipment cancellations are allowed up until the bag is `packed` or has been picked by the delivery partner. - Partial (line-item) cancellations are permitted only **before** an order is invoiced/packed. ### Body ## Success Response ### API Call Example ## Reason Codes Below are common reason codes used when canceling items: | **Reason** | **Code** | | --- | --- | | Price mismatch | 8 | | Out of stock | 6 | | Damaged product | 9 | | Product not as per description | 7 | | Store permanently closed | NA | ## Cancellation Scenarios Cancellation requests are influenced by the order’s current state. The tables below outline typical success or failure conditions for `entire` vs. `partial` (line-item) cancellations. ### Entire Shipment Cancellation Success Cases 1. **State:** Created - Cancellation succeeds if the entire shipment is in created state on Fynd. 2. **State:** Cancelled by Customer - Redundant but accepted. The entire shipment is already canceled; system logs reflect the request. 3. **State:** Cancelled by Seller - Similar redundancy scenario; system logs the request as a success. 4. **State:** Any Pre-Packed - If the bag is not yet packed or invoiced, a complete cancellation is allowed. Failure Cases 1. **State:** Bag Packed → Onward - Once a bag is in packed (or in shipped, dispatched states), a complete cancellation is not allowed. ### Part Shipment Cancellation Success Cases 1. **State:** Created - Partial cancellation succeeds if the shipment is in the created state (e.g., bag not yet confirmed). 2. **State:** Cancelled by Customer - If items are already canceled by the customer, partial cancellation requests are accepted for remaining items. 3. **State:** Cancelled by Seller - Similarly, partial cancellation can occur if the seller has partially canceled items. 4. **State:** Any State Before Invoicing - Partial cancellations are successful if the order is not yet invoiced or packed. Failure Cases 1. **State:** Post-Invoicing - Any partial cancellation attempt after invoicing will fail (invoiced state or beyond). ## Error Codes | **Reason** | **Code** | **Description** | | --- | --- | --- | | Partial order cancellation is not permitted | C422 | If a partial cancellation is requested after invoicing | | Order cancellation is not permitted | C400 | If cancellation request is raised after the bag is packed | | Invalid orderId/orderItemId | C500 | If `orderId` doesn't belong to the requested location or the given `orderItemId` is not in the order | | Cancel quantity exceeds order quantity | | If the requested cancellation quantity is greater than what was originally ordered | | Invalid order cancellation reason code | | If the provided cancellation reason code is invalid or unrecognized | Next Steps * To confirm the order, head over to [Order Confirmation](/konnect/channels/erp-wms/api-documentation/orders/post-order-confirmation)