Returns
Create a return
Creates a standalone return (not linked to a forward order) and books its pickup in one call. Call Cost estimates with returnOrder: true first. If the booking fails, nothing is saved. The return shipping charge is debited from your wallet.
Return destination
There is no fulfillment_type field. Send exactly one of these:
| Send | Return is delivered to | SKUs |
|---|---|---|
drop_location | Your own address | Any SKU |
warehouse_code | A fulfilment warehouse | ACTIVE catalog SKUs |
Request
curl -X POST 'https://wms.shift.in/api/v1/open/return' \
-H 'X-API-Key: <your api key>' \
-H 'Content-Type: application/json' \
--data '{
"pickup_location": {
"name": "Moulika",
"phone": "7993199340",
"email": "customer@example.com",
"address": {
"addressLine1": "456 Customer Street",
"city": "Mumbai",
"state": "Maharashtra",
"pincode": 400001
}
},
"warehouse_code": "<your warehouse code>",
"carrier_code": "DES",
"request_id": "<requestId from the return quote>",
"return_reason_code": "CHANGED_MIND",
"qc_needed": false,
"shipments": {
"weight_grams": 500,
"product_details": [
{
"hsn_code/sku_code": "<catalog SKU>",
"quantity": 1,
"description": "Shirt",
"commodity_value": 100
}
],
"dimensions": {
"length_cm": 20,
"breadth_cm": 15,
"height_cm": 10
}
}
}'This sample is a return to a warehouse. Its matching return quote uses returnOrder: true, originPin: 400001, destinationPin set to the warehouse's pincode, weightInGrams: 600, declaredValue: 100, codOrder: false, and dimensions of 20 × 15 × 10 cm.
Fields
| Field | Required | Description |
|---|---|---|
pickup_location | Required | Where the carrier collects the return (usually the customer). Same contact rules as orders. |
pickup_location.address | Required | Full address required; address_uid is not supported for returns. |
drop_location or warehouse_code | One of | See Return destination. |
carrier_code | Required | From the same return quote as request_id. Bluedart and DTDC are not supported for returns. |
request_id | Required | From a return quote (returnOrder: true). |
return_reason_code | Optional | If sent, an exact uppercase code from the return-reason list, enabled on your account. |
qc_needed | Optional | true or false, default false. |
weight_grams | Required | Above 0. Applicable weight at most 25 kg. |
product_details | Required | At least one item. |
hsn_code/sku_code | Required | An ACTIVE catalog SKU with warehouse_code; any SKU with drop_location. |
quantity | Required | 1 to 100. |
commodity_value | Required | Above 0, per unit. The return value is the sum of commodity_value × quantity. |
dimensions | Required | Required for returns; all three above 0 cm. |
Returns have no order_number (it is always generated) and no payment_details (returns are never COD). tax is ignored.
Returnable products
If at least one of your catalog products is marked returnable, catalog products not marked returnable are rejected. If none are marked, this check is off. SKUs not in your catalog are never checked.
Response
data has return_order_id, return_order_number, tracking_number, carrier_code, carrier_display_name and shipping_charges.
Common errors
Booking failures return 422 Return shipment booking failed and save nothing.
| Situation | Response |
|---|---|
Both or neither of drop_location and warehouse_code | 422 Provide exactly one of drop_location or warehouse_code |
| Returns to a warehouse not enabled for your account | 403 Returns to a warehouse require the FULFILLMENT SERVICES plan |
pickup_location uses address_uid | 422 address_uid is not supported for returns |
| dimensions missing | 422 dimensions is required for returns |
Invalid or lowercase return_reason_code | 422 Invalid return_reason_code (lists the allowed values) |
| Return reason disabled on your account | 422 not enabled for this account |
| Product not marked returnable | 422 These products are not returnable: <SKU> |
| quantity above 100 | 422 |
SKU not in your catalog with warehouse_code | 422 Product SKU not found |
Bluedart or DTDC as carrier_code | Not supported for returns |
request_id from a forward quote | 422 Quote mismatch: request_id is from a forward cost estimate |
| Carrier, weight or pincodes differ from the quote | 422 Quote mismatch, naming the field |
| Wallet balance too low | 422 Insufficient wallet balance |
Stuck on an integration?
Your account manager can put you in touch with our tech team.