Rest Api orders older then 60 Days

Highlighted
New Member
2 0 0

I am trying to get orders from earlier this year(older then 60 days) using Rest API in my browser, I am logged in as an Admin in the site

https://mywebsite.myshopify.com/admin/api/2020-07/orders.json?name=20192941

 

I tried using a private app api key in the url (below), but am still unable to get older orders

https://API key: password @mywebsite.myshopify.com/admin/api/2020-07/orders.json?name=20192941

 

I have looked over this page Rest Orders 

0 Likes
Highlighted
Tourist
9 0 1

I saw an option to request access for this  in the App Setup area:

Read all orders

Your app can access the last 60 days of orders for a store. You can request access to a store’s full order history, but merchants will be notified of this additional scope during the installation of your app. This may result in fewer installs.

 

Hope that helps

0 Likes
Highlighted
New Member
2 0 0

Thanks,

  I am wondering if there is a way to access the information without building an app. It is my own site and I am just trying to quickly access information on certain orders. The information I want does not get exported when I export orders as a csv. So I am getting the json responses and then adding it to the csv. It has work so far, but only for recent orders

0 Likes
Highlighted
Excursionist
28 5 3

First off, you would be wanting to add code to your params. So you add:

  • status: 'any'
  • page
  • limit

And with that, you can ask for page 1, a limit of 250 orders, and you'll get up to 250 orders of any status. The default of fulfillment_status is any, so you do not need that. 

 

Also note that unless otherwise approved, you only get orders from the last 60 days unless you demonstrated a need for more. Most people will get a count of all orders, and then use the limit of 250 to figure out how many pages of orders they have, and then iterate through the pages to get all their orders of interest.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
644 78 141

Hey @Rino,

As the previous poster mentioned, you're likely missing a parameter in the URL. Try adding ?status=any to the end of the URL, this will allow the response to contain both open and archived orders (by default only open orders are returned).

 

Also just wanted to clarify this point:

Also note that unless otherwise approved, you only get orders from the last 60 days unless you demonstrated a need for more.

This is correct but only applies to public/custom apps. Private apps created in the admin get access to all orders automatically if read/write_orders is enabled.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes