How to avoid hitting the rate limit
API rate limit
Our current Impala Stay's rate limit is 50 requests per second, per API key. As the limit is on the API key, these limits are independent in the test and production environments.
When reaching the API limit, the API response will contain RATE_LIMIT_EXCEEDED.
Webhook rate limit
The Webhooks have 500 requests per minute, per hotel.
When reaching the API limit, the API response will contain RATE_LIMIT_EXCEEDED.
How to avoid hitting the rate limit
Make sure you only request what you need. Here are some ways you can reduce your number of requests:
-
Optimise your code to eliminate any unnecessary API calls.
For example: are some requests getting data items that aren't used in your application?
-
Cache frequently-used data.
You can cache data on the server or the client using DOM storage. You can also save relatively static information in a database or serialise it in a file.