For front page/landing page or other recommendations that do not pertain to a particular product, you can query the following endpoint:
The way we use this endpoint is completely analogous to how we use the endpoint for a single product except that we now do not require any product IDs in the request.
const response = await fetch(
"<https://api.depict.ai/v2/recommend/products/general>",
{
method: 'POST',
data: JSON.stringify({
tenant: "companyname",
market: "se",
type: "popular",
user_id: "username",
session_id: "3j894g95g",
})
}
)
The response is the same as when requesting a single product’s recommendations.