Rate limits
The Marketing Catalog API makes active use of rate limiting. Due to the high volumes of traffic to our API, we have to take measures to try to guarantee maximum stability and uptime for all of our users. Sometimes the API gets hits with extreme volumes of requests, and allowing those to reach the internal landscape at bol makes it difficult to make these guarantees.
We strive to configure rate limits at thresholds that allow our users to do the calls they need to do in the time they need to do them. This however does not mean we will provide unlimited budget for doing requests.
Rate limit optimization tips
Make use of the rate limit headers
Every response contains information on rate limits, such as how much request budget you have left, when the budget will be replenished, and so on.
For example, see the following response headers:
< x-ratelimit-limit: 10
< x-ratelimit-remaining: 2
< x-ratelimit-reset: 1
Avoid requesting static data repeatedly
Responses may contain cache-control
headers advising you on whether/for how long you should cache a response. Repeatedly requesting data that does not change can cause rate limiting to occur.
You can use these settings automatically by programming against them, so your implementation will keep working even if the rate limits change over time.
Monitor the responses you receive
We will send 429
responses when you hit a rate limit.
We are monitoring and logging excessive volumes of 429
responses and will get in touch with you if you are causing them.
You can prevent this by monitoring the responses returned from the API and by stopping requests if you see the 429s
coming in.
As mentioned above, you can use the headers to determine how long you will have to back off from doing additional requests to prevent 429
responses.