Having issues with API being Rate Limited with error "Exceeded 0 calls per second"

cabouffard_yag
Visitor
1 0 3

Hey,

We're trying to feed orders through the Shopify Orders API via 

url: `${SHOPIFY_STORE_URL}/orders.json`,
method: 'POST',

We're currently throttling our API calls to 1 order per 5 seconds and after 5-6 orders, we're receiving 

 StatusCodeError: 429 - {"errors":"Exceeded 0 calls per second for api client. Reduce request rates to resume uninterrupted service."}


This is highly unexpected as we would expect to see a different number from "0 calls". 
It's also highly unexpected as we should be able to create more than one order per seconds via the API call.

Any suggestions so to why this would happen and how to solve it?
Thanks!

banned
Replies 7 (7)

sheardd
Shopify Partner
3 0 10

I'd like to second this, I've been having trouble with this on a client's site since earlier this week. Having come across this link (https://community.shopify.com/c/Shopify-APIs-SDKs/Experiencing-API-outage/td-p/480752) which identified it as a shopify-side issue I was hoping this might have been caught by Shopify and resolved itself in due time. The page that is encountering this is a custom interface I've written for the client's staff to view orders, make them and then mark them as fulfilled when they're dispatched. I've been running it in testing and only submitting maybe 3-4 updates over the course of ~8 seconds and I'm getting this. I'm using a dev-store currently to test code for the client, but I think I'm right in saying dev-stores have the same API request/burst limits as live stores no? And either way, the error "Exceeded 0 calls per second for api client. Reduce request rates to resume uninterrupted service" feels misleading, as it appears to imply the request limit has somehow dropped from 40 to 0 over the course of a fairly low-pressure burst of requests. Any suggestions would be appreciated!

jfrankel_at_AC
Shopify Partner
3 0 0

I can third this. This is the exact problem I'm having. I started out using the desktop develop tool to generate fake data, but that was failing on creating orders most of the time. Then I tried doing it with Postman, using the collection runner, but that would consistently fail after 4 requests. It seems like order creations are being rate limited to 4 per minute. But the response header and body do not reflect that; the header says somewhere between 1/40 through 4/40. And the Retry-After header is empty.

 

Another weird thing I noticed is that even though I was able to make about 60 orders after a while, and I can see them in the UI, I cannot get most of them via the REST API. I see only three. The UI uses the graphql API which does get them, which is really bizarre.

Josh
Shopify Staff
1134 84 233

Hey folks, 

 

Would you be able to confirm if the shops that you're experiencing this on are development shops?

 

If the answer to the above is yes, you're seeing this because development stores are capped at 5 order creations per minute - this is currently documented in a note on our Order API documentation. 

 

If this doesn't explain any of your scenarios above this comment though, if you can let me know the name of your shop I'll be able to take a deeper look. 

Josh | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

jfrankel_at_AC
Shopify Partner
3 0 0

Thanks for the reply. Is there any other way to bulk import orders for test data? I'm working on an application and would like to test it with a store that has a lot of orders.

jfrankel_at_AC
Shopify Partner
3 0 0

And yes, I'm on a development shop.

 

One other thing I noticed — it looks like if I set the fulfillment_status to "fulfilled", then it's not available via the REST API.

sheardd
Shopify Partner
3 0 10

Hi Josh, thanks for your reply. I am using a dev store, but I'm not creating orders, just updating existing ones. Shopify's page on REST Admin API rate limits (https://help.shopify.com/en/api/reference/rest-admin-api-rate-limits) doesn't give any indication that I can discern that dev stores have different limits than regular ones, though I would have assumed before checking this page that they would. Can you clarify for me if there are lower rate limits for dev stores when getting and updating existing orders?

Josh
Shopify Staff
1134 84 233

@jfrankel_at_AC you'd need a shop that was on a paid plan in order to avoid the throttle, which I can understand is a bit inconvenient but development shops were being abused for spam so the current throttle is a necessary evil. 

 

@sheardd fetching orders on a development store shouldn't have different rate limiting, I don't believe that updating does either but I could look into that for you. Would you be able to post back in here with an order ID that has been causing you problems? I could check our logs and see if there is something else going on in your case. 

 

 

Josh | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog