Errors
When something goes wrong with an API request, the Claims Database API returns a meaningful HTTP status code and a JSON error response. This guide covers the status codes and error formats you may encounter.
Status codes
- Name
200 OK- Description
The request was successful.
- Name
201 Created- Description
A new resource was successfully created (e.g., a claim was submitted).
- Name
401 Unauthorized- Description
No valid API token was provided. Check your
Authorizationheader.
- Name
403 Forbidden- Description
Your company account is inactive or the request is not permitted.
- Name
404 Not Found- Description
The requested endpoint does not exist.
- Name
422 Unprocessable Entity- Description
The request body failed validation. Check the
errorsobject for field-level details.
- Name
429 Too Many Requests- Description
You've exceeded the rate limit. Wait before retrying.
- Name
500 Internal Server Error- Description
An unexpected server error occurred. Contact support if this persists.
Validation errors (422)
When a request fails validation, the API returns a 422 status code with a JSON body detailing each invalid field. The errors object maps field names to arrays of error messages.
422 Validation Error
{
"message": "The claim date cannot be in the future.",
"errors": {
"claim_date": [
"The claim date cannot be in the future."
],
"amount": [
"The amount field must be at least 0."
]
}
}
Authentication errors (401)
If you omit the Authorization header or provide an invalid token, you'll receive a 401 response.
401 Unauthorized
{
"message": "Unauthenticated."
}
Company inactive (403)
If your company account has been deactivated by an administrator, all API requests will be rejected with a 403 status.
403 Forbidden
{
"message": "Your company account is inactive or not found."
}
Rate limiting (429)
The API enforces rate limits to ensure fair usage. Standard endpoints allow 60 requests per minute. The CSV import endpoint allows 10 requests per minute. When you exceed the limit, the response includes a Retry-After header.
429 Too Many Requests
{
"message": "Too Many Attempts."
}