Every error has the same body.
{
"error": {
"code": "invalid_api_key",
"message": "The API key is not valid.",
"fields": null
}
}Use code in your code. message is for people and may change. fields lists messages per field on validation_error.
Codes
| Code | Status |
|---|---|
validation_error | 400 |
invalid_api_key | 401 |
api_key_expired | 401 |
account_not_approved | 403 |
account_suspended | 403 |
service_not_enabled | 403 |
permission_denied | 403 |
not_found | 404 |
method_not_allowed | 405 |
idempotency_conflict | 409 |
in_progress | 409 |
payload_too_large | 413 |
unsupported_media_type | 415 |
mvr_state_unavailable | 422 |
rate_limited | 429 |
internal_error | 500 |
rate_limit_unavailable | 503 |
price_unavailable | 503 |
payload_too_large is a POST over 32 MB. unsupported_media_type is a POST that isn't multipart. rate_limited and rate_limit_unavailable come with Retry-After.
A missing SSN with CDLIS is a validation_error on ssn. The order codes are explained in Orders. Any other error answers request_failed with its HTTP status.