Discussing APIs and development related to customers, discounts, and order management.
I have a private app on my storefront that accesses the Shopify Orders API to get orders from a specific date range.
In the past month or so, this seems to be now restricted where I cannot pull orders before May 20, 2018. Does anyone know what would cause this?
Below is the endpoint my app is using that returns blank:
https://MYSTORE.myshopify.com/admin/orders.json?created_at_min=2018-03-01T00:00:00%2B00:00&created_a...
If I access this URL via the browser while logged into my Shopify admin, it returns orders.
I was previously able to pull data without restriction via the app but haven't run an export in a month or two so didn't notice this change.
Thanks,
Jason Richey
Hi Jason,
According to the documentation there has been a change to that section of the API and this may be why you're experiencing this:
As of June 6th, 2018, only the last 60 days' worth of orders from a store will be accessible from the Order resource by default. If you want to access older orders, then you need to request access to all orders. If your app is granted access, then you can add the
read_all_orders
scope to your app along withread_orders
orwrite_orders
.
finally, after a day of struggling to register, i can post. Shopify needs to improve the registration process.
So, i have the same problem. I am creating a private app and I am not getting the complete order data. I am seeing 10 randomly picked orders from the API. Contacted support and she said this is the place to ask for help? Any reason the private app cant see all the order data through the API?
Hi S A,
I found that this post was really helpful in understanding the API change. Without reviewing your code I don't know why you'd get 10 orders at random instead of the 60 day orders provided by default (unless the store has only received those 10 orders within 60 days). To request access to all orders you need to request it from your partner account. There is also a blog post here that is really helpful.
Private apps should have read_all by default to my understanding. My specific App is an unpublished Public App, which is why it had the 60-day limitation.
Do you have an example of the API call you are making? I'm not sure why you would get random orders instead of a limit of order within a specific timeframe.