Errors
LipaLater uses standard HTTP response codes to communicate the success or failure of an API request. Conventionally, codes in the 2xx
range indicate a success. Codes in the 4xx
range indicate an error e.g an error attributed to not providing all the required request params. 5xx range would mean there's an issue with LipaLater's servers.
This section on errors is not exhaustive and as we continue to test the API and cover more edge cases we will update the document accordingly. The end goal is to document all possible errors and provide a guide on how to handle them.
Attributes
Property | type | Description |
---|---|---|
data | json | response payload |
success | boolean | whether the request was successfull or not. |
code | string | The HTTP status code generated by our server. |
msg | string | A description of the problem. Helps the client application correct the problem as opposed to giving debugging information. |
Status code | Description |
---|---|
200 - OK | Everything worked as expected |
400 - Bad Request | The request was unacceptable, often due to missing a required parameter. |
401 - Unauthorized | No valid API key provided |
402 - Request Failed | The parameters were valid but the request failed |
403 - Forbidden | The API key doesn't have permissions to perform the request. |
404 - Not Found | The requested resource doesn't exist. |
429 - Too Many Requests | Too Many Requests have been sent to the server in a given amount of time |
500, 502, 503, 504 - Server Errors | Something went wrong |
Sample Error Response
{
"code": 500,
"msg": "No credentials",
"data": null,
"success": false
}
Request IDs
Each time a request is made to the LipaLater API a request ID is generated and sent back to your application in the X-Request-ID HTTP header. The request ID helps us track requests faster and accelerates issue resolution in scenarios whereby a particular request failed and you need our support.