Cerclen API

Errors and limits

The error envelope, the status codes, rate limits and caching.

The error envelope

Every error has the same shape:

{
  "code": "forbidden",
  "params": { "reason": "cannot_create_request" },
  "fields": null
}
  • code is one of a short, fixed list, matching the HTTP status.
  • params.reason, when present, says which rule refused the call.
  • fields lists what was wrong with the body, for 422: each with its path (such as deal_ids) and code.

Status codes

StatuscodeCommon params.reason
400bad_requestempty_message: a message with no text and no links
401unauthenticatedno_api_key, invalid_api_key; see Keys
403forbiddenread_only_key, cannot_create_request, cannot_edit_request, cannot_transition, cannot_post
404not_foundUnknown, outside your key's deals, or not yours to see
409conflictdeal_archived (archived deals read only), invalid_transition (a status the request can't move to), number_taken, section_has_no_status
422validation_failedSee fields
429rate_limitedToo many calls; see below
500internalOur fault: retry later, and tell us the X-Request-ID

Who may do what is the same as in the app. The side that runs the request list raises, edits and assigns requests (its admins and editors); either side answers and moves the status (anyone but a viewer).

Rate limits

Each key may make about 600 calls a minute. Past that, calls answer 429 with a Retry-After header, in seconds, and params.retry_after saying the same. Wait that long, then carry on. Each key counts on its own.

Request ids

Every response carries an X-Request-ID header. When something goes wrong, quote it to Cerclen: it finds the call in our logs.

Caching

GET responses carry an ETag. Send it back as If-None-Match and an unchanged response is a 304 Not Modified with no body: cheap to poll.

On this page