Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

The results between Customer Counts API and Customers API are different

The results between Customer Counts API and Customers API are different

cheweiliu
Visitor
1 0 1

I use the API customers/count.json and customers.json to get the customer count and the customer information from Shopify.

Shopify Support told me to use escaped characters in the timestamp and add the UTC timezone to fetch out the precise data within the timeframe.

I have a store in the UK in GMT Standard Time. Therefore, it should be UTC +00:00.

Please see the URLs below, for example. Both URLs use created_at with the same time range.

However, you can see that these 2 URLs return differently.

Count.json returns 68 customers in the total count, but I can only get the 67 distinct customers from customers.json.

Can anyone shed light on this?

Which API returns the correct result?

 

https://myshopname.myshopify.com/admin/api/2020-10/customers/count.json?status=any&created_at_min=2022-02-22T00%3A00%3...

cheweiliu_0-1646087261935.png

https://myshopname.myshopify.com/admin/api/2020-10/customers.json?status=any&created_at_min=2022-02-...

cheweiliu_1-1646087261939.png

 

There is a similar asking in 2020. See the link below.

The update said Shopify has fixed this problem, but I still see the same issue.

https://community.shopify.com/c/shopify-apis-and-sdks/customer-counts-and-fetching-customers-from-th...

Replies 0 (0)