Integrate recommendations into any site or application using SiteSpect Recommendations API
Our Recommendations solution offers a full set of APIs to send events to the model and to get recommendations.
Refer to our Guide for getting started with recommendations for details on setting up your catalog and loading historical data.
Events API Endpoint
The Events API endpoint enables you to send events about user behaviors and item preferences.
Endpoint:
https://recs.sitespect.net/v1/[side-id]/recs/
Example payload for events:
Successful response for events:
Events Table
Refer to this table for the list of events and their expected values for events API endpoint.
User Action |
name |
entityIds |
Conversion |
buy |
product-id (multiple) |
buy-category-pref |
category name (multiple) |
|
Item detail view |
detail-view |
product-id |
detail-category-pref |
category name |
|
Category page view |
category-view |
category name |
Search results page view |
search-string |
Raw searched expression |
Like |
like-detail-view |
product-id |
like-category-pref |
category name |
Retrieving Recommendations Using the API
You can include Recommendations in your app with a simple API call. The response from the Recommendations API provides a JSON object that exposes recommended items with their associated attributes (e.g. price, name, link, image link, ...).
Business rules can be set as part of the request payload to include/exclude/boost/deboost Recommendations based on many attributes.
API endpoint for retrieving recommendations:
https://recs.sitespect.net/v1/[site-id]/recs/
People Also Like
Example API request payload for “People Also Like”, including a boost filter on parent category:
Complementary
Example API request payload for “Complementary”:
Personalized
Example API request payload for “Personalized”:
Popular
Example API request payload for “Popular”:
Recently Viewed
Example API request payload for “Recently Viewed”:
Example of Recommendations Response