429 Request when trying to fetch, order and number of products

LuizSato
New Member
3 0 1

I'm creating an application that at some point needs to get the total revenue from Orders API and the number of products from Products API.

 

When a run the method that gets all the information, it sometimes breaks sometimes doesn't. After a little bit of testing, I noticed that the problem wasn't my code but me getting a 429 (Too many requests).

After some point, I read that the rate-limit from Shopify is 2 requests/second, meaning that I'm within the rate-limit, but again the error happens from time to time.

I would like to know why this keeps happening? It's not an error code but an error status_code that I get from Shopify that is preventing me from testing my entire application.

Does anyone has encountered this problem, know how to fix or any ideas that can help me find a solution?

I'm currently coding with Python using Django as an API.

 

Thanks

 

Reply 1 (1)
artemsl
New Member
2 0 0

Hi @LuizSato

Currently, I'm having the same problem.
Our app imports order details daily using Order and Product API, plus we have a webhook that imports orders on update and usually it happens in batches of 400-500.
So each order requires 3+ GET requests to get all the information needed, so we easily make about 1500+ calls a day.
 
Occasionally, during daily or webhook imports, we start receiving response status_code=429 to almost all GET requests until all orders in the batch are processed.
Rate limit described in Shopify Docs, 2 requests/second and bucket size, are taken care of. Therefore, we are not sure what is the problem here.
We use Python.

I'm thinking that there could be some kind of daily API call limit in Shopify or it's because there are a lot of calls made in a short period of time which is viewed as suspicious activity by Shopify, we could not find any information on this topic.


Do you have any updates on this issue?

 

Thanks.