Shiprocket

Shiprocket

Welcome to Shiprocket's API Documentation. We've designed this document to help developers and Shiprocket users fully understand and integrate our API for a seamless and easy deployment. These APIs enable you to utilize most of your Shiprocket account's panel features fully.

We've listed all the APIs, their required parameters, and their example requests and responses on the right for easy understanding. The easiest way to start using the Shiprocket APIs is by clicking the Run in Postman button above. The Postman is a free tool that helps developers run and debug API requests.

Our APIs are based around REST architecture and use the basic HTTP request methods. Our APIs accept JSON - encoded body requests and return data in the same form.

Read through the following sections for the integration process.

Getting Started

First, you need to register with ShipRocket and create an account. Click on this link to complete the sign-up process.

After the sign-up process is complete, follow the enlisted steps to create an API user:

  1. Open your Shiprocket account and navigate to the left-hand panel.
  2. Click On Settings => API => Configure => Create an API user.
  3. On the pop-up menu, fill in the email (this should be different from the one used to register to ShipRocket).
  4. Fill in an appropriate password and confirm the password.
  5. Click on 'Generate API Credential'. On successful completion, you should have a new API user-generated.
  6. The next step will be to use the Authentication API to obtain an authentication token. Copy this token and use it to authenticate your further API calls.

Document and API Usage Guidelines

Errors and Response codes

While using Shiprocket's APIs, you may run into some standard response and error codes. The most common ones are listed along with their descriptions as follows:

RESPONSE CODEDESCRIPTION
200 & 202 - OK & AcceptedEverything worked as expected, and you'll get a response. Some APIs may respond with an error message if data is invalid.
400 - Bad RequestThe request was invalid or cannot be otherwise served.
401 - UnauthorizedThere is some error during validation. You need to check your token or credentials.
404 - Not FoundThe URI requested is invalid or the resource requested does not exist.
405 - Method Not AllowedThe API was accessed using the wrong method. Check your HTTP method.
422 - Unprocessable EntityIt means the request contains incorrect syntax or cannot be fulfilled. Try checking your code for errors.
429 - Too Many RequestsYou have exceeded the API call rate limit.
500, 502, 503, 504 - Server ErrorsSome server error has occurred. Some APIs may show this due to syntax or parameter errors. Try contacting support if this persists.

Webhooks

You can set up a webhook with Shiprocket to get tracking updates. We will proactively notify your system whenever there is a new tracking event for an order.

Setup:

When we get a new tracking event, a POST request is made to the callback URL you added to your Shiprocket account.

Webhook Specifications:

Sample Body:

