Retrieve product recommendations
This endpoint provides access to product recommendations.
HTTP Request
GET https://api.products.kameleoon.com/recommend/{%recommender_code%}
Query Parameters
Parameter | Requirement | Description |
---|---|---|
did | Required | Device 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_id | Required | Your 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. |
seance | Required | The 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_code | Required | ID of the product recommendations block. You can find the recommender_code in the blocks management UI. |
resize_image | Optional | Image size (px) to resize. Supported values: 120, 140, 160, 180, 200, 220. |
extended | Optional | Adds 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
Name | Type | Description |
---|---|---|
html | string | The HTML code for the block with products. You can customize the HTML template in the Kameleoon personal account. |
title | string | The block title. Corresponds to the value of the "Action" element in the block rules. |
products | array | A list of product IDs. |
id | number | Unique block identifier. Corresponds to the block ID in the list of blocks in the Kameleoon personal account |