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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package shiprocket-php-sdk

shiprocket-php-sdk

PHP SDK for the Shiprocket External API (v1).

Requirements

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


All versions of shiprocket-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-json Version *
guzzlehttp/guzzle Version ^7.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tims/shiprocket-php-sdk contains the following files

Loading the files please wait ...