Appearance
Shiprocket
Shiprocket is the original provider surface in this repository. The ShiprocketClient authenticates with email and password, caches the bearer token, and refreshes it automatically once on a 401 response.
Start here
API reference
Guides
Examples
Official resources
FAQ
How do I authenticate with Shiprocket?
Create a ShiprocketClient with your Shiprocket email and password. The first API call logs in, caches the token in memory for 10 days, and reuses it until it expires or a request returns 401.
What operations does ShiprocketClient support?
Orders (create, list, fetch, cancel), shipments, courier serviceability and rates, AWB tracking, label generation, pickup requests, and manifests. See the API reference for the full method list.
Does the SDK refresh Shiprocket tokens automatically?
Yes. When a request returns 401, the client refreshes the token and retries that request. The client does not cap the number of refreshes, and there is no other automatic retry behavior; see retries.
Do I need a Shiprocket account to use the SDK?
Yes. The SDK calls Shiprocket's live API, so you need Shiprocket API credentials and an active account. The package itself is MIT-licensed and free.