Error responses

If the API returns an error the system will return a 4xx status code. The format for all errors is below:

{
    "errors": [
        {
            "code": int,
            "message": "string"
        }
    ]
}

There are various error codes which can be returned and we have not listed all of them but below are some of the more common error codes.

Invalid endpoint / no such endpoint

The below error indicates that the endpoint entered is not a valid endpoint

{
    "errors": [
        {
            "code": 1,
            "message": "No such endpoint, refer back to documentation."
        }
    ]
}

Generic error

This is a generic and unhandled error - you will need to contact our support if you get this error

{
    "errors": [
        {
            "code": 2,
            "message": "Whoops, something went wrong. Please contact an admin."
        }
    ]
}

API key error

The below error indicates that the entered API key is not valid / not valid for the endpoint chosen

{
    "errors": [
        {
            "code": 401,
            "message": "Unauthorised Access : Api key error."
        }
    ]
}

Filter error

This is when the filter string is invalid

{
    "errors": [
        {
            "code": 602,
            "message": "Filter field ['date1'] not allowed. Available filter fields ['first_name','last_name','date','approved','archived']"
        }
    ]
}