{
"awb":"19041424751540",
"courier_name":"Delhivery Surface",
"current_status":"IN TRANSIT",
"current_status_id":20,
"shipment_status":"IN TRANSIT",
"shipment_status_id":18,
"current_timestamp":"23 05 2023 11:43:52",
"order_id":"1373900_150876814",
"sr_order_id":348456385,
"awb_assigned_date":"2023-05-19 11:59:16",
"pickup_scheduled_date":"2023-05-19 11:59:17",
"etd":"2023-05-23 15:40:19",
"scans":[
{
"date":"2023-05-19 11:59:16",
"status":"X-UCI",
"activity":"Manifested - Manifest uploaded",
"location":"Chomu_SamodRd_D (Rajasthan)",
"sr-status":"5",
"sr-status-label":"MANIFEST GENERATED"
},
{
"date":"2023-05-19 15:32:17",
"status":"X-PPOM",
"activity":"In Transit - Shipment picked up",
"location":"Chomu_SamodRd_D (Rajasthan)",
"sr-status":"42",
"sr-status-label":"PICKED UP"
},
{
"date":"2023-05-19 16:40:19",
"status":"X-PIOM",
"activity":"In Transit - Shipment Recieved at Origin Center",
"location":"Chomu_SamodRd_D (Rajasthan)",
"sr-status":"6",
"sr-status-label":"SHIPPED"
},
{
"date":"2023-05-19 17:19:14",
"status":"X-DBL1F",
"activity":"In Transit - Added to Bag",
"location":"Chomu_SamodRd_D (Rajasthan)",
"sr-status":"NA",
"sr-status-label":"NA"
},
{
"date":"2023-05-20 10:27:56",
"status":"X-DLL2F",
"activity":"In Transit - Bag Added To Trip",
"location":"Chomu_SamodRd_D (Rajasthan)",
"sr-status":"18",
"sr-status-label":"IN TRANSIT"
},
{
"date":"2023-05-20 12:23:44",
"status":"X-ILL2F",
"activity":"In Transit - Trip Arrived",
"location":"Jaipur_Sez_GW (Rajasthan)",
"sr-status":"18",
"sr-status-label":"IN TRANSIT"
},
{
"date":"2023-05-20 14:24:50",
"status":"X-ILL1F",
"activity":"In Transit - Bag Received at Facility",
"location":"Jaipur_Sez_GW (Rajasthan)",
"sr-status":"18",
"sr-status-label":"IN TRANSIT"
},
{
"date":"2023-05-20 15:23:38",
"status":"X-IBD3F",
"activity":"In Transit - Shipment Received at Facility",
"location":"Jaipur_Sez_GW (Rajasthan)",
"sr-status":"18",
"sr-status-label":"IN TRANSIT"
},
{
"date":"2023-05-20 15:23:38",
"status":"X-DWS",
"activity":"In Transit - System weight captured",
"location":"Jaipur_Sez_GW (Rajasthan)",
"sr-status":"NA",
"sr-status-label":"NA"
},
{
"date":"2023-05-20 16:01:22",
"status":"X-DBL1F",
"activity":"In Transit - Added to Bag",
"location":"Jaipur_Sez_GW (Rajasthan)",
"sr-status":"NA",
"sr-status-label":"NA"
},
{
"date":"2023-05-21 09:50:45",
"status":"X-DLL2F",
"activity":"In Transit - Bag Added To Trip",
"location":"Jaipur_Sez_GW (Rajasthan)",
"sr-status":"18",
"sr-status-label":"IN TRANSIT"
},
{
"date":"2023-05-22 22:01:12",
"status":"X-ILL2F",
"activity":"In Transit - Trip Arrived",
"location":"Bhiwandi_Mega_GW (Maharashtra)",
"sr-status":"18",
"sr-status-label":"IN TRANSIT"
},
{
"date":"2023-05-23 02:55:34",
"status":"X-ILL1F",
"activity":"In Transit - Bag Received at Facility",
"location":"Bhiwandi_Mega_GW (Maharashtra)",
"sr-status":"18",
"sr-status-label":"IN TRANSIT"
},
{
"date":"2023-05-23 07:38:08",
"status":"X-DLL2F",
"activity":"In Transit - Bag Added To Trip",
"location":"Bhiwandi_Mega_GW (Maharashtra)",
"sr-status":"18",
"sr-status-label":"IN TRANSIT"
},
{
"date":"2023-05-23 09:48:27",
"status":"X-ILL2F",
"activity":"In Transit - Trip Arrived",
"location":"Mumbai_MiraRdIndEstate_I (Maharashtra)",
"sr-status":"18",
"sr-status-label":"IN TRANSIT"
},
{
"date":"2023-05-23 10:14:27",
"status":"X-ILL1F",
"activity":"In Transit - Bag Received at Facility",
"location":"Mumbai_MiraRdIndEstate_I (Maharashtra)",
"sr-status":"18",
"sr-status-label":"IN TRANSIT"
},
{
"location":"Mumbai_MiraRdIndEstate_I (Maharashtra)",
"date":"2023-05-23 11:43:46",
"activity":"In Transit - Shipment Received at Facility",
"status":"X-IBD3F",
"sr-status":"18",
"sr-status-label":"IN TRANSIT"
}
],
"is_return":0,
"channel_id":3422553,
"pod_status":"OTP Based Delivery",
"pod":"Not Available"
}

Support:

Operations

Get Integrated Channel Details
Get Country Codes
Generate AWB for Shipment
Request for Shipment Pickup
Check Courier Serviceability
Get Tracking Data for Multiple AWBS
Get Tracking Data through Order iD
Get Inventory Details
Get All Listings
Import Catalog Mappings
Map Channel Product
Export Catalog Sample
Get All NDR Shipments
Get Specific NDR Shipment Details
Change/Update Pickup Location of Created Orders
Update Customer Delivery Address
Create Channel Specific Order
Export your orders
Add Inventory for Ordered Product
Get all Orders
Import Orders in Bulk
Map Unmapped Products
Get Specific Order Details
Get All Products
Bulk Import Products
Add New Products
Get Sample .csv Format
Get Specific Product Details
Get All Pickup Locations
Get All Shipment Details