Skip to main content
GET
/
endpoint
Retrieve product recommendations
curl --request GET \
  --url https://api.example.com/endpoint

Documentation Index

Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt

Use this file to discover all available pages before exploring further.

This endpoint retrieves product recommendations.

Request

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

Query parameters

ParameterTypeRequiredDescription
didStringTrueDevice ID. Get this ID from the KameleoonProducts_device_id cookie. Retrieve it from the backend before calling this endpoint. Only provide did when using filters or algorithms that rely on historical device data, such as “Recently Viewed” or “Recommended for You.”
shop_idStringTrueStore Key. Find this in Recommendations > Settings > Store settings in the Kameleoon app. Contact your Customer Success Manager for the key if necessary.
sidStringTrueTemporary user session ID. Get this ID from the KameleoonProducts_session_code cookie. Retrieve it from the backend before calling this endpoint. Only provide sid when using filters or algorithms that rely on historical user data, such as “Recently Viewed” or “Recommended for You.”
recommender_codeStringTrueID of the product recommendations block. Find the recommender_code in the blocks management UI.
resize_imageIntegerOptionalImage size (px) for resizing. Supported values: 120, 140, 160, 180, 200, 220.
extendedInteger or emptyOptionalAdds extended information for recommended products. If 1, the API returns all product information. If empty, the API returns only product IDs.
with_locationsBooleanFalseIf true and the extended parameter is also true, the response includes location_ids for all availability places. If extended is missing or false, the API ignores with_locations and defaults to false.

Response

NameTypeDescription
htmlstringHTML code for the product block. Customize the HTML template in the Kameleoon personal account.
titlestringBlock title. Matches the “Action” element value in the block rules.
recommendsarrayList of product IDs.
idnumberUnique block identifier. Matches the block ID in the Kameleoon personal account.