.. _shipmentCancel-label: POST /v3/shipments/cancel ------------------------ **Description** - The Shipment Cancel API enables the seller to cancel order items inside shipment that may already have been approved by the Flipkart Marketplace. Request and Response Parameters ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: toggle .. container:: header **☰ SHOW | HIDE** **URL:** ``https://api.flipkart.net/sellers/v3/shipments/cancel`` **Request Body Parameter** +-----------------------------------------+-------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter/Attribute | Type | Requirement | Description | +-----------------------------------------+-------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | ``shipments`` | List of Shipments | Mandatory | List of shipments which should be cancelled | +-----------------------------------------+-------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | ``shipments``. ``shipmentId`` | String | Mandatory | Primary identifier for a specific shipment. | +-----------------------------------------+-------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | ``shipments``. ``locationId`` | String | Mandatory | Id which refers to seller's dispatch location | +-----------------------------------------+-------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | ``shipments``. ``cancellationGroupIds`` | List | Mandatory | Refers to the group of order items which will be cancelled. | +-----------------------------------------+-------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | ``shipments``. ``reason`` | String | Mandatory | Sub reason chosen for cancellation. cancellation should be one of the below(``cannot_procure_item``, ``not_enough_inventory``, ``b2b_order``) | +-----------------------------------------+-------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ **Validations** :: Shipment Id, Cancellation Groups and Reason are mandatory. Reason should be one of the specified reasons. I.E ``cannot_procure_item`` ,``not_enough_inventory`` and ``b2b_order`` **Response Body Parameters** +-------------------------------------+--------+---------------------------------------------+ | Parameter/Attribute | Type | Description | +=====================================+========+=============================================+ | ``shipments``. ``shipmentId`` | String | Primary identifier for a specific shipment. | +-------------------------------------+--------+---------------------------------------------+ | ``shipments``. ``processingStatus`` | String | ``SUCCESS`` or ``FAILURE`` | +-------------------------------------+--------+---------------------------------------------+ | ``shipments``. ``errorCode`` | String | Error code for any error | +-------------------------------------+--------+---------------------------------------------+ | ``shipments``. ``errorMessage`` | String | Error message | +-------------------------------------+--------+---------------------------------------------+ **Possible Error Response Codes** ============================================ ========================= Error Codes Reason for Error ============================================ ========================= ``EMPTY_OR_INVALID_REASON_FOR_CANCELLATION`` Cancellation reason is empty or invalid ============================================ ========================= | `Try it out! `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |