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 CODE | DESCRIPTION |
|---|---|
200 & 202 - OK & Accepted | Everything worked as expected, and you'll get a response. Some APIs may respond with an error message if data is invalid. |
400 - Bad Request | The request was invalid or cannot be otherwise served. |
401 - Unauthorized | There is some error during validation. You need to check your token or credentials. |
404 - Not Found | The URI requested is invalid or the resource requested does not exist. |
405 - Method Not Allowed | The API was accessed using the wrong method. Check your HTTP method. |
422 - Unprocessable Entity | It means the request contains incorrect syntax or cannot be fulfilled. Try checking your code for errors. |
429 - Too Many Requests | You have exceeded the API call rate limit. |
500, 502, 503, 504 - Server Errors | Some server error has occurred. Some APIs may show this due to syntax or parameter errors. Try contacting support if this persists. |