How can I identify discount-related collections via liquid or storefront API?

Hi,

If a discount was applied to specific collections.

How can I get all the related collections by liquid or storefront API?

Thank you!

  1. use ADMIN API to Retrieves a single discount code and get price_rule_id

  2. use ADMIN API to Retrieves a single price rule and get entitled_collection_ids