Recommender API (1.1)

Product recommender

Recommendation

Endpoints for product recommendations.

Get recommended products using the default recommendation logic.

Returns a list of personalized product recommendations for the user, using our recommended strategy.

This endpoint accepts multiple included/excluded filters to manually adjust the recommendations. A pair included/excluded can be given at the same time for the same field. If both are given, the final filter will be transformed into a "include only" of the values given by the difference between the two given sets. For example, if the following filters are given as follows:

?includedIds=1,2,3&excludedIds=2

the final filter applied to the recommendation will be "include only ids 1 and 3"

If the filters force the result to always be empty, this endpoint will return an error.

query Parameters
id_{idType}
string

Overrides the request UserId which is extracted by Cookie by default.

The {idType} should be replaced with the type of the UserId while the parameter value will be UserId's id itself.

cookies
boolean
Default: true

If false, a new adstax_uid Cookie won't be generated if it is missing from the request.

maxRecs
integer
Default: 5

The maximum number of recommendations to be returned.

includedIds
Array of strings

A comma-separated list of product IDs that, if defined, will limit the recommended products to the ones with the listed IDs.

excludedIds
Array of strings

A comma-separated list of product IDs that, if defined, will remove the recommended products with the listed IDs.

includedCategories
Array of strings

A comma-separated list of categories that, if defined, will limit the recommended product to those with those categories.

excludedCategories
Array of strings

A comma-separated list of categories that, if defined, will remove the recommended product with those categories.

includedGenders
Array of strings

A comma-separated list of product genders that, if defined, will limit the recommended product to those with those product genders. Examples of values are male, female or unisex.

excludedGenders
Array of strings

A comma-separated list of product genders that, if defined, will remove the recommended product with those product genders. Examples of values are male, female or unisex.

includedAgeGroups
Array of strings

A comma-separated list of product age groups that, if defined, will limit the recommended product to those with those product age groups. Examples of values are newborn, infant, toddler, kids or adult.

excludedAgeGroups
Array of strings

A comma-separated list of product age groups that, if defined, will remove the recommended product with those product age groups. Examples of values are newborn, infant, toddler, kids or adult.

header Parameters
Cookie
string
  • adstax_uid: CDP uid. If not present, a new one will be generated and set.

Responses

Response samples

Content type
application/json
{
  • "products": [
    ]
}

Get recommended products using a retargeting recommendation logic.

Returns a list of personalized product recommendations for the user, based on a retargeting strategy. If the user hasn't interacted with enough products, the remaining products are filled by our default strategy.

This endpoint accepts multiple included/excluded filters to manually adjust the recommendations. A pair included/excluded can be given at the same time for the same field. If both are given, the final filter will be transformed into a "include only" of the values given by the difference between the two given sets. For example, if the following filters are given as follows:

?includedIds=1,2,3&excludedIds=2

the final filter applied to the recommendation will be "include only ids 1 and 3"

If the filters force the result to always be empty, this endpoint will return an error.

query Parameters
id_{idType}
string

Overrides the request UserId which is extracted by Cookie by default.

The {idType} should be replaced with the type of the UserId while the parameter value will be UserId's id itself.

cookies
boolean
Default: true

If false, a new adstax_uid Cookie won't be generated if it is missing from the request.

maxRecs
integer
Default: 5

The maximum number of recommendations to be returned.

includedIds
Array of strings

A comma-separated list of product IDs that, if defined, will limit the recommended products to the ones with the listed IDs.

excludedIds
Array of strings

A comma-separated list of product IDs that, if defined, will remove the recommended products with the listed IDs.

includedCategories
Array of strings

A comma-separated list of categories that, if defined, will limit the recommended product to those with those categories.

excludedCategories
Array of strings

A comma-separated list of categories that, if defined, will remove the recommended product with those categories.

includedGenders
Array of strings

A comma-separated list of product genders that, if defined, will limit the recommended product to those with those product genders. Examples of values are male, female or unisex.

excludedGenders
Array of strings

A comma-separated list of product genders that, if defined, will remove the recommended product with those product genders. Examples of values are male, female or unisex.

includedAgeGroups
Array of strings

A comma-separated list of product age groups that, if defined, will limit the recommended product to those with those product age groups. Examples of values are newborn, infant, toddler, kids or adult.

excludedAgeGroups
Array of strings

A comma-separated list of product age groups that, if defined, will remove the recommended product with those product age groups. Examples of values are newborn, infant, toddler, kids or adult.

header Parameters
Cookie
string
  • adstax_uid: CDP uid. If not present, a new one will be generated and set.

Responses

Response samples

Content type
application/json
{
  • "products": [
    ]
}

Get recommended products using a retargeting (exclusive) recommendation logic.

Returns a list of personalized product recommendations for the user, based on a retargeting strategy. This strategy only return products that the user interacted with, so it may return a empty list or less than maxRecs products.

This endpoint accepts multiple included/excluded filters to manually adjust the recommendations. A pair included/excluded can be given at the same time for the same field. If both are given, the final filter will be transformed into a "include only" of the values given by the difference between the two given sets. For example, if the following filters are given as follows:

?includedIds=1,2,3&excludedIds=2

the final filter applied to the recommendation will be "include only ids 1 and 3"

If the filters force the result to always be empty, this endpoint will return an error.

query Parameters
id_{idType}
string

Overrides the request UserId which is extracted by Cookie by default.

The {idType} should be replaced with the type of the UserId while the parameter value will be UserId's id itself.

cookies
boolean
Default: true

If false, a new adstax_uid Cookie won't be generated if it is missing from the request.

maxRecs
integer
Default: 5

The maximum number of recommendations to be returned.

includedIds
Array of strings

A comma-separated list of product IDs that, if defined, will limit the recommended products to the ones with the listed IDs.

excludedIds
Array of strings

A comma-separated list of product IDs that, if defined, will remove the recommended products with the listed IDs.

includedCategories
Array of strings

A comma-separated list of categories that, if defined, will limit the recommended product to those with those categories.

excludedCategories
Array of strings

A comma-separated list of categories that, if defined, will remove the recommended product with those categories.

includedGenders
Array of strings

A comma-separated list of product genders that, if defined, will limit the recommended product to those with those product genders. Examples of values are male, female or unisex.

excludedGenders
Array of strings

A comma-separated list of product genders that, if defined, will remove the recommended product with those product genders. Examples of values are male, female or unisex.

includedAgeGroups
Array of strings

A comma-separated list of product age groups that, if defined, will limit the recommended product to those with those product age groups. Examples of values are newborn, infant, toddler, kids or adult.

excludedAgeGroups
Array of strings

A comma-separated list of product age groups that, if defined, will remove the recommended product with those product age groups. Examples of values are newborn, infant, toddler, kids or adult.

header Parameters
Cookie
string
  • adstax_uid: CDP uid. If not present, a new one will be generated and set.

Responses

Response samples

Content type
application/json
{
  • "products": [
    ]
}

Get recommended products using a naive logic.

Returns a list of non-personalized product recommendations.

This endpoint accepts multiple included/excluded filters to manually adjust the recommendations. A pair included/excluded can be given at the same time for the same field. If both are given, the final filter will be transformed into a "include only" of the values given by the difference between the two given sets. For example, if the following filters are given as follows:

?includedIds=1,2,3&excludedIds=2

the final filter applied to the recommendation will be "include only ids 1 and 3"

If the filters force the result to always be empty, this endpoint will return an error.

query Parameters
maxRecs
integer
Default: 5

The maximum number of recommendations to be returned.

includedIds
Array of strings

A comma-separated list of product IDs that, if defined, will limit the recommended products to the ones with the listed IDs.

excludedIds
Array of strings

A comma-separated list of product IDs that, if defined, will remove the recommended products with the listed IDs.

includedCategories
Array of strings

A comma-separated list of categories that, if defined, will limit the recommended product to those with those categories.

excludedCategories
Array of strings

A comma-separated list of categories that, if defined, will remove the recommended product with those categories.

includedGenders
Array of strings

A comma-separated list of product genders that, if defined, will limit the recommended product to those with those product genders. Examples of values are male, female or unisex.

excludedGenders
Array of strings

A comma-separated list of product genders that, if defined, will remove the recommended product with those product genders. Examples of values are male, female or unisex.

includedAgeGroups
Array of strings

A comma-separated list of product age groups that, if defined, will limit the recommended product to those with those product age groups. Examples of values are newborn, infant, toddler, kids or adult.

excludedAgeGroups
Array of strings

A comma-separated list of product age groups that, if defined, will remove the recommended product with those product age groups. Examples of values are newborn, infant, toddler, kids or adult.

Responses

Response samples

Content type
application/json
{
  • "products": [
    ]
}