Skip to main content
GET
Retrieve product recommendations
Dieser Endpoint ruft Produktempfehlungen ab.

Abfrageparameter

Antwort

Pfadparameter

recommender_code
string
erforderlich

ID of the product recommendations block. Find the recommender_code in the blocks management UI.

Abfrageparameter

did
string
erforderlich

Device 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_id
string
erforderlich

Store Key. Find this in Recommendations > Settings > Store settings in the Kameleoon app. Contact your Customer Success Manager for the key if necessary.

sid
string
erforderlich

Temporary 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."

resize_image
enum<integer>

Image size (px) for resizing.

Verfügbare Optionen:
120,
140,
160,
180,
200,
220
extended
integer

Adds extended information for recommended products. If 1, the API returns all product information. If empty, the API returns only product IDs.

with_locations
boolean

If true and extended is also true, the response includes location_ids for all availability places. If extended is missing or false, this parameter is ignored and defaults to false.

Antwort

200 - application/json

The recommendation block's products and rendered HTML.

html
string

HTML code for the product block. Customize the HTML template in the Kameleoon personal account.

title
string

Block title. Matches the "Action" element value in the block rules.

recommends
string[]

List of recommended product IDs.

id
number

Unique block identifier. Matches the block ID in the Kameleoon personal account.