429 Too Many Requests HTTP response. When this happens, wait before retrying the request.
Rate limit response headers
For every API request within the allowed rate limit, Tesouro returns the following HTTP headers:| HTTP header | Description |
|---|---|
RateLimit-Limit | The number of requests allowed per second. Same as X-RateLimit-Limit-Second. |
RateLimit-Remaining | The number of available requests remaining in the current second. Same as X-RateLimit-Remaining-Second. |
RateLimit-Reset | The time remaining, in seconds, until the rate limit quota is reset. |
X-RateLimit-Limit-Second | The number of requests allowed per second. Same as RateLimit-Limit. |
X-RateLimit-Remaining-Second | The number of available requests remaining in the current second. Same as RateLimit-Remaining. |
Retry-After header indicating how many seconds to wait before sending another request:
Handling rate limits
- Monitor rate limit headers: Check
RateLimit-Remainingon each response to track your remaining quota. - Implement a backoff strategy: If you receive a
429response, wait for the duration specified in theRetry-Afterheader before retrying. Consider using exponential backoff for retries.
If the current rate limiting levels are not satisfactory for your integration, please contact your Account Manager at Tesouro to request an adjustment.