Get all paid orders from a month or time range

Dario_De_Lucia
New Member
4 0 0

Hello community

I'm facing an issue with the API and I can't find the solution. I want to get all orders from a specific time range (for example this month) which have the financial_status = paid.

I'm using this query (in this example only for counting): 
 

/admin/orders/count.json?financial_status=paid&created_at_min=2018-11-01T00:00:00&created_at_max=2018-11-21T23:59:59

If I run the query for the time range of a day, it works fine. If i run it like above, the result is always 0.

Does anybody have an idea how to solve this?

Cheers,
Dario

0 Likes
KarlOffenberger
Shopify Partner
1867 182 777

Hi Dario De Lucia

The query works fine. I am suspecting you do not have any open orders in that time range. To be more exact, querying orders always returns orders with status=open by default. Orders that have been closed won't be included unless you also filter by status=any.

Hope that helps!

Liked this post? You might also like our fantastic upsell apps Candy Rack and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
0 Likes