Documentation / Guides

Errors | Salary Data API

Errors

Every 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"
  }
}
CodeHTTPWhat it means, and what to do
bad_request400A 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_parameter422The call has a parameter the endpoint does not take. The answer lists, in allowed, the parameters it does take.
unauthorized401No 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_required403The endpoint, or what you asked of it, comes with a bigger plan. The answer names the plan in plan, and links pricing.
not_found404No 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_limited429More calls a second than the plan takes. Wait for Retry-After (a second) and go on more slowly.
quota_exceeded429The plan's calls for the day or the month are used up. It starts again at resets_at. Calls are refused, never billed.
server_error500Something 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.