Orders count and list of orders sometimes return a different number of orders

Orders count and list of orders sometimes return a different number of orders

IlyaD
Visitor
2 0 0

I am using Shopify Rest API to do some quality checks against my db by utilizing order count. Although I am using order count, I noticed that sometimes list of orders and order count return a different number of orders for the same time period. Here is what what I do if I use cURL:

List of orders:
curl -X GET "https://noneofyourbusinessname.myshopify.com/admin/api/2024-01/orders.json?status=any&created_at_max=2024-06-29&created_at_min=2024-06-22&fields=id "

Count of orders:
curl -X GET "https://noneofyourbusinessname.myshopify.com/admin/api/2024-01/orders/count.json\ ?status=any&created_at_max=2024-06-29&created_at_min=2024-06-22"

In that particular example count returns 31, while the list of orders returns 30 orders. Most of the time the count is correct for both, but for some time periods I get small discrepancies and I can't understand why is the difference.

What I am doing wrong?

Reply 1 (1)

IlyaD
Visitor
2 0 0

Also, I feel a need to point out here that pagination is not an issue as nowhere in my comparison I am over the default limit of 50 orders, so this is not the problem