Recommendations (v2)
Recommend For Category And User
Returns an object with an array of recommendation displays.
Each display will contain a recommendation_id (which is also present as a URL parameter in `display.page_url`).
The recommendation_id should be sent to the `create-events` endpoint if the user interacts with the recommendation.
This is typically achieved by storing the recommendation as a data attribute on the HTML element containing the recommendation.
Example response:
<pre>
{
"displays": [{
"title": "Mechanical Keyboard",
"price": "100.00",
"image_url": "https://my_store.com/awesome_mechanical_keyboard.jpeg",
"page_url": "https://my_store.com/awesome_mechanical_keyboard.html",
"product_id": "awesome_mechanical_keyboard",
"recommendation_id": "827ada29-92e7-4642-8804-8b7105a9c8a5"
}]
}
</pre>
POST
/
v2
/
recommend
/
products
/
category
Query Parameters
port
integer | null
Body
application/json
tenant
string
requiredIdentifier associated with the API integration
market
string
requiredMarket identifier
type
string
requiredType of the recommendation, e.g. cross_sell
category_id
string
requiredlocale
string | null
Locale identifier
limit
integer | null
Maximum number of recommendations returned.
Required range:
1 < x < 128
user_id
string | null
Customer identifier
session_id
string | null
Session identifier
dsid
string | null
Populated for integrations performed by Depict.ai only. Depict.ai Session Id
Minimum length:
1
document_referrer
string | null
metadata
object | null
Metadata that can be used to modify the behaviour of the recommendation system
Response
200 - application/json
displays
object[]
requirederror
string | null
variant
integer | null
experiment_id
string | null
Was this page helpful?