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

ParameterRequirementDescription
didRequiredDevice 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_idRequiredYour 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.
seanceRequiredThe 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_codeRequiredID of the product recommendations block. You can find the recommender_code in the blocks management UI.
resize_imageOptionalImage size (px) to resize. Supported values: 120, 140, 160, 180, 200, 220.
extendedOptionalAdds extended information about recommended products. Supported values: 1 or empty. 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.

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