See also: Response Format
This endpoint alone does not track data for reporting in the management console.
TO DO: When we have instructions on hitting the Beacon for tracking, be sure to link to that here in relation to the note above.
API Endpoint URLs
General Recommendations (Popular Items)
Intended to eventually be a combination of Also-Bought and Also-Viewed
The primary endpoint for general recommendations. Currently defaults to using "Best Selling" (below), though this may change in the future.
https://api.searchspring.net/api/recommend
Trending (or Similar Items)
This endpoint will return products that were Most Viewed on your site.
If the seed parameter is passed, this will return products that were most often Also Viewed in the same user sessions on your site, when the seed product(s) was/were viewed.
https://api.searchspring.net/api/recommend/trending
Best Selling (or Complementary Items)
This endpoint will return products that were Most Bought on your site.
If the seed parameter is passed, this will return products that were most often Also Bought in the same user sessions on your site, when the seed product(s) was/were purchased.
https://api.searchspring.net/api/recommend/best-selling
Request Parameters
All parameters can be used with any of the endpoints listed above.
siteId (Required)
Format | String |
Description | The unique ID for the website to fetch recommendations for. This can be found on the My Account page in the Searchspring Management Console under "Site ID". |
Example Value | "scmq7n" |
attributes
Format | Array[String(s)] |
Description |
Request specific fields to be returned for each product.
|
Example Values | ["days_since_published", "ga_unique_purchases"] |
tag
If using an API integration with Product Recommendations+ Profiles, the minimum threshold and templates in the profile editor will not work.
Format | String |
Description |
The Recommendations+ Profile ID Tag. To apply a Recommendations+ Profile to the response, simply pass the tag here. The tag is the "Profile ID" listed under the title of a profile. The profile settings will always override whatever endpoint you are hitting. |
Example Value | "also-viewed" |
experimental.context.query
Format | String |
Description | Experimental feature: Attaches a search query with loose matching logic (Only needs to match one or more words from the query) to return "fallback" results. Essentially the same behavior as Expanded Search. Very useful for Zero Results Pages. Can still be mixed with profile filters/boosts/etc. Note: Requires a profile tag to be passed from a custom type profile (not complementary, etc.) |
Example Value | "ball murray" |
seed
Format | Array[String(s)] |
Description | If you are looking for recommendations related to a specific product or set of products, pass the seed SKU(s) here. Only required for Complementary Items (also-bought) and Similar Items (also-viewed) recommendation types. |
Example Values | ["C-LA-W1-20264", "C-NBK-R2-D7043"] "C-NBK-R2-D7043" |
limit
Format | Integer |
Description | Limit the number of product suggestions that are returned. Maximum limit of 100 |
Default | 10 |
Example Value | 4 |
Example Request
"Also Viewed" on a Product Detail Page
cURL
curl -X GET https://api.searchspring.net/api/recommend/trending.json?siteId=scmq7n&seed=12345&limit=2&attributes=color&attributes=color_family
Comments
0 comments
Please sign in to leave a comment.