Get orders with status any not equal to amount returned with count status any

uragaiduk
New Member
4 0 0

So basically I am fetching orders using pagination I am taking a header of each response extract the Link and proceed to fetch another bath of 250 order. All works fine but here is my problem I wanted to check amount of orders of shop by calling

GET /admin/api/2021-04/orders/count.json?status=any

which returns 13100 

but when retrieving orders I am using

GET /admin/api/2021-01/orders.json?status=any

And in the end I get like 1500 orders. Both gets specified status=any so why am I getting a different amount?

0 Likes
SBD_
Shopify Staff
Shopify Staff
1071 143 189

Hey @uragaiduk 

Could some of the orders be >60 days old?

  • 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 with read_orders or write_ordersPrivate apps are not affected by this change and are automatically granted the scope.
0 Likes
uragaiduk
New Member
4 0 0

Thank very much

0 Likes