ShiftDocs

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.

POST/api/v1/open/return

Return destination

There is no fulfillment_type field. Send exactly one of these:

SendReturn is delivered toSKUs
drop_locationYour own addressAny SKU
warehouse_codeA fulfilment warehouseACTIVE 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

FieldRequiredDescription
pickup_locationRequiredWhere the carrier collects the return (usually the customer). Same contact rules as orders.
pickup_location.addressRequiredFull address required; address_uid is not supported for returns.
drop_location or warehouse_codeOne ofSee Return destination.
carrier_codeRequiredFrom the same return quote as request_id. Bluedart and DTDC are not supported for returns.
request_idRequiredFrom a return quote (returnOrder: true).
return_reason_codeOptionalIf sent, an exact uppercase code from the return-reason list, enabled on your account.
qc_neededOptionaltrue or false, default false.
weight_gramsRequiredAbove 0. Applicable weight at most 25 kg.
product_detailsRequiredAt least one item.
hsn_code/sku_codeRequiredAn ACTIVE catalog SKU with warehouse_code; any SKU with drop_location.
quantityRequired1 to 100.
commodity_valueRequiredAbove 0, per unit. The return value is the sum of commodity_value × quantity.
dimensionsRequiredRequired 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.

SituationResponse
Both or neither of drop_location and warehouse_code422 Provide exactly one of drop_location or warehouse_code
Returns to a warehouse not enabled for your account403 Returns to a warehouse require the FULFILLMENT SERVICES plan
pickup_location uses address_uid422 address_uid is not supported for returns
dimensions missing422 dimensions is required for returns
Invalid or lowercase return_reason_code422 Invalid return_reason_code (lists the allowed values)
Return reason disabled on your account422 not enabled for this account
Product not marked returnable422 These products are not returnable: <SKU>
quantity above 100422
SKU not in your catalog with warehouse_code422 Product SKU not found
Bluedart or DTDC as carrier_codeNot supported for returns
request_id from a forward quote422 Quote mismatch: request_id is from a forward cost estimate
Carrier, weight or pincodes differ from the quote422 Quote mismatch, naming the field
Wallet balance too low422 Insufficient wallet balance

Stuck on an integration?

Your account manager can put you in touch with our tech team.

Talk to us