Delhivery

Delhivery B2C API

Delhivery last-mile shipping: pincode checks, waybills, warehouses, shipments, labels, pickups, tracking, cancel and NDR actions.

Logistics & shippingGuided#shipping#courier#india#tracking#waybill#ecommerce

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Delhivery is one of India's largest express logistics companies. Its last-mile (B2C express) API lets a merchant or platform check whether a pincode is serviceable, reserve waybill (tracking) numbers, register pickup warehouses, create forward and reverse-pickup shipments, print packing slips (shipping labels), book pickups, track packages, edit or cancel them and act on failed deliveries (NDR). This guided collection follows Delhivery's own integration order: serviceability, warehouse, waybill, shipment creation, label, pickup, tracking, then edit/cancel and NDR.

Get credentials

Delhivery does not hand out API keys from a public sign-up form.

  1. Open a business account with Delhivery (through delhivery.com or your Delhivery sales / BD contact).
  2. Ask your account manager for API access. You receive the client name (the HQ or account name, used as cl and client), a user id and an API token, first for staging; a separate production token is issued once your integration passes testing (UAT).
  3. Logged-in clients can also read the staging and production URLs and test calls in the Delhivery One developer portal: ucp.delhivery.com/developer-portal/documents. See Client developer portal.
  4. Put the token in apiToken, the client name in clientName and the exact warehouse name in pickupLocation. Keep the token private: it identifies your account for every call.

Authentication

Send the token in the Authorization header as Token <api token> (the word Token, a space, then the key). This collection sets that header for every request. The waybill and pull-tracking endpoints are documented with the token as a token query parameter, so those requests also send it there.

Base URLs (staging vs production)

EnvironmentHost
Staging / testhttps://staging-express.delhivery.com
Productionhttps://track.delhivery.com

Paths are identical on both; only the host and the token change. baseUrl starts on staging. Staging and production tokens are different and do not work on the other host.

Variables and run order

Fill apiToken, clientName and pickupLocation, then run the folders in order: 1. Start here (pincode check and waybills, saving waybill), 2. Warehouse (only if your pickup location is not registered yet), 3. Shipments (create saves waybill and orderRef), 4. Label and pickup, 5. Tracking and charges and 6. Change, cancel and NDR.

Rules worth knowing

  • The pickup_location.name in a shipment must match a registered warehouse name exactly (case sensitive).
  • Shipment creation sends the JSON as format=json&data=<json> in the body, not as a bare JSON object.
  • Weights are in grams; an e-waybill (ewbn) is required when the shipment value is Rs 50,000 or more.
  • Avoid &, #, %, ; and backslashes in free-text fields.

Limits and pricing

Freight is billed per your Delhivery rate card (zone, weight slab, COD and RTO charges); the shipping-charge API gives an estimate. Documented limits: pull tracking 750 requests per 5 minutes per IP; bulk waybill at most 10,000 per call and 50,000 per 5 minutes; shipping-charge 40 requests per minute. Over a limit the IP is throttled for about a minute.

Common errors

ResponseMeaningWhat to do
401 "Login or API Key Required" / "You couldn't be authenticated"Token missing, wrong, or for the other environmentCheck Token <key> and the host.
200 with success: false and rmkShipment not createdRead rmk and packages[].remarks (duplicate order id, missing pincode, client not active).
401 "Invalid Pickup Location ClientWarehouse matching query does not exist."Warehouse name does not matchUse the exact registered name.
400 "Insufficient parameters specified"Pickup request missing fieldsSend time, date, location and count.
415 Unsupported media typeWrong Content-TypeSend application/json.
Error: parameter ref_ids/ref_nos or waybill is requiredTracking without an idPass waybill or ref_ids.

Links

Endpoints 14

1. Start here

  • GETCheck pincode serviceability/c/api/pin-codes/json/Checks whether Delhivery serves a delivery pincode and which payment types it supports there. Call it at checkout before promising delivery. Pass one pincode…
  • GETReserve waybills in bulk/waybill/api/bulk/json/Reserves a batch of waybill (AWB) numbers for your account so you can print labels before creating shipments. Optional: shipment creation assigns a waybill…
  • GETFetch one waybill/waybill/api/fetch/json/Reserves a single waybill number per call. Use it when you create shipments one at a time and want the number before calling Create shipment; the test script…

2. Warehouse

  • POSTCreate a client warehouse/api/backend/clientwarehouse/create/Registers a pickup location (warehouse) and its return address. The name you choose is what shipments and pickup requests must send, exactly and…

3. Shipments

  • POSTCreate shipment (forward)/api/cmu/create.jsonManifests a forward shipment from your warehouse to a customer and returns its waybill. Leave waybill empty to have one assigned, or paste one from folder 1.…
  • POSTCreate reverse pickup/api/cmu/create.jsonCreates a reverse pickup (RVP): Delhivery collects a parcel from the customer and brings it to your warehouse, or to the return_* address when you send one.…
  • POSTEdit shipment/api/p/editChanges details of a shipment after it is manifested: consignee name, address or phone, COD amount (cod), weight in grams (gm), dimensions, product details or…

4. Label and pickup

  • GETGet packing slip (label data)/api/p/packing_slipReturns the data for the shipping label of one or more waybills: consignee, address, barcodes, sort code, COD amount, return address and so on. Delhivery…
  • POSTCreate pickup request/fm/request/new/Asks Delhivery to send a pickup executive to your warehouse to collect manifested shipments. Only one open pickup request per warehouse at a time: book the…

5. Tracking and charges

  • GETTrack by waybill/api/v1/packages/json/Returns the current status and the full scan history of one or more packages. Use it for 'track my order' pages and to sync statuses; for many packages prefer…
  • GETTrack by your order id/api/v1/packages/json/Same tracking response, looked up by your own order reference instead of the waybill. Useful when your system stores order ids but not Delhivery waybills.…
  • GETEstimate shipping charges/api/kinko/v1/invoice/charges/.jsonCalculates an approximate freight for a shipment from your rate card: zone, base charge, COD, RTO/DTO charges and taxes. Use it to show shipping cost or to…

6. Change, cancel and NDR

  • POSTCancel shipment/api/p/editCancels a package by waybill. Allowed while it is Manifested, In Transit, Pending, Open or Scheduled. A cancelled Prepaid or COD package moves to 'Returned';…
  • POSTAct on NDR (re-attempt, defer, edit)/api/p/updateSubmits actions for packages in non-delivery (NDR) status, in bulk and asynchronously. Each entry in data names a waybill and an action act: What comes back:…

API details

Base URL
https://staging-express.delhivery.com
https://track.delhivery.com
Authentication
An API key in the Authorization header
Operations
14 operations on 14 pathsGET 7POST 7
Main resources
1. Start here 32. Warehouse 13. Shipments 34. Label and pickup 25. Tracking and charges 36. Change, cancel and NDR 2
Description format
Swastik Codes guided collection, API version checked against the docs on 2026-11-18

How to test the Delhivery B2C API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Delhivery B2C API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses an API key in the Authorization header. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Check pincode serviceability” (GET /c/api/pin-codes/json/), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Delhivery B2C API?

Delhivery last-mile shipping: pincode checks, waybills, warehouses, shipments, labels, pickups, tracking, cancel and NDR actions. It is listed under Logistics & shipping and has 14 endpoints.

Who publishes the Delhivery B2C API?

It is listed from Delhivery's public API description (an OpenAPI document), not published by Delhivery on Swastik Codes. Anyone who controls delhivery.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Delhivery B2C API?

Its description lists 2 base URLs: https://staging-express.delhivery.com, https://track.delhivery.com. The first is the usual one; the others are typically sandbox or regional servers.

How do I authenticate with the Delhivery B2C API?

With an API key in the Authorization header.

How many endpoints does the Delhivery B2C API have?

14 operations on 14 paths (7 GET, 7 POST). The largest groups are 1. Start here, 2. Warehouse, 3. Shipments, 4. Label and pickup.

Is forking the Delhivery B2C API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.