Errors
The error format and HTTP codes of the OurScent API, and what to do about each.
Every error has the same shape, with a request_id — send it to us when asking about a call.
JSON
{
"error": {
"code": "insufficient_credits",
"message": "No credits left on this account. Top up or upgrade.",
"request_id": "req_41ab…"
}
}| HTTP | code | Meaning |
|---|---|---|
400 | bad_request | A missing or invalid parameter |
401 | unauthorized | Key missing, wrong or revoked |
402 | insufficient_credits | No credits left: top up or upgrade |
403 | forbidden_scope | Outside the key’s scopes, or from a disallowed IP/origin |
404 | not_found | The perfume or resource does not exist |
413 | payload_too_large | Image larger than 10 MB |
415 | unsupported_media_type | Not a JPEG, PNG or WebP |
429 | rate_limited | Over the rate limit: wait for Retry-After |
503 | unavailable | Temporarily busy: retry |
Calls that return an error spend no credit.