Use hidden filters

In Tweakwise, you’re able to pass hidden filters to almost every request that returns products (see the API reference for the calls). These filters are used to pre-filter the result set without the need to configure a facet in your filter template. This functionality is useful for pages where you want to show a default subset of products (i.e., brand pages). The following parameters are available in these API calls:

Hidden filters (tn_parameters)

Will only include products that match with the given attribute value(s).

When filtering by property 'brand' with value 'Coca Cola' or with value 'Pepsi' the value of tn_parameters should be:
brand=Coca Cola&brand=Pepsi

This value should then be URL encoded.

curl --request GET \
     --url 'https://gateway.tweakwisenavigator.com/navigation/c1a12e92?tn_cid=1001&tn_parameters=brand%3DCoca%20Cola%26brand%3DPepsi' \
     --header 'TWN-Source: Tweakwise API docs' \
     --header 'accept: application/json'

Hidden exclusion filters (tn_parameters_except)

Will exclude items with the given attribute value(s).

When filtering by property 'brand' with value 'Coca Cola' or with value 'Pepsi' the value of tn_parameters_except should be: brand=Coca Cola&brand=Pepsi

This value should then be URL encoded.

curl --request GET \
     --url 'https://gateway.tweakwisenavigator.com/navigation/c1a12e92?tn_cid=1001&tn_parameters_except=brand%3DCoca%20Cola%26brand%3DPepsi' \
     --header 'TWN-Source: Tweakwise API docs' \
     --header 'accept: application/json'

🚧

Additional configuration required

To be able to pass hidden filters, supply your Tweakwise contact with the filter(s) you'd like to use for this feature. We will configure this for you in the Tweakwise environment.