ShiftDocs

Get started

Conventions

How requests and responses are shaped, and the rules every booking has to follow.

Response format

Successful calls return HTTP 200 with the result inside data:

{
  "data": {}
}

Errors return a 4xx or 5xx status with a human-readable message. There is no separate error-code field. One exception: when a carrier refuses a cancellation, the cancel APIs return 200 with data.success set to false and a data.message explaining why.

Data rules

RuleDetail
Field namingRequest bodies use snake_case (order_number, weight_grams). The cost estimates body and the tracking query parameters use camelCase (originPin, orderNumber).
EnumsUppercase and exact: SELF, WAREHOUSE, COD, PPD. Lowercase values are rejected.
Phone numbers10 digits starting with 6 to 9, with no +91 or 0 prefix.
Pincodes6-digit numbers (100000 to 999999).
UnitsWeights in grams, dimensions in cm. The maximum applicable weight is 25 kg.
Order and return numbersGenerated as OB-{companyId}-{sequence} when you don't send one.
Unknown fieldsIgnored.
Validation orderRequest fields are validated before credentials, so an invalid body returns 422 even if the API key is wrong.

Applicable weight

Carriers charge on the higher of actual and volumetric weight. Always quote and book using this applicable weight. For example, a 500 g parcel measuring 20 × 15 × 10 cm is charged at 600 g, so quote it with weightInGrams: 600.

Quote matching

Every booking must match the quote behind its request_id. If it doesn't, the booking is rejected with 422 Quote mismatch and nothing is saved. The booking must use the same:

  • seller account and quote type (forward or return)
  • applicable weight
  • pickup and delivery pincodes
  • carrier (carrier_code from the same quote as request_id)
  • payment type (COD or prepaid), for forward orders

The order's payment_details.amount may not be more than 1 above the quote's declaredValue. Get a fresh quote for each new order or return.

Stuck on an integration?

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

Talk to us