API rate limit error in order API

API rate limit error in order API

Divy_tatva
Shopify Partner
32 1 12

Hello

 

In the development store, I am updating orders with PHP curl. But it's updating only 2 orders every time and after that showing this error => "errors": "Exceeded order API rate limit, please try again in a minute. Upgrade to a paid account to remove this limit. in Shopify during order updates.

 

I have used the below headers still only updated 2 orders.

X-Shopify-Shop-Api-Call-Limit: 40/40
Retry-After: 2.0

 

what is the cause of this issue?

 

Thank you

Replies 2 (2)

Liam
Community Manager
3108 340 871

Hi Divy_tatva,

 

It sounds like the issue you are facing is related to rate limits - you can learn more about these in our dev docs here.

 

It may be that you're sending requests too quickly, which is why you're only able to update 2 orders at a time. To resolve this issue, you need to manage the rate at which you're sending these requests. You should ensure that your PHP script waits for at least the Retry-After period before sending another request.

 

Hope this helps,

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog

FePixie
Shopify Partner
30 2 7

try a

sleep(1); // pause 1 second

in your script after each update.