univoozAPI
Errors

rate_limit_exceeded

You sent too many requests.

HTTP 429rate_limit_error

Limits apply to your organization, for all of its keys together. More keys do not give more capacity.

Test mode has the same limits, with separate counters.

Why it happens

PolicyLimitEndpoints
sustained20 req/sAll
geocoding10 req/sPOST /v1/orders, POST /v1/orders/quote, POST /v1/addresses/validate
order-list2 req/sGET /v1/orders

Univooz measures over a 10-second period. So sustained permits 200 requests in 10 seconds. Short groups of requests are acceptable. A continuous loop is not.

The narrow policies are additional to sustained. A GET /v1/orders uses both.

The message gives the policy.

How to fix it

Wait for the number of seconds in Retry-After. Then send fewer requests.

Better: read the headers on every response and slow down before the error:

RateLimit-Policy: "sustained";q=200;w=10, "order-list";q=20;w=10
RateLimit: "sustained";r=196;t=7, "order-list";r=18;t=7

r is your remaining number of requests. t is the seconds until it resets.

Read GET /v1/orders one time every 30 seconds. A plan of 5,000 orders each month is approximately seven orders each hour. One request each second gives approximately 500 requests for each order.

For faster information, use webhooks.

Example response

{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded for policy 'order-list'.",
    "doc_url": "https://docs.univooz.com/errors/rate_limit_exceeded",
    "request_id": "req_01KZCCF8ZH4M7XQ2VB9RSTNPKD"
  }
}

On this page