ShiftDocs

Orders

Ship forward orders

Book a shipment for a forward order: create and ship in one call, or quote and ship an order you created earlier.

The shipping charge for every booking is debited from your WMS wallet. If the balance is too low, the booking fails with 422 Insufficient wallet balance and nothing is saved.

Create and ship a forward order

POST/api/v1/open/outbound/forward

Creates a SELF order and books its shipment in one call. Call Cost estimates first. If the booking fails, nothing is saved, so you can retry with the same order_number.

curl -X POST 'https://wms.shift.in/api/v1/open/outbound/forward' \
  -H 'X-API-Key: <your api key>' \
  -H 'Content-Type: application/json' \
  --data '{
    "order_number": "FWD-TEST-03",
    "fulfillment_type": "SELF",
    "carrier_code": "DES",
    "request_id": "<requestId from cost-estimates>",
    "pickup_location": {
      "name": "Narmada",
      "phone": "9000000003",
      "email": "narmada@example.com",
      "address_uid": 214
    },
    "drop_location": {
      "name": "Moulika",
      "phone": "7993199340",
      "email": "customer@example.com",
      "address": {
        "addressLine1": "456 Customer Street",
        "addressLine2": "Apt 202",
        "city": "Mumbai",
        "state": "Maharashtra",
        "pincode": 400001
      }
    },
    "shipments": {
      "weight_grams": 500,
      "product_details": [
        {
          "hsn_code/sku_code": "12",
          "quantity": 1,
          "description": "Shirt",
          "commodity_value": 100
        }
      ],
      "payment_details": {
        "payment_mode": "PPD",
        "amount": 100,
        "cod_collectible_amount": 0
      },
      "dimensions": {
        "length_cm": 20,
        "breadth_cm": 15,
        "height_cm": 10
      }
    }
  }'

All fields from Create forward order apply, plus:

FieldRequiredDescription
carrier_codeRequiredcarrierCode from the same quote as request_id. Case-insensitive; the carrier name also works.
request_idRequiredrequestId from that quote, copied exactly.
fulfillment_typeOptionalSELF only. WAREHOUSE orders must use Create forward order.

The matching quote for this sample uses originPin set to the pincode of saved address 214, destinationPin: 400001, weightInGrams: 600 (the 600 g volumetric weight is more than the 500 g actual weight), declaredValue: 100, codOrder: false, and dimensions of 20 × 15 × 10 cm.

The response has data.order_id, data.order_number, and data.shipment with trackingNumber, carrierCode, carrierDisplayName, shippingLabelUrl, invoiceUrl, success and responseMessage. Your customer gets the order-received notification only after a successful booking.

Cost estimates for an order

POST/api/v1/open/outbound/cost-estimates

Returns quotes for an order you have already created. The weight, pincodes, declared value and payment mode come from the saved order, so the quote always matches the booking.

curl -X POST 'https://wms.shift.in/api/v1/open/outbound/cost-estimates' \
  -H 'X-API-Key: <your api key>' \
  -H 'Content-Type: application/json' \
  --data '{
    "order_id": 14355
  }'
FieldRequiredDescription
order_idRequireddata.order_id from Create forward order. Must belong to your company.

The response has the same shape as Cost estimates.

Create a forward shipment

POST/api/v1/open/outbound_existing/shipment

Books a shipment for an existing order. Call Cost estimates for an order first.

curl -X POST 'https://wms.shift.in/api/v1/open/outbound_existing/shipment' \
  -H 'X-API-Key: <your api key>' \
  -H 'Content-Type: application/json' \
  --data '{
    "order_id": 14355,
    "carrier_code": "DES",
    "request_id": "<requestId from Cost estimates for an order>"
  }'
FieldRequiredDescription
order_idRequiredThe order to ship. Must belong to your company.
carrier_codeRequiredcarrierCode from the same quote as request_id. Case-insensitive.
request_idRequiredrequestId from that quote, copied exactly.

Response: 200 OK

{
  "data": {
    "trackingNumber": "62042210055123",
    "carrierCode": "DES",
    "carrierDisplayName": "Delhivery(Surface)",
    "shippingLabelUrl": "https://.../ShippingLabel-14355.pdf",
    "invoiceUrl": "https://.../INV-OB-306-100068.pdf",
    "success": true,
    "responseMessage": "Shipment confirmed successfully with Delhivery(Surface)"
  }
}

Booking errors

These apply to both Create and ship and Create a forward shipment. When a booking fails, no order is saved (create and ship) or the order stays NEW (existing order).

SituationResponse
carrier_code or request_id missing422 is required
Unknown carrier_code422 Invalid carrier_code
request_id edited or not from cost estimates422 Invalid request_id
Quote at a different weight, pincode or carrier422 Quote mismatch, naming the field
Quote from a return cost estimate422 Quote mismatch: request_id is from a return cost estimate
Quote issued to another seller422 Quote mismatch: request_id was not issued to your account
COD quote on a prepaid order, or the reverse422 Quote mismatch on payment type
Order amount more than 1 above the quote's declaredValue422 Quote mismatch: order value is higher than the declaredValue
fulfillment_type: "WAREHOUSE" on create and ship422 WAREHOUSE orders cannot be created and shipped in one call
order_id of a return order on Create a forward shipment422 is a return and cannot be booked as a forward shipment
order_id not found, or of another companyOrder not found, or Order does not belong to your account
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