Rate Limiting
The Invoicetronic API is rate-limited. When the rate limit is eventually hit, clients get a 429 Too Many Requests response until the limit window resets. The windows are global and configured as follows:
| Period | Limit | Reset |
|---|---|---|
| Second | 100 requests | Every second |
| Minute | 2000 requests | Every minute |
| Day | 100000 requests | Daily |
Let's assume that 2000 requests hit the API within the one-minute window, subsequent requests occurring in that same minute will be blocked with 429. When the minute ends, the window resets, and the API will resume fulfilling requests.
Response Headers
Every API response includes the following rate limit headers:
| Header | Description |
|---|---|
RateLimit-Limit |
The most restrictive per-second permit limit (e.g. 100). |
RateLimit-Policy |
All active rate limit windows in the format limit;w=seconds (e.g. 100;w=1, 2000;w=60, 100000;w=86400). |
When a request is rejected with 429 Too Many Requests, the response also includes:
| Header | Description |
|---|---|
Retry-After |
Seconds to wait before retrying (e.g. 1). |
Tip
Your client should be prepared to handle 429 responses even if they are unlikely. When you receive a 429, read the Retry-After header to know exactly how long to wait before retrying. Don't let your client crash in a well-known, documented scenario like this; it would harm the end-user experience.