2xx range indicate Success; the request is successfully received, understood, and accepted. Whereas, codes in the 4xx range indicate a client error — the request contains bad syntax or cannot be fulfilled. Errors in the 5xx indicate a server error — the server failed to fulfil an apparently valid request. For generic knowledge on the status code, see this topic.
Here is a generic list of error codes and what they imply in the context of Pleo:
| Code | Error Type | Definition/Reasons | Resolution |
|---|---|---|---|
| 400 | Bad Request | The server could not understand the request due to invalid syntax. | This error occurs when required information is missing or there is a validation error. Hence, review your request and ensure that you have entered all the mandatory data and the information is in the correct format. |
| 401 | Unauthorized | The client’s request is unauthorised. This may occur for any of the following reasons: • The JWT token has expired • The token that you have used is in the wrong format • You are using an incorrect token • You have entered any token in the authorisation header | • You must get a new JWT token for accessing the Export API resources • Verify the token format • Use the correct refresh token • Check whether you have entered the token in the authorisation header • If the token has expired, initiate a new authorisation request • Review the token format • Ensure that you are using the correct refresh token and it has not expired • Check whether you have entered the correct token in the authorisation header |
| 403 | Forbidden | The client does not have enough access to perform the intended action. | Contact your developer partner manager for providing you access. |
| 404 | Not Found | The server cannot find the requested resource. | Review your request — either you have entered incorrect information or the resource does not exist. |
| 500 | Internal Server Error | The server has encountered a situation that it does not know how to handle. | Retry your request after some time. |
| 502 | Bad Gateway | The server, while acting as a gateway or proxy, received an invalid response from the upstream server. | Retry your request after some time. |
| 503 | Service Unavailable | The server is not ready to handle the request, primarily due to being overloaded or the server is under maintenance. | Retry your request after some time. |