Missing many orders

Solved

Missing many orders

marcelogr
Visitor
2 1 0

Hi, I am trying to get the total orders for the last years with the endpoint:

 

myshopify.com/admin/api/2020-01/orders/count.json?created_at_min=2019-01-01T00:00:00-04:00&created_at_max=2020-01-01T00:00:00-04:00

And I am getting the response:

{
    "count": 867
}

However on my dashboard I see 6895 orders!

 

What is going on, what is missing here?

Accepted Solutions (2)

emrecelik
Shopify Partner
14 4 4

This is an accepted solution.

There is a time restriction unless if you have the elevated permission scope to see all orders. Also a culprit is the status parameter. By default it is set to 'open'. If you want to see all orders regardless of status, try status=any as a parameter.

View solution in original post

marcelogr
Visitor
2 1 0

This is an accepted solution.

Thanks, it increased significantly the total count for 6883, maybe there are more filters, I am going to check the docs.

 

Tks again

View solution in original post

Replies 3 (3)

NolanM
Shopify Partner
18 0 12

I'm not sure if the restriction is on count.json, but for order look ups, we are restricted to the last 60 days (i think) worth of orders.

 

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.

emrecelik
Shopify Partner
14 4 4

This is an accepted solution.

There is a time restriction unless if you have the elevated permission scope to see all orders. Also a culprit is the status parameter. By default it is set to 'open'. If you want to see all orders regardless of status, try status=any as a parameter.

marcelogr
Visitor
2 1 0

This is an accepted solution.

Thanks, it increased significantly the total count for 6883, maybe there are more filters, I am going to check the docs.

 

Tks again