HomeBook a Demo

Errors

The Partner API error format, every error code, request IDs, and which errors to retry.

The Partner API is in private preview and available by invitation. If you're a partner interested in early access, contact support@getinline.io.

Every API error has the same JSON shape:

{
  "error": {
    "code": "not_found",
    "message": "Not found",
    "request_id": "c0ffee00-0000-4000-8000-000000000000"
  }
}
FieldMeaning
error.codeA code for your program. Branch on it, or on the HTTP status.
error.messageA message for people. The wording can change, so do not parse it.
error.request_idThis request's ID, also in the X-Request-Id header. null when the response did not come from the API itself (see responses from outside the API).

Error codes

StatusCodeMeaningRetry?
400invalid_requestA parameter is invalid: a bad date or date range, or a cursor reused with different parameters. The message names the parameter.No. Fix the request.
401unauthorizedThe token is missing, malformed, unknown, revoked, or expired.No. Check the token.
403forbiddenThe token does not have the required scope (the message names it), or your organization cannot use this endpoint.No.
404not_foundThe path or publisher does not exist, or your token cannot see it.No.
405method_not_allowedThe path does not accept this method. The Allow header lists the methods it accepts.No.
429rate_limitedToo many requests. See rate limits.Yes, after Retry-After or with backoff.
500internal_errorSomething went wrong on our side.Yes, with backoff.
503unavailableThe report took too long to produce.Yes, with backoff, or ask for less data.

We may add codes. Handle an unknown code by its HTTP status: retry a 5xx with backoff, and do not retry a 4xx other than 429.

Request IDs

Every API response has an X-Request-Id header, and error bodies repeat it in error.request_id. Log it with every failure. Quote it when you contact support@getinline.io so we can find the request.

Responses from outside the API

A few responses are sent before the request reaches the API. The most common is a 429 for a rate limit. These can have a different body or no X-Request-Id. When they use the error shape, request_id is null. Always check the HTTP status first.

Retries

  • Retry 429, 500, and 503 with exponential backoff and jitter: for example, after 1, 2, 4, then 8 seconds, up to a limit. If a 429 has a Retry-After header, wait that many seconds instead.
  • Do not retry any other 4xx without changing the request.
  • If a report keeps returning 503, ask for fewer days or one publisher_id. See revenue report errors.