Errors & Status Codes
Our APIs use conventional HTTP response status codes to indicate the success or failure of a request. A 200
means that an API returned a matching record, and a 404
means that an API neither found nor returned a matching record. Any 4xx
code besides a 404
indicates that there was an issue with the request, and 5xx
codes indicate that an internal issue with the API occurred.
Error & Status Response Fields
When an API call fails (does not return 200
or 404
response code), it will return an error response to help debug what went wrong with the request. The error response will be a JSON object with the following fields:
Field Name | Type | Description |
---|---|---|
status | Integer | The HTTP response status code. |
error | Object | The object containing the error type and message. See error codes for examples. |
error.type | String | The error type. |
error.message | String | The error message. |
Example 404 Response
{
"status": 404,
"error": {
"type": "not_found",
"message": "No records were found matching your request"
}
}
Example 429 Response
{
"status": 429,
"error": {
"type": "rate_limit_error",
"message": "An error occurred due to requests hitting the API too quick"
}
}
Error Codes
Status | Status/Error Name | Description |
---|---|---|
400 | invalid_request_error | The request contained either missing or invalid parameters. |
401 | authentication_error | The request contained a missing or invalid key. |
402 | payment_required | You have reached your account maximum (all matches have been used). |
405 | invalid_request_error | You cannot use the request method on the requested resource. |
429 | rate_limit_error | An error occurred due to requests hitting the API too quick. |
5xx | api_error | The server encountered an unexpected condition that prevented it from fulfilling the request. |
Status Codes
Status | Status/Error Name | Description |
---|---|---|
200 | request successful | If Search API, your request was successful. If Enrichment API: your request yielded a match. |
404 | not_found | While technically labeled as an error in the response, this simply means there were no profiles found matching your request. |
Best Practice
Use proper error handling techniques for all status codes and error codes. This is especially essential for looped Search API requests.
Updated about 2 months ago