When something goes wrong with our APIs we will send you a error message.

Our API follow the rest specification for error codes

  • 401 for unauthorized calls
  • 404 for not found
  • 400 for validation errors
  • 500 for application error

The basic error object structure looks like this

{
    "status": "BAD_REQUEST",
    "timestamp": "14-01-2022 06:45:33",
    "message": "validation error",
    "debugMessage": "validation error"
}

If the error is generated by a failed object validation it will also contains all the validation information

{
    "status": "BAD_REQUEST",
    "timestamp": "14-01-2022 06:45:33",
    "message": "validation error",
    "debugMessage": "validation error",
    "violations": [
        {
            "fieldName": "code",
            "message": "The code already exists"
        }
    ]
}