Pages
Page History
...
Parameter | Description | Type | Role | Example | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
method | Request type. Use the value | String | Required |
| |||||||||
origin | Site origin. To find out your site's origin, see Getting your site origin. | String | Required |
| |||||||||
strategy | Recommendation strategy ID. | String | Required |
| |||||||||
cookieId | Local Frosmo ID of the visitor who sees the recommendation returned by the API request. This parameter is required in the following cases:
The strategy requires a user context if it uses any of the following algorithms:
The ID allows the platform to use the visitor's user context and affinity profile for personalizing the recommendation for the visitor. This parameter has no effect if the strategy does not require a user context and is not set to apply affinity (either by the strategy itself or by | String | Optional |
| |||||||||
context | Information about the context into which the recommendation data is retrieved. The context consists of Contextual information about the current page ( where the API request is made). The context information allows the API to return the correct recommendation data for the current page. The exact context information required depends on the page type of the recommendation strategy: the context information must match the page type. You specify the context object using the JSON formatThe value is a JSON object. | Recommendation strategy context object | Required |
| |||||||||
variants | Define whether to also return the data for product variants. If a product has one or more variants, the API returns the full product data for each variant in the The possible values are:
The default value is | Boolean | Optional |
| |||||||||
affinityPercentage | Level of visitor affinity (in percentages) applied to the recommendation. The higher the level, the more personalized the set of recommended items is for each individual visitor. The minimum value is If defined, this parameter overrides the level of affinity set in the strategy. This parameter has no effect unless | Number | Optional |
| |||||||||
profile | Define the visitor's profiling choice if the site uses selective profiling. The choice determines whether the API returns recommendation data that is personalized for the visitor. The possible values are:
The default value is empty. Each visitor's profiling choice is stored in their context. You can get the choice using the
How the profiling choice worksIf you set the value to If you set the value to
Depending on the strategy settings, the API therefore either returns a non-personalized version of the recommendation or a recommendation with the personalized results removed. | String | Optional |
| |||||||||
shuffle | Define whether to randomly shuffle the order of items in the recommendation data. By default, the items are in descending order of rank, with the most recommended item (as defined by the recommendation strategy) ranked highest. The possible values are:
The default value is
| Boolean | Optional |
| |||||||||
debug | Define whether to return debugging information about the recommendation data.
The debugging information for a recommendation consists of:
The possible values are:
The default value is | Boolean | Optional |
|
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "data": [ {<item 1 data>}, {<item 2 data>}, ... {<item n data>} ], "debug": [{ <debugging information> ]} } |
If an item is a parent product with one or more product variants, and if the request is set to also return variants, the recommended item object includes the variants
array, which contains the full product data for each variant.
...