#Getting a list of tags from products on front end

4 messages · Page 1 of 1 (latest)

glossy cedar
#

Is there a way to get a list of all the tags used in your system on the front end? I want to build a filter for products on tag, but I can't see a simple way to get them.

glossy cedar
#

would my best bet be to create my own endpoint?

wooden veldt
#

We have an open ticket for adding a tag endpoint to the storefront API, so it will be added in the near future. But in the meantime you could easily create and endpoint for it in your server. You could simply copy and paste the code from the existing admin endpoint, found here: https://github.com/medusajs/medusa/blob/master/packages/medusa/src/api/routes/admin/product-tags/list-product-tags.ts

GitHub

The open-source Shopify alternative ⚡️. Contribute to medusajs/medusa development by creating an account on GitHub.

formal cliff
#

I made these two routes for this you might find them helpful