Using the Recommendations API
Our Recommendations API is used to personalised the Shopping experiences of your visitors.
What is a Widget?
A XO Widget is a recommendation Area on your customers' journey that is used to personalise your visitors' experiences. When requesting recommendations to XO, it's mandatory to provide the Widget ID of your recommendation Area.
Personalised Recommendation
Recommendation API
GET
https://api.early-birds.io/widget/:widgetId/recommendations/:profileId/:variables
Get recommendations for a given user on a given recommendation Area
Path Parameters
Query Parameters
Example of call:
Available metadata
options :
Adding the variables
query parameter is provided as an example. Even if you are not requesting the API with a profileId
, adding the context in which you want to get a recommendation is still a good practice.
Recommendation for a specific User - When using CADP
If you use CADP and identity Repository, when your user is identified through an identifier (for example after user login), you must use this identifier to request recommendations.
See Managing identities to learn more about Identities.
UserID (or any loggedin id):
Where:
{{widgetId}}
with the widget ID that you would like to display{{identityRepository}}
with the identity repository that you are using{{userId}}
is the id of the identified user
Recommendation for a specific User - When not using CADP
It is possible to request the API using your own visitor referential:
Where:
{{widgetId}}
with the widget ID that you would like to display{{datasourceId}}
with the datasource ID (ID of your own visitor referential){{userId}}
with the visitor ID in your own referential
Adding the variables
query parameter is provided as an example. Even if you are not requesting the API with a profileId
, adding the context in which you want to get a recommendation is still a good practice.
Anonymous recommendation
For many reasons, you might need to request the Recommendation API without providing a profileId
. It can be done by calling our API without providing a profileId
.
Where:
{{widgetId}}
with the widget ID that you would like to display{{productId}}
Product ID if you are on the product page{{category}}
Category users are currently viewing
Adding the variables
query parameter is provided as an example. Even if you are not requesting the API with a profileId
, adding the context in which you want to get a recommendation is still a good practice.
Requesting multiple recommendation Area at the same time
To retrieve results for multiple recommendation areas, you can use the following endpoint:
Multiple widgets
GET
https://api.early-birds.io/widget/multi/:widgetIds/recommendations/:profileId
To retrieve results for multiple recommendation areas, you can use this endpoint. The
only
difference with the Recommendation API is the
widgetIds
.
\
\
⚠️ Does not work with CADP (sessionId)
Path Parameters
Emails recommendation
Following API calls have been created to generate a recommendation directly through email HTML code. Each call will return a unique item recommendation.
If email is implemented through API, or through a CSV file exchange, it’s not recommended to use the following calls. The widget API calls described earlier can be used to retrieve all the items recommended through a single API call.
Image generation for a user ID
This API endpoint will return the generated image for the recommended item.
Usually, this method is used directly in an HTML tag and is not called as a standard API endpoint. You can switch to “Tags” in the right column to see how it works.
Where:
{{widgetId}}
with the widget ID that you would like to display{{datasourceId}}
with the datasource ID (ID of your own visitor referential){{userId}}
with the visitor ID in your own referential{{index}}
item position (example: 1, 2, 3, ...)
Link generation for a user ID
Where:
{{widgetId}}
with the widget ID that you would like to display{{datasourceId}}
with the datasource ID (ID of your own visitor referential){{userId}}
with the visitor ID in your own referential{{index}}
item position (example: 1, 2, 3, ...)
Last updated