Skip to main content

Retrieve product recommendations

This endpoint provides access to product recommendations.

HTTP Request

GET https://api.products.kameleoon.com/recommend/{%recommender_code%}

Query Parameters

ParameterTypeRequiredDescription
didStringTrueDevice ID. You can find this ID in the cookie KameleoonProducts_device_id, which you can retrieve from the back-end before calling this endpoint.
shop_idStringTrueYour Store Key. You can find this in Recommendations > Settings > Store settings in the Kameleoon app. You can also contact your Customer Success Manager for the key.
seanceStringTrueThe temporary user session ID. You can find this ID from KameleoonProducts_session_code, which you can retrieve from the back-end before calling this endpoint.
recommender_codeStringTrueID of the product recommendations block. You can find the recommender_code in the blocks management UI.
resize_imageIntegerOptionalImage size (px) to resize. Supported values: 120, 140, 160, 180, 200, 220.
extendedInteger or emptyOptionalAdds extended information about recommended products. If value 1, the API returns all of the information about the recommended products. If empty, the API returns only the products IDs of the recommended products.
with_locationsBooleanFalseIf with_locations is true, and if the parameter extended is also true while in request, the location_ids of all the places of product availability will be returned. If the request does not have the extended parameter, or is false, with_locations will be ignored and its default value will be false.

API response

NameTypeDescription
htmlstringThe HTML code for the block with products. You can customize the HTML template in the Kameleoon personal account.
titlestringThe block title. Corresponds to the value of the "Action" element in the block rules.
productsarrayA list of product IDs.
idnumberUnique block identifier. Corresponds to the block ID in the list of blocks in the Kameleoon personal account