I'm looking for a way to return customers which have 0 orders and updated_at_min.
From the https://shopify.dev/docs/admin-api/rest/reference/customers/customer, it shows a few search query options, however it uses updated_at instead of updated_at_min.
I was wondering if there's a simple way of doing this. I'd rather narrow down my results than filtering the results.
Solved! Go to the solution
This is an accepted solution.
Hey @melon ,
Happy to help you out with this.
A customer search query should work for this purpose. For example the following customer search query would return all customers with no orders who's customer record was last updated after April 23rd 2021 @ 5:00pm eastern. More details on the Shopify search syntax can be found here.
/customers/search.json?query=orders_count:0 AND updated_at:>'2021-04-23T17:00:00-04:00'&fields=id,email,orders_count,updated_at
Hope this example helps, please let me know if you have any other questions.