Fetching recommendations with our API wrapper
fetchDepictRecommendations
function:
fetchDepictRecommendations
function takes an object of options as its argument, and returns a promise of an array. Below, you can see the different possible parameters of the options argument.
front_page
, after_basket
, related
, etc. Ask Depict for this.productId
and productIds
(choose ONE) so read the documentation carefully.productId
and productIds
) general recommendations will be fetched. This is for, for example, the frontpage where generally popular products get returned.
If you only get recommendations when specifying the wrong id type (i.e. you only get basket recommendations if you provide a single product id while the recommendations should be based on everything in the basket) please ask Depict to re-configure the endpoint for you.