POST
/
v2
/
recommend
/
products
/
category
Authorization
Header
Body
curl --request POST \
  --url https://api.depict.ai/v2/recommend/products/category \
  --header 'Content-Type: application/json' \
  --data '{
  "category_id": "<string>",
  "document_referrer": "<string>",
  "dsid": "<string>",
  "market": "<string>",
  "metadata": {},
  "session_id": "<string>",
  "tenant": "<string>",
  "type": "<string>",
  "user_id": "<string>"
}'
{
    "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-8805-8b7105a9c8a5"
    }]
}

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.

Authorizations

api_key
string
queryrequired

Headers

referer
string

Body

application/json
category_id
required
document_referrer
string
dsid
string

Populated for integrations performed by Depict.ai only. Depict.ai Session Id

market
string
required

Market identifier

metadata
object

Metadata that can be used to modify the behaviour of the recommendation system

session_id
string

Session identifier

tenant
string
required

Identifier associated with the API integration

type
string
required

Type of the recommendation, e.g. cross_sell

user_id
string

Customer identifier

Response

200 - application/json
displays
object[]
required
error
string
experiment_id
string
variant
integer