Flipkart Partial Cancellation Doc
shipment_id : b7a4cbd8-41d7-46b1-a799-9debc684a6db
1. Flipkart Event During Order Creation
Time : 2023-06-07 06:05:11.579 IST
{
"mps": false,
"shipmentId": "b7a4cbd8-41d7-46b1-a799-9debc684a6db",
"locationId": "LOC01189f32db684bde949e36a36361d181",
"dispatchByDate": "2023-06-07T16:00:00.000+05:30",
"packagingPolicy": "DEFAULT",
"orderItems": [
{
"fsn": "SOPEGNYGRHYDRJBT",
"hsn": "34011919",
"quantity": 1.0,
"orderId": "OD428295316844774100",
"orderItemId": "428295316844774100",
"listingId": "LSTSOPEGNYGRHYDRJBTHDWDRQ",
"title": "BEARDO Activated Charcoal Soap 125",
"priceComponents": {
"sellingPrice": 156.0,
"totalPrice": 159.0,
"shippingCharge": 3.0,
"customerPrice": 159.0,
"flipkartDiscount": 0.0
},
"packageIds": [
"PKGSOPEGNYGRHYDRJBTHDWDRQ",
"PKGSOPEGNYGRHYDRJBTHDWDRQ"
],
"paymentType": "COD",
"is_replacement": false,
"serviceProfile": "Seller_Fulfilment",
"cancellationGroupId": "grp428295316844774100",
"sku": "25UCV3HA6IR",
"orderDate": "2023-06-07T06:00:53.447+05:30",
"status": "APPROVED"
}
],
"dispatchAfterDate": "2023-06-07T06:06:24.000+05:30",
"subShipments": [
{
"subShipmentId": "SS-1",
"packages": []
}
],
"forms": [],
"updatedAt": "2023-06-07T06:03:45.000+05:30",
"hold": false,
"shipmentType": "NORMAL"
}
2. Flipkart Cancelled Event :
API Called : https://api.flipkart.net/sellers/v3/shipments/filter
Request :
{"filter":{"states":["CANCELLED"],"type":"cancelled","cancellationDate":{"from":"2023-06-07T00:30:05Z","to":"2023-06-07T00:45:02Z"},"cancellationType":"buyerCancellation"}}
Time: 2023-06-07 06:15:03.380 IST
{
"shipmentDetail": {
"mps": false,
"shipmentId": "b7a4cbd8-41d7-46b1-a799-9debc684a6db",
"dispatchByDate": "2023-06-07T16:00:00.000+05:30",
"orderItems": [
{
"fsn": "SOPEGNYGRHYDRJBT",
"hsn": "34011919",
"quantity": 1.0,
"orderId": "OD428295316844774100",
"cancellationReason": "cancellation_requested",
"orderItemId": "428295316844774100",
"listingId": "LSTSOPEGNYGRHYDRJBTHDWDRQ",
"title": "BEARDO Activated Charcoal Soap 125",
"priceComponents": {
"sellingPrice": 156.0,
"totalPrice": 159.0,
"shippingCharge": 3.0,
"customerPrice": 159.0,
"flipkartDiscount": 0.0
},
"packageIds": [
"PKGSOPEGNYGRHYDRJBTHDWDRQ",
"PKGSOPEGNYGRHYDRJBTHDWDRQ"
],
"paymentType": "COD",
"is_replacement": false,
"courierReturn": false,
"serviceProfile": "Seller_Fulfilment",
"cancellationGroupId": "grp428295316844774100",
"sku": "25UCV3HA6IR",
"orderDate": "2023-06-07T06:00:53.447+05:30",
"cancellationSubReason": "expensive_now",
"cancellationDate": "2023-06-07T06:03:47.802+05:30",
"status": "CANCELLED"
}
],
"dispatchAfterDate": "2023-06-07T06:06:24.000+05:30",
"subShipments": [
{
"subShipmentId": "SS-1",
"packages": [
{
"packageId": "PKGSOPEGNYGRHYDRJBTHDWDRQ",
"packageSku": "25UCV3HA6IR"
},
{
"packageId": "PKGSOPEGNYGRHYDRJBTHDWDRQ",
"packageSku": "25UCV3HA6IR"
}
]
}
],
"updatedAt": "2023-06-07T06:03:45.000+05:30",
"hold": false,
"shipmentType": "NORMAL"
}
3. Flipkart status at Any Random Time after
eg: Time: 2023-06-08 01:45:05.709 IST
{
"mps": false,
"shipmentId": "b7a4cbd8-41d7-46b1-a799-9debc684a6db",
"locationId": "LOC01189f32db684bde949e36a36361d181",
"dispatchByDate": "2023-06-07T16:00:00.000+05:30",
"packagingPolicy": "DEFAULT",
"orderItems": [
{
"fsn": "SOPEGNYGRHYDRJBT",
"hsn": "34011919",
"quantity": 1.0,
"orderId": "OD428295316844774100",
"orderItemId": "428295316844774100",
"listingId": "LSTSOPEGNYGRHYDRJBTHDWDRQ",
"title": "BEARDO Activated Charcoal Soap 125",
"priceComponents": {
"sellingPrice": 156.0,
"totalPrice": 159.0,
"shippingCharge": 3.0,
"customerPrice": 159.0,
"flipkartDiscount": 0.0
},
"packageIds": [
"PKGSOPEGNYGRHYDRJBTHDWDRQ",
"PKGSOPEGNYGRHYDRJBTHDWDRQ"
],
"paymentType": "COD",
"is_replacement": false,
"serviceProfile": "Seller_Fulfilment",
"cancellationGroupId": "grp428295316844774100",
"sku": "25UCV3HA6IR",
"orderDate": "2023-06-07T06:00:53.447+05:30",
"status": "APPROVED"
}
],
"dispatchAfterDate": "2023-06-07T06:06:24.000+05:30",
"subShipments": [
{
"subShipmentId": "SS-1",
"packages": []
}
],
"forms": [],
"updatedAt": "2023-06-07T06:03:45.000+05:30",
"hold": false,
"shipmentType": "NORMAL"
}
Issue : Since Shipment Already Created and Cancelled it is showing
”shipmentId_already_exist_or_created
"
Solution:
While Cancellation we can check the orderStatus from Flipkart by calling Flipkart’s get orderStatus by shipmentId API.
Request_Curl:
curl --location 'https://api.flipkart.net/sellers/v3/shipments?shipmentIds=b7a4cbd8-41d7-46b1-a799-9debc684a6db' \
--header 'Authorization: Bearer 80561651-09c8-4014-a3a2-bac9ff46038f'
Response:
{
"shipments": [
{
"shipmentId": "b7a4cbd8-41d7-46b1-a799-9debc684a6db",
"dispatchByDate": "2023-06-07T16:00:00.000+05:30",
"dispatchAfterDate": "2023-06-07T06:06:24.000+05:30",
"updatedAt": "2023-06-08T15:21:06.000+05:30",
"locationId": "LOC01189f32db684bde949e36a36361d181",
"hold": false,
"mps": false,
"packagingPolicy": "DEFAULT",
"subShipments": [
{
"subShipmentId": "SS-1",
"packages": []
}
],
"orderItems": [
{
"orderItemId": "428295316844774100",
"orderId": "OD428295316844774100",
"cancellationGroupId": "grp428295316844774100",
"orderDate": "2023-06-07T06:00:53.447+05:30",
"paymentType": "COD",
"status": "RETURNED",
"quantity": 1,
"fsn": "SOPEGNYGRHYDRJBT",
"sku": "25UCV3HA6IR",
"listingId": "LSTSOPEGNYGRHYDRJBTHDWDRQ",
"hsn": "34011919",
"title": "BEARDO Activated Charcoal Soap 125",
"packageIds": [
"PKGSOPEGNYGRHYDRJBTHDWDRQ",
"PKGSOPEGNYGRHYDRJBTHDWDRQ"
],
"priceComponents": {
"sellingPrice": 156.00,
"totalPrice": 159.00,
"shippingCharge": 3.00,
"customerPrice": 159.00,
"flipkartDiscount": 0.00
},
"serviceProfile": "Seller_Fulfilment",
"is_replacement": false
}
],
"forms": [],
"shipmentType": "NORMAL"
}
]
}
Step1 : If "status": "CANCELLED"
, Cancel the order on Eshopbox System
Step 2: If "status": "APPROVED"
, Ignore the order from Cancellation Flow.
Approach 2: While Creating order in Eshopbox, Check for size of “packageIds
[]” and Check for “quantity” if quanity< size of “packageIds
[] update the “quantity” to Increased quantity else Create order with usual flow.