Skip to the content
YallaRoute

Help · Developers: API keys and webhooks

API errors and rate limits

An error is answered with a matching HTTP status and a body holding error.code, a stable code your program can branch on, and error.message, a sentence for people. Each key may make 120 requests in any 60 seconds; keyless tracking is limited per address. Over the limit, the answer is 429 with a Retry-After header in seconds.

Updated

Where
Your own system; Console, Developers (request log)
Who can do it
Developers
Plans
REST API is included in Growth, Scale and Enterprise

In detail

Branch on error.code, never on the wording of error.message, which can be improved at any time. Some errors carry more: validation_failed lists each wrong field in error.fields as field, code and message, insufficient_scope names required_scope, and invalid_parameter names the param.

Error codes
StatusCodeMeaning and what to do
400invalid_jsonThe body is not a JSON object. Fix the request.
400invalid_parameterA query parameter is outside its range. error.param names it.
400invalid_cursorThe cursor was not issued by the API or is over 15 minutes old. Start the listing again.
400invalid_idempotency_keyIdempotency-Key must be 1 to 120 printable characters with no spaces.
401missing_keyNo Authorization: Bearer header was sent.
401invalid_keyThe key is wrong or has been revoked.
402plan_feature, plan_limitThe plan does not include this, or a plan limit has been reached. error.plan says which plan.
403insufficient_scopeThe key's scope is too low. error.required_scope names the one needed.
403forbiddenA sender-bound key asked for another sender's data or something company-wide.
403workspace_suspendedThe workspace is suspended, so its keys are refused.
404not_found, unknown_endpointNothing has that id, or the path is not an endpoint.
409not_cancellableThe parcel is already out for delivery or finished.
409request_in_progressThe first request with this Idempotency-Key is still running. Retry shortly.
413payload_too_largeThe body is over 64 KB.
422validation_failedOne or more fields are wrong. See error.fields.
422idempotency_key_reusedThe Idempotency-Key was used before with a different body. Use a new key.
429rate_limitedToo many requests. Wait the seconds in Retry-After.
429too_many_attemptsOver 30 requests a minute with keys that are not valid from one address.
500server_errorSomething failed on our side. Retry with back-off.

Address refusals

When a booking's address is the problem, error.fields has an entry for address with one of three codes: address_not_found (the address could not be placed; correct it or send coordinates), address_lookup_unavailable (the lookup did not answer; retry shortly or send coordinates) and outside_coverage (your coverage refuses bookings there).

Rate limits

  • Per key: 120 requests in any rolling 60 seconds.
  • Keyless calls (the index and public tracking): 60 a minute from one address.
  • Answers carry X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (when the oldest request in the window drops out, in Unix seconds).
  • A 429 carries Retry-After in seconds. Wait at least that long before the next request.

If you need more, spread work over time, use webhooks instead of polling, and use a separate key per system: each key has its own allowance.

Try it in your own workspace

A new workspace has the Scale features for its first 14 days. Open one and follow this article with your own data.