FROM CACHE - en_header

API order history

JonCF
New Member
1 0 0

I am trying to make a call to pull all historical orders and place them in a local data warehouse for analytics. I have read several posts and can confirm I am only getting orders for the last 60 days. In the documentation, I noticed this was implemented June 6, 2018. To the best of my knowledge I am not working with a public app that needs to be approved.

 

Can someone please help with the appropriate way to structure the call.

My current call is: .myshopify.com/admin/api/2020-01/orders.json?limit=250

 

I think we need to incorporate the "read_all_orders" scope, but i cannot figure out the correct syntax.

 

Any help would be greatly appreciated.

 

 

Reply 1 (1)
_JB
Shopify Staff
Shopify Staff
836 99 215

Hi @JonCF,

 

Your call doesn't include the status=any parameter, so it will only return orders that are still in open status (not archived). 

In a typical workflow, orders are archived once they are fully paid and shipped, so it's possible you're not seeing older orders because of the missing param.

 

If that doesn't explain it, can you please provide the shop_id that you're making the call on, and I will invesetigate further.

JB | Solutions Engineer @ Shopify 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog