Overriding App Configuration

The Tweakwise API Merchandising response is generated based on default values or app configuration. If you need more flexibility, the API allows the use of parameters to override the default configuration on runtime.

Filter template

tn_ft

Explicitly specify the ID of the filter template to use. This will overrule any filter template that would otherwise be applied.

curl --request GET \
     --url 'https://gateway.tweakwisenavigator.com/navigation/c1a12e92?tn_cid=1001&tn_ft=1' \
     --header 'TWN-Source: Tweakwise API docs' \
     --header 'accept: application/json'

Builder template

tn_b

Explicitly specify the ID of the builder to use. This will overrule any builder that would otherwise be applied.

curl --request GET \
     --url 'https://gateway.tweakwisenavigator.com/navigation/c1a12e92?tn_cid=1001&tn_b=2' \
     --header 'TWN-Source: Tweakwise API docs' \
     --header 'accept: application/json'

Merchandising template (Sorting template)

tn_st

Explicitly specify the ID of the sorting template to use. This will overrule any sorting template that would otherwise be applied.

curl --request GET \
     --url 'https://gateway.tweakwisenavigator.com/navigation/c1a12e92?tn_cid=1001&tn_st=2' \
     --header 'TWN-Source: Tweakwise API docs' \
     --header 'accept: application/json'

External Data Component

tn_edc_parameters

Extra parameters to add to the requests originating from external data components.

For example, to send 2 extra parameters: 'firstParameter' and 'secondParameter' to external data components, using the following string:
session=Aed12fdef&beacon=Aed12fdef_item12344

This value should then be URL encoded.

curl --request GET \
     --url 'https://gateway.tweakwisenavigator.com/navigation/c1a12e92?tn_cid=1001&tn_edc_parameters=session%3DAed12fdef%26beacon%3DAed12fdef_item12344' \
     --header 'TWN-Source: Tweakwise API docs' \
     --header 'accept: application/json'

Page size

tn_ps

The number of products that must be displayed per page. The overrides the default value that is configured at shop level.

curl --request GET \
     --url 'https://gateway.tweakwisenavigator.com/navigation/c1a12e92?tn_cid=1001&tn_ps=120' \
     --header 'TWN-Source: Tweakwise API docs' \
     --header 'accept: application/json'

Hidden filters

tn_parameters

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

This is used to exclude certain parameters from the results (show everything except specified parameters)

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'