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


Common Request Header

HeaderMandatoryDescription
x-access-tokenYesAccess 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

orderIdstringrequired

Unique identifier for the order to be canceled

orderItemsArray of objects

Success Response

payloadCountinteger

Number of payloads in the request

successCountinteger

Number of successfully processed payloads

failedCountinteger

Number of payloads that failed

statusstring

Status of the API call

errorsArray of objects

Empty if everything succeeded

API Call Example

curl -i -X POST \
  https://fyndkonnect.konnect.uat.fyndx1.de/oms/v3/shipment/cancel \
  -H 'Content-Type: application/json' \
  -H 'x-access-token: YOUR_API_KEY_HERE' \
  -d '[
    {
      "orderId": "string",
      "orderItems": [
        {
          "orderItemId": "string",
          "quantity": 0,
          "reasonCode": "string"
        }
      ]
    }
  ]'
Response
application/json
{ "payloadCount": 2, "successCount": 2, "failedCount": 0, "status": "SUCCESS", "errors": [] }

Reason Codes

Below are common reason codes used when canceling items:

ReasonCode
Price mismatch8
Out of stock6
Damaged product9
Product not as per description7
Store permanently closedNA

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

ReasonCodeDescription
Partial order cancellation is not permittedC422If a partial cancellation is requested after invoicing
Order cancellation is not permittedC400If cancellation request is raised after the bag is packed
Invalid orderId/orderItemIdC500If orderId doesn't belong to the requested location or the given orderItemId is not in the order
Cancel quantity exceeds order quantityIf the requested cancellation quantity is greater than what was originally ordered
Invalid order cancellation reason codeIf the provided cancellation reason code is invalid or unrecognized
Next Steps