Shiprocket

Shiprocket API

Ship in India through one API: orders, courier rates, AWB, pickup, labels, manifests, tracking and cancellation on Shiprocket.

Logistics & shippingGuided#shipping#courier#india#awb#tracking#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

Shiprocket is an Indian shipping aggregator: one account and one API give you rates and pickups from many courier partners (Delhivery, Xpressbees, Blue Dart, Ecom Express, Shadowfax, Amazon Shipping and others). Its REST API on apiv2.shiprocket.in covers the whole forward-shipment lifecycle: create an order, check which couriers serve the route and at what price, assign an AWB (air waybill), schedule a pickup, print the label, invoice and manifest, track the parcel and cancel it if needed. This guided collection walks through that lifecycle in order.

Get API credentials

  1. Sign up at app.shiprocket.in/register and complete KYC; recharge the wallet, because AWB assignment deducts the freight from it.
  2. In the panel go to Settings > API > Add New API User and choose Create API User.
  3. Use an email address that is different from your main login, pick the modules the user may access and whether buyer details are visible, then create the user.
  4. Copy the API user's password immediately (it is shown once) and put the email and password into apiEmail and apiPassword. Up to four API users can exist per account. See the API user help article.

Authentication

Call Generate token (POST /auth/login) with the API user's email and password. It returns a JWT in token, which the collection saves and sends on every other request as Authorization: Bearer <token>. Shiprocket's help centre says a token is valid for 240 hours (10 days), so regenerate it before then or on any 401. Token logout invalidates it.

Base URL and environments

https://apiv2.shiprocket.in/v1/external. There is no sandbox: every call with valid credentials changes real data in your account, and assigning an AWB debits your wallet. Test with a pickup location you own and cancel test shipments before the courier is out for pickup.

