Documentation / Guides
Errors | Salary Data API
ErrorsEvery error code, what it means and what to do.
An error answer has no data, only error: a code that never changes, a message for people, and docs, a link to read more. upgrade_required also names the plan.
{
"error": {
"code": "upgrade_required",
"message": "Rank countries comes with Pro and above. This key is on Free key.",
"plan": "pro",
"pricing": "https://salarydataapi.com/pricing",
"docs": "https://salarydataapi.com/documentation/plans-and-limits"
}
}| Code | HTTP | What it means, and what to do |
|---|---|---|
| bad_request | 400 | A value is not what the parameter takes, a required one is missing, or a key was sent in the address. Read the message: it names the parameter and what it should be. |
| unknown_parameter | 422 | The call has a parameter the endpoint does not take. The answer lists, in allowed, the parameters it does take. |
| unauthorized | 401 | No key was sent, or the key is not active. Send your key in Authorization: Bearer or X-API-Key. Your account shows your current key. |
| upgrade_required | 403 | The endpoint, or what you asked of it, comes with a bigger plan. The answer names the plan in plan, and links pricing. |
| not_found | 404 | No endpoint is at that address, or no record has that id. Ids look like se_7qk3m2xa; take them from an answer as they came. |
| rate_limited | 429 | More calls a second than the plan takes. Wait for Retry-After (a second) and go on more slowly. |
| quota_exceeded | 429 | The plan's calls for the day or the month are used up. It starts again at resets_at. Calls are refused, never billed. |
| server_error | 500 | Something went wrong on our side. It is logged. Try again in a moment. |
An empty result is not an error: it is a 200 with an empty data and meta.count 0, often with a note on what to ask instead.