Every Public API response uses the same JSON envelope regardless of whether
the request succeeded:
{
"status": "success",
"code": 200,
"name": "OK",
"message": "...",
"info": { }
}
| Field | Description |
|---|
status · string | "success" for 2xx responses, "error" for non-2xx. |
code · integer | HTTP status code (200, 201, 422, 500, …). Mirrors the HTTP response code. |
name · string | Short HTTP status name — "OK", "Created", "Unprocessable Entity", … |
message · string | Human-readable result summary. |
info · object | Payload. Omitted when the response carries no data. |
The HTTP status code is the authoritative signal. code and status
duplicate it for clients that cannot easily inspect HTTP headers.
Standard error responses
| HTTP status | When you see it |
|---|
400 Bad Request | Invalid JSON, unknown parameter, or malformed request. |
401 Unauthorized | Missing or invalid API key (X-API-Key header or api-key query param), or api_status disabled. |
403 Forbidden | Key is valid but belongs to a different role. |
404 Not Found | Resource not found or not visible to this account. |
422 Unprocessable Entity | Validation failed — see info.errors. |
500 Internal Server Error | Server-side problem. Retry with backoff. |
Validation errors (422)
When validation fails the server returns 422. Each key in info.errors
is the failing field name; the value is an array of error strings:
{
"status": "error",
"code": 422,
"name": "Unprocessable Entity",
"message": "Validation error",
"info": {
"errors": {
"email": ["Email cannot be blank."],
"currency": ["Currency must be a valid ISO code."]
}
}
}
Retry guidance
4xx — client problem, fix the request before retrying.
5xx — transient server problem. Retry with exponential backoff
(start 1 s, max 60 s, add 0–25% jitter).
GET and PUT on a known resource are always safe to retry.