Hey,
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:
https://help.shopify.com/en/api/reference/products/collect
The format you are looking for is:
/admin/api/2020-01/collects/count.json?collection_id=841564295
Hope that helps.
Regards,
Tom
User | Count |
---|---|
13 | |
12 | |
7 | |
4 | |
4 |