Get latest customer_id

Solved
Highlighted
Shopify Partner
2 0 0

Hi everyone

How can I get the newest/latest customer_id thru Shopify API?

Something like: admin/api/2020-01/customers/latestcustomer.json

I hope you understand what I mean :)

Thanks for helping

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1040 139 164

This is an accepted solution.

Hey @Nano,

 

I believe the customers endpoint shows newest customer first, so you could use the limit parameter to return a single customer:

/admin/api/2020-01/customers.json?limit=1

 

Depending on your use case, a webhook might be better suited.

1 Like