Strategies for avoiding the API limit / making sure API calls go through

Travis_D
Shopify Partner
40 1 7

We run a order fulfillment service and have occassions were we have bursts of API calls that can result in 429 error. For example: shipping a batch of orders, updating inventory levels, etc. 

It's a huge bummer when we encounter this error, because it means something that was supposed to get updated in the merchant's Shopify store does *not* get updated - whether it's the status of an order, or inventory level updates. This is a big problem.

Merchant's will come to use asking - "why hasn't this order shipped?", or, "we oversold this product, because you guys didn't update our inventory levels correctly!". It creates unnecessary drama that we can live without. 

Our platform is implemented with Django / Python. Do you have any recommendations for a message queue service that takes an API call, stores it, and only deletes it after the API call call has gone through succesfully? It should also execute the API calls in the sequence they were generated in. Or do you have any other recommendations for improving the deliverability of API calls to Shopify? How are larger partners handling this problem? 

(Please don't recommend using time.sleep() - this is the wrong answer for so many reasons)

 

 

Reply 1 (1)
rmanke
Shopify Partner
168 0 54

Can you not batch your API calls and have them limit themselves?  Or, am I missing something?

We've had to stage our API calls so they don't happen too fast.

Shopify Partner, software developer and designer.