Is There any wayto get total number of products in a collection via API. Collection can be custom or smart , but I just want to retrieve total number of products in a collection.
My concern is that I want to get all empty collections on store, whether it be custom or smart, all collections with zero number of products in them.
Thanks in advance.
Yes, you can use the collects count endpoint as referenced here:
The format you are looking for is:
Hope that helps.