code field for programmatic handling and the message for human-readable context. Include X-Request-Id whenever you contact support.{
"success": false,
"message": "Human-readable message",
"code": "machine_readable_code",
"error_data": {}
}application/jsonX-Request-Id header is included in error responseserror_data can embed a error flatten format (see example below)| HTTP | code | When it happens | How to fix |
|---|---|---|---|
| 400 | invalid_input | Parameters are missing, malformed, out of range, or violate schema | Check Common Params for formats (e.g., dates YYYYMMDD, per_page ≤ 1000). Correct field names/types. |
| 401 | not_authorized | Missing or invalid Bearer token; server does not know who you are | Send Authorization: Bearer <YOUR_API_KEY>. Verify the token value and header spelling. |
| 403 | forbidden | Token is valid but the operation/resource is not allowed for this key | Contact support if you believe your key should have access. |
| 404 | not_found | Resource or endpoint doesn’t exist, or ID/date is outside available range | Check the URL (/v1/...), dataset availability, IDs, and date ranges. |
| 405 | method_not_allowed | HTTP method isn’t supported for the endpoint (most endpoints are GET) | Switch to the supported method as documented on the endpoint page. |
| 409 | conflict | Conflicting parameters or state (e.g., mutually exclusive filters) | Remove mutually exclusive params; align from/to ranges; re-check your request semantics. |
| 429 | rate_limited | Rate limit exceeded | Honor Retry-After; implement backoff + jitter; reduce concurrency/page size. |
| 500 | internal_error | Unexpected server error | Retry with exponential backoff. If persistent, contact support with X-Request-Id. |
| 503 | service_unavailable | Temporary unavailability (maintenance, upstream outage) | Retry after a short delay; check status page. |
401 vs 403: 401 not_authorized→ missing/invalid token (server doesn’t know your identity).403 forbidden→ token recognized, but insufficient rights or blocked for that resource.
invalid_input)error_data may include a error flatten structure for precise field diagnostics:{
"success": false,
"message": "Invalid input",
"code": "invalid_input",
"error_data": {
"formErrors": ["Unrecognized key: \"extraKey\""],
"fieldErrors": {
"per_page": ["Invalid input: must be <= 1000"],
"date": ["Invalid input: expected YYYYMMDD"]
}
}
}YYYYMMDD (e.g., 20250131)per_page ≤ 1000not_authorized{
"success": false,
"message": "Missing or invalid API key",
"code": "not_authorized",
"error_data": {}
}Authorization: Bearer <YOUR_API_KEY> and ensure the token is correct.not_found{
"success": false,
"message": "Resource not found",
"code": "not_found",
"error_data": {}
}/v1/...), dataset availability, and identifiers.rate_limited{
"success": false,
"message": "Rate limit exceeded, retry in 12 seconds.",
"code": "rate_limited",
"error_data": {}
}X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-AfterRetry-After, use exponential backoff + jitter, and page your requests.internal_error{
"success": false,
"message": "Internal error",
"code": "internal_error",
"error_data": {}
}X-Request-Id when emailing support./v1, correct endpoint, HTTP method = GET (unless noted).Authorization: Bearer <YOUR_API_KEY> (no extra spaces/quotes).YYYYMMDD, per_page ≤ 1000, parameter names match docs.Retry-After and tune concurrency/page size.X-Request-Id, copy the response JSON, and email support.