Retrieve product recommendations
This endpoint provides access to product recommendations.
HTTP Request
GET https://api.products.kameleoon.com/recommend/{%recommender_code%}
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
did | String | True | 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 | String | True | 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 | String | True | 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 | String | True | ID of the product recommendations block. You can find the recommender_code in the blocks management UI. |
resize_image | Integer | Optional | Image size (px) to resize. Supported values: 120 , 140 , 160 , 180 , 200 , 220 . |
extended | Integer or empty | Optional | Adds 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_locations | Boolean | False | If 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
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 |