JSON API
...
Examples
Batch Updates

Additional Data

1min



There might be cases where you need to index certain attributes only for front-end rendering purposes. E.g. You want to index a complex json object, which is not indexed or used for merchandising, but only to render in the frontend and used in JavaScript, then you can use the “additionalDataToReturn” attribute.

[ { "id": "1", "type": "KLEVU_PRODUCT", "attributes": { "name": { "default": "Product 1" }, "brand" : "UCB", "size" : "s", "additionalDataToReturn": { "myAttribute" : "my value", "border-color" : "red", "card-height" : "30px" } } } ]

This will index a special attribute “additionalDataToReturn” in the product. In the Storefront API, request this attribute to be returned and you will get the data indexed as-is.

Updated 11 Jul 2024
Doc contributor
Doc contributor
Doc contributor
Did this page help you?