{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"a13d60de-41fe-437d-a2da-b42f3998f780","name":"Shiprocket API","description":"![image](https://www.shiprocket.in/wp-content/uploads/2018/10/SR-e1538741197589.png)\n\n\nWelcome to Shiprocket’s API Documentation. This document is designed to help developers and Shiprocket users in fully understanding and integrating our API's for a seamless and easy deployment. These API's enable you to fully utilise almost all of your Shiprocket account's panel tools. \n\nThe APIs are listed along with their required parameters if any, 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. [Postman](https://www.getpostman.com/) is a free tool which helps developers run and debug API requests.\n\nOur API's are based around [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) architecture, and use the basic [HTTP](https://www.tutorialspoint.com/http/http_status_codes) request methods. Our APIs accept [JSON](https://www.w3schools.com/whatis/whatis_json.asp) - encoded body requests and return back data in the same form.\n\nPlease Note that in order to use all the API's, you will need to [upgrade](https://app.shiprocket.in/billing-plan-details) your Shiprocket plan to Advance or Pro. Read through the following sections for the integration process.\n\n# Getting Started\n\nFirst you need to register with ShipRocket and create an account. Click on this [link](https://app.shiprocket.in/register) to complete the simple sign up process.\n\nAfter the signup process is complete, follow the enlisted steps to create an API user and get started with using our APIs:\n\n   1. Open your Shiprocket account and navigate to the left hand panel.\n   2. Click On **API => Generate API User**.\n   3. On the pop up menu, fill in the **email** (this should be different from the one used to register to ShipRocket).\n   4. Fill in an appropriate password and confirm the password. \n   5. Click on **'Generate API Credential'**. On successful completion, you should have a new API user generated.\n   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.\n\n# Document and API Usage Guidelines\n\n- Our API's use the basic HTTP request codes: *POST*, *GET*, *PATCH*, & *PUT*.\n- You can select the required response and request code language by selecting it from the drop down menu on the top.\n- You can test all our APIs by importing the full API collection through the **'Run in Postman'** button, and running them in the Postman app.\n- **Note**: Any requests made using the valid API credentials will affect the real time data in your Shiprocket account.\n- Please note that in order to use the generated token in your own code, you will need to pass the token in the following format in the appropriate header of your code :\n\n\t\t\tAuthorization: Bearer <YOUR_TOKEN>\n\t\t\t\n\t\t\t\n- All the APIs are provided with their appropriate example requests and responses for successful and failure calls. The  example definitions are:\n    - **Successful Call** : The correct API call was made.\n    - **Invalid Data** : The data entered was incorrect.\n    - **Missing Fields** : Some of the required fields are missing.\n    - **Wrong Format** : There is a syntax error in the code.\n\n- **Note**: The `order_id` defined by you at the time of order creation is your reference order id. The `order_id` which is returned by the API is the *Shiprocket order id*. All our APIs will use this Shiprocket order id to acess your created order unless stated otherwise.\n\n# Errors and Response codes\n\nWhile 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:\n\n| **RESPONSE CODE** | **DESCRIPTION** |\n|------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|\n| `200` & `202` - **OK** & **Accepted** |  Everything worked as expected. The response is displayed or the processing starts.  Some API's may respond with an error message if data is invalid. |\n| `400` - **Bad Request** | The request was unacceptable, often due to missing a required parameter. |\n| `401` - **Unauthorized** | There is some error in validation. You need to check your token or credentials. |\n| `404` - **Not Found** | The URL is inaccessible. This is either due to the wrong URL input or the resource being depriciated.  |\n| `405` - **Method Not Allowed** | The API was accessed using a wrong method. Check your HTTP method. |\n| `422` - **Unprocessable Entity** | It means the request contains incorrect syntax or cannot be fulfilled. Try checking your code for errors. |\n| `429` - **Too Many Requests** | Too many hits were attempted at the API too quickly. Provide the API some time to process. |\n| `500`, `502`, `503`, `504` - **Server Errors** | Some server error occurred. Some APIs may show this due to syntax or parameter errors. Try contacting support if this persists.  |\n\n\n\n\n### Support:\n\n- All the necessary information on integration is laid out in this document. Please read it thoroughly.\n- For any integration and API related support, you can feel free to drop us an email at ***integration@shiprocket.in***.\nFor any other issues, please email us at : ***support@shiprocket.in***.\n- The Shiprocket terms of service are listed here: [Terms Of Service](https://www.shiprocket.in/terms-conditions/)","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"12508904","team":44312638,"collectionId":"a13d60de-41fe-437d-a2da-b42f3998f780","publishedId":"TVCZbXSb","public":true,"publicUrl":"https://documenter-api.postman.tech/view/12508904/TVCZbXSb","privateUrl":"https://go.postman.co/documentation/12508904-a13d60de-41fe-437d-a2da-b42f3998f780","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.12.14","publishDate":"2020-08-27T06:15:10.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://postman-image-service.postman.com/api/cloudinary-proxy/postman/image/upload/t_team_logo_pubdoc/v1/team/43298780cc8e33f7ac26fb14470c426b74faa99a90888826d1047e455ec39814","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/TVCZbXSb"}