Variables and run order

  1. Fill apiEmail and apiPassword, then run 1. Start here (token, wallet balance, pickup locations). Copy your pickup location's nickname into pickupLocation and its pincode into pickupPincode.
  2. 2. Orders: Create a custom order saves orderId (Shiprocket's order id) and shipmentId.
  3. 3. Ship it: check serviceability (saves the recommended courierId), assign the AWB (saves awbCode), request the pickup, then generate the label, invoice and manifest.
  4. 4. Tracking by AWB, shipment or your own order number.
  5. 5. Cancel and settings: cancel the shipment and the order, add a pickup location, log out.

Your own order_id (sent at creation) and Shiprocket's order_id (returned) are different values: almost every later call wants the Shiprocket one.

Limits and pricing

Freight is charged per shipment from your prepaid wallet at the rate the serviceability call shows (weight slab, zone, COD fee). Plans and rate cards are at shiprocket.in/pricing. The API returns 429 when you exceed its rate limit; back off and retry. Bulk tracking takes at most 50 AWBs per call and bulk shipment cancellation up to 2000.

Common errors

HTTPMeaningWhat to do
401Token missing, expired or wrongRun Generate token again.
400Invalid data (for example an unknown channel id)Read message.
404Wrong path or idCheck that you used the Shiprocket order or shipment id.
422Validation failederrors lists each field; reusing an order_id of a cancelled order also returns 422.
429Rate limitBack off and retry.
500Server error, sometimes caused by bad parametersRe-check the body; contact support if it persists.

Some endpoints answer 200 with an error message in the body, so check the fields the description names.

Links

Endpoints 23

1. Start here

  • POSTGenerate token/auth/loginLogs in with the API user (not your main panel login) and returns a JWT in token, which the test script saves into token for every other request. Shiprocket…
  • GETGet wallet balance/account/details/wallet-balanceReturns your Shiprocket wallet balance. AWB assignment deducts freight from this wallet, so check it before shipping; a negative or low balance makes Generate…
  • GETGet all pickup locations/settings/company/pickupLists the pickup addresses (warehouses) on your account. Orders refer to a pickup location by its nickname in pickup_location, so copy the one you will ship…

2. Orders

  • POSTCreate a custom order/orders/create/adhocCreates a quick (ad hoc) order whose products are not stored in your catalogue. This is the usual first call from your store backend. Shiprocket returns its…
  • GETGet order details/orders/show/{{orderId}}Returns one order with its customer, products, payment and shipment details, using Shiprocket's order id in the path (orderId, saved by Create a custom…
  • GETList orders/ordersLists the orders in your account, newest first by default, with their products and shipments as nested arrays. Use paging and filters for sync jobs or…
  • POSTUpdate delivery address/orders/address/updateChanges the customer's name and delivery address on an order before it ships, using Shiprocket's order id. Use it when the buyer corrects an address after…

3. Ship it

  • GETCheck courier serviceability/courier/serviceability/Lists the couriers that serve a pickup and delivery pincode pair, with freight, COD charges, estimated delivery date and ratings. Call it at checkout to show…
  • POSTAssign AWB/courier/assign/awbAssigns a courier and an AWB (air waybill / tracking number) to the shipment. This is the step that books the courier and debits freight from your wallet.…
  • POSTRequest pickup/courier/generate/pickupAsks the assigned courier to collect the shipment. The AWB must already be assigned; generate the manifest after this succeeds. Pickups that fall on a Sunday…
  • POSTGenerate label/courier/generate/labelCreates the shipping label PDF for one or more shipments that already have an AWB, and returns its URL. Print it and stick it on the parcel before the courier…
  • POSTGenerate invoice/orders/print/invoiceCreates the tax invoice PDF for one or more orders and returns its URL; couriers expect an invoice inside or on the parcel. Pass Shiprocket order ids (not…
  • POSTGenerate manifest/manifests/generateCreates the manifest, the hand-over sheet the courier signs at pickup, for shipments that have an AWB and a pickup request. Several shipment ids can go in one…
  • POSTPrint manifest/manifests/printReturns the PDF of a manifest that was already generated, looked up by Shiprocket order id. Use it to reprint the hand-over sheet; call Generate manifest…
  • GETGet shipment details/shipments/{{shipmentId}}Returns one shipment by Shiprocket shipment id (shipmentId): courier, AWB, weight, dimensions, charges, delivery address, status and the label and manifest…

4. Tracking

  • GETTrack by AWB/courier/track/awb/{{awbCode}}Returns the tracking status and scan history of one shipment by its AWB (awbCode). Use it for a 'track my order' page. What comes back: tracking_data with…
  • POSTTrack several AWBs/courier/track/awbsTracks up to 50 shipments in one call; pass the AWB codes as a string array. Use it in a scheduled job that refreshes open shipments. What comes back: an…
  • GETTrack by shipment id/courier/track/shipment/{{shipmentId}}Returns tracking for a shipment by Shiprocket shipment id, handy when you stored the shipment id but not the AWB. The response has the same tracking_data…
  • GETTrack by your order id/courier/trackReturns tracking using the order number from your own store (the order_id you sent when creating the order, not Shiprocket's). Add channel_id when the same…

5. Cancel and settings

  • POSTCancel shipment (by AWB)/orders/cancel/shipment/awbsCancels shipments by AWB before the courier marks them out for pickup, and releases the freight back to the wallet according to Shiprocket's rules. Up to 2000…
  • POSTCancel order/orders/cancelCancels one or more orders by Shiprocket order id. Cancel the shipment first if an AWB was assigned. A cancelled order's own order_id cannot be reused for a…
  • POSTAdd a pickup location/settings/company/addpickupAdds a new pickup address (warehouse) to the account. Its nickname becomes the pickup_location value for orders; the phone must be verified (in the panel)…
  • POSTToken logout/auth/logoutInvalidates the current token. Call it when an integration is retired or a token may have leaked; afterwards every request needs a fresh Generate token. What…

API details

Base URL
https://apiv2.shiprocket.in/v1/external
Authentication
A bearer token in the Authorization header
Operations
23 operations on 23 pathsPOST 14GET 9
Main resources
1. Start here 32. Orders 43. Ship it 84. Tracking 45. Cancel and settings 4
Description format
Swastik Codes guided collection, API version checked against the docs on 2026-11-18

How to test the Shiprocket 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 Shiprocket API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses A bearer token 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 “Generate token” (POST /auth/login), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Shiprocket API?

Ship in India through one API: orders, courier rates, AWB, pickup, labels, manifests, tracking and cancellation on Shiprocket. It is listed under Logistics & shipping and has 23 endpoints.

Who publishes the Shiprocket API?

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

What is the base URL of the Shiprocket API?

Requests go to https://apiv2.shiprocket.in/v1/external. Endpoint paths are added to this base URL.

How do I authenticate with the Shiprocket API?

With A bearer token in the Authorization header.

How many endpoints does the Shiprocket API have?

23 operations on 23 paths (14 POST, 9 GET). The largest groups are 1. Start here, 2. Orders, 3. Ship it, 4. Tracking.

Is forking the Shiprocket 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.