Developer forum

Forum » Dynamicweb 10 » dwapi - query ecommerce/products with active facets

dwapi - query ecommerce/products with active facets

Joakim
Reply

Hi,

I'm running DW 10.1 and a headless vue app for the front. Im trying to achieve a filtering-function when applying active facets. When looking at the dwapi docs im unsure how to properly send these params. If anyone would be so kind as to write a sample post request with any active facets that would be greatly appreciated.

 

Thanks,


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Joakim

When you defined a query, you define parameters - i.e. 'brand'

Then you define the facet for a field using that parameter and the field to base the facet options for:

You basically you just re-use that parameter on the dwapi/products endpoint:

/dwapi/ecommerce/products/search?RepositoryName=SwiftProducts&QueryName=Products&brand=my-brand

Have a look at this thread: https://doc.dynamicweb.com/forum/templates/templates/getting-index-facets-async

Votes for this answer: 1

 

You must be logged in to post in the forum