Maroo API uses conventional HTTP response codes to indicate the success or failure of an API request. In general:
- Codes in the 2xx range indicate success.
- Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, an operation forbidden, etc).
- Codes in the 5xx range indicate an error with API servers (these are rare).
Code | Name | 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. |
404 | Not Found | The requested resource doesn't exist. |
422 | Unprocessable Entity | The request could not be processed due to a logical error. |
429 | Too Many Requests | Too many requests hit the API too quickly. |
5xx | Server Errors | Something went wrong on our end. |
Some 4xx errors include an error code and readable description that briefly explains the error reported. For example:
{
"timestamp": "2023-11-29T19:20:58.119Z",
"data": null,
"error": {
"code": "illegal_action",
"message": "Payment is already marked as paid"
}
}