Error Codes
Quickly identify and resolve API request failures.
Overview
The parcelLab API uses standard HTTP status codes to indicate whether a request was successful or not. In case of an error, the response body will contain details of the error (for example: 401 Unauthorized – No valid credentials given
).
HTTP Status Codes
When you make an API call, receiving a 2xx response (for example: 200 OK) would indicate that the client’s request was successfully received, understood, and processed by the server.
For a failed API request, error codes are categorized into different groups to indicate specific issues encountered during the request process:
4xx client errors - these codes indicate issues with the client's request (for example: incorrect parameters or unauthorized access)
5xx server errors - these codes indicate that the server failed to process the request
Error Code Examples
Some example error codes are described in the following table.
400
Bad Request
This is returned when there is an issue with the information provided in the request, often due to incorrect format or missing required parameters/fields.
401
Unauthorized
This is returned when the authentication fails or the authentication information is not provided as part of the request.
403
Forbidden
This is returned when the client does not have the rights to perform the request.
404
Not Found
This is returned when the requested resource cannot be found.
405
Method Not Allowed
This is returned when an endpoint is called with an unexpected HTTP method.
500
Internal Server Error
This is returned when the API server encounters an unexpected error.
Last updated
Was this helpful?