Download the PHP package tims/shiprocket-php-sdk without Composer
On this page you can find all versions of the php package tims/shiprocket-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tims/shiprocket-php-sdk
More information about tims/shiprocket-php-sdk
Files in tims/shiprocket-php-sdk
Package shiprocket-php-sdk
Short Description PHP SDK for the Shiprocket External API (v1)
License MIT
Homepage https://github.com/timslabs/shiprocket-php-sdk
Informations about the package shiprocket-php-sdk
shiprocket-php-sdk
PHP SDK for the Shiprocket External API (v1).
Requirements
- PHP 8.0 – 8.x (
^8.0) ext-json- Guzzle 7
Authentication
Create an API user in the Shiprocket panel: Settings → API → Configure → Create an API User (not your panel login).
Authenticate with email and password to receive a JWT (valid for 10 days / 240 hours). Send it as Authorization: Bearer {token} on subsequent requests.
Or manage the token yourself:
Quick start
Successful responses are decoded JSON arrays. Failed HTTP responses throw Tims\Shiprocket\ApiException.
API groups
Base URL: https://apiv2.shiprocket.in/v1/external
| Method | Coverage |
|---|---|
$sr->auth() |
Logout |
$sr->orders() |
Create / update / cancel / address / fulfill / mapping / import / export / invoice / returns |
$sr->couriers() |
Serviceability, courier list, AWB, pickup, label, manifest, track (AWB / shipment / order / bulk) |
$sr->shipments() |
List / show / create forward & return |
$sr->pickup() |
List / add pickup locations |
$sr->products() |
Catalogue + bulk import / sample |
$sr->inventory() |
List / update |
$sr->listings() |
Channel catalog mappings (list / link / import / export) |
$sr->channels() |
Channels, countries, zones, postcode details |
$sr->account() |
Wallet balance, statement, billing discrepancy |
$sr->ndr() |
NDR list / details / action |
$sr->imports() |
Bulk import error / status check |
$sr->international() |
International orders, couriers, manifest, KYC, bank details |
$sr->warehouse() |
Warehouse SRF serviceability (/v1/warehouse, not under /v1/external) |
This mirrors the External API surface on apidocs.shiprocket.in, plus warehouse SRF.
Low-level escape hatch for any path (relative to /v1/external, or host-absolute like /v1/warehouse/...):
Webhooks
Tracking webhooks are inbound (Shiprocket POSTs to your URL). Configure them in the panel under Settings → API → Webhooks. This SDK does not register webhook routes; handle the POST in your app (optional x-api-key header). Sense APIs are a separate product and are not part of this client.
Error handling
Configuration
| Constructor / option | Default | Purpose |
|---|---|---|
ApiClient $basePath |
https://apiv2.shiprocket.in/v1/external |
Override API base |
ApiClient $httpClient |
new Guzzle client | Inject custom client (tests, middleware) |
ApiClient $guzzleOptions |
[] |
Extra Guzzle options |
AccessTokenGenerator $baseUrl |
https://apiv2.shiprocket.in |
Override auth host |
Laravel
For config, JWT caching, retries, and a facade, use tims/laravel-shiprocket.
License
MIT