New vs retuning customers using API

I am using the Admin REST API to fetch customers and display them on a custom dashboard built with Laravel.

The API endpoint I’m using is:
https://your-development-store.myshopify.com/admin/api/2025-04/customers.json
This endpoint provides a list of customers. What I want to display on the dashboard is new vs. returning customers.

Since the customer API response does not include a specific field indicating whether a customer is new or returning, I have been using the orders_count field as a workaround — considering customers with orders_count equal to 1 as new, and those with more than 1 as returning.
Customers with orders_count equal to 0 are not included in the customer count.

However, the totals I’m calculating do not match the New vs. Returning Customers report shown in the Shopify Admin Analytics dashboard.

Can you help me figure out how Shopify determines new vs. returning customers in their analytics, so I can display matching data on my dashboard?

1 Like

I have the same question; adjusting for timezone doesn’t matter. Have tried counting customers by create date & totaling first time orders (as listed above). Both under-report new customers as shown in Shopify analytics.

AFAIK, shopify made the choice to make this property effectively useless unless you are capturing orders through the API at or near real time then customer.order_count will never be accurate when running historical reports. Shopify returns the current order count of the customer…. say you have a customer who has ordered for their first time in January and then again in February, if you run a report for orders in Jan and Feb this customer will have a value of 2 in their customer.order_count field, making this field unreliable for almost every kind of cohort reporting.