recsUsingStrategy
IMPORTANT: Only call parameters that you need. Algonomy operates off a set of APIs that support many applications and clients concurrently. Algonomy may update and enhance these APIs at any time.
http://recs.richrelevance.com/rrserver/api/rrPlatform/recsUsingStrategy
Note: The URL requires the API key and parameter(s) to function properly. See below for more information on example URL requests.
Description
Returns recommendations from a specific strategy. No placement is required for this API call.
IMPORTANT: The recommendations returned by the recsUsingStrategy API respect recommendation restriction rules set up in the Algonomy dashboard. (Boosting and manual recommendations rules are currently not respected by this API.)
Debugging note: recsUsingStrategy is not compatible with useDummyData or Display Examples.
Parameters
Note: All paramets are case sensitive.
Name |
Required or Optional |
Description |
---|---|---|
apiClientKey |
Required |
A unique key specific to each API implementation. It identifies the specific application or client for reporting, permissions, and merchandising. This is provided by Algonomy. Example: apiClientKey=b0126f995ac848159d |
apiKey |
Required |
A unique key that identifies the site. Each Algonomy client has a unique API key to separate data and traffic from other clients. This is provided by Algonomy. Example: apiKey=4faeaf752ee40a0f |
attribute |
Optional |
Retrieves custom attributes provided in the catalog feed. Use this parameter multiple times to request more than one attribute by separating each attribute with the ampersand "&" character. Use the asterisk "*" character as the parameter value to request all attributes. Example: &attribute=COLOR&attribute=SIZE |
blockedProductIds |
Optional |
A single product ID, or a list of product IDs that a merchant doesn't want to recommend to a shopper. Use the ampersand "&" character to specify this parameter multiple times. Example: &blockedProductIds=uv2345&blockedProductIds=xt1234 |
callback |
Optional |
Name of the JavaScript function that JSON data will be passed to. It must be specified for JSONP. The value of this parameter is used as the name of the js function in the response. Example: callback=products_returned |
categoryData |
Optional |
Omits category data (categoryIds and categories) when set to false. The default is true. Example: categoryData=false |
cts |
Optional |
Click-through server. Changes a portion of the click-through URL when a shopper clicks on a recommendation. It specifies the destination server of the click (for example, www.buystuff.com vs. m.buystuff.com). This parameter is typically used during development to keep users within the same environment when clicking on a recommendation. Example: cts=http://test.buystuff.com Note: if the cts parameter is provided in the API request, it overrides the click-through server site configuration setting, and/or cts in the product URL delivered in the feed. |
emailCampaignId |
Optional |
Used only if the request is part of an email campaign. |
requestId |
Optional |
Allows merchants to match responses to requests. The ID returned is untouched in the response object. It's useful if there are multiple requests issued at the same time. Example: requestId=654123 |
resultCount |
Optional |
Number of categories to return. Default is five. |
rid |
Optional |
Region ID. Must be consistent with the ID used in the Product Region Feed. Example: rid=Switzerland-France |
seed |
Required |
Product, category, or search string. This depends on the type of strategy chosen for strategyName:
Note: recsUsingStrategy does not infer category information from product seeds. Example: seed=Baby.Shoes |
sessionId |
Required |
Identifies a single visit by a shopper. Sessions are used by behavioral models (to scope user behaviour in a shopping session) and reporting metrics. Example: sessionId=93484 |
strategyName |
Required |
One of these strategy family names:
Example: strategyName=SiteWideBestSellers |
userAttribute |
Optional |
Custom keys and values that describe the current shopper. Separate information using a semicolon and the pipe "|" character. Example: userAttribute=eye_color:blue;green|hair_color:brown |
userAttributeReplace |
Optional |
Usage is same as userAttribute, except that the attributes sent along with userAttributeReplace will replace all previously sent values for that attribute. Example: userAttributeReplace=eye_color:black In the above example all previous values of eye_color will be removed and replaced with black. If the same attribute is sent along in a single request in userAttribute as well as userAttributeReplace, then the value sent in userAttributeReplace will take precedence. This attribute also supports Delete update against attribute values. Example: userAttribute=eye_color:|hair_color: |
userId |
Required |
User ID. A unique string to identify each shopper (user). All shopper behavior is stored using this key. It is case-sensitive, and should be the same user ID sent to Algonomy in other applications. Example: userId=0982347 |
includeSkuData |
Optional |
True/False, the default value is false. If true, any available sku data provided in the SKU Feed will be provided for the returned products. Example: includeSkuData=true Example JSON Response: Copy
|
seedType |
Optional |
Allows you to define what type of seed gets used for the recommendations |
sgs |
Optional |
Allows you to pass a segment as the seed for the recommendations |
Example Request
https://recs.richrelevance.com/rrserver/api/rrPlatform/recsUsingStrategy?&apiClientKey=e9c9e05289be70e6&apiKey=showcaseparent&userId=1&sessionId=1&strategyName=CategoryBoughtBought&seed=Baby
Example Response
{
"strategyName": "CategoryBoughtBought",
"requestId": "",
"message": "People who bought this category also bought",
"recommendedProducts": [{
"clickURL": "http://recs.richrelevance.com/rrserver/apiclick?a=showcaseparent&cak=e9c9e05289be70e6&ct=http%3A%2F%2Flabs.richrelevance.com%2Fstorre%2Fcatalog%2Fproduct%2Fview%2Fsku%2F10315241&vg=0d470833-48f4-49b4-fd87-69529e9847d6&stid=82&pti=11&pa=-1&pos=0&p=10315241&channelId=e9c9e05289be70e6&s=1&u=1",
"regionPriceDescription": "",
"salePriceRangeCents": [388, 388],
"rating": 4.745999813079834,
"numReviews": 0,
"priceRangeCents": [388, 388],
"categoryIds": ["Grocery", "Grocery.Beverages", "Grocery.Dairy, Eggs & Cheese", "Grocery.Beverages.Coffee", "Grocery.Dairy, Eggs & Cheese.Milk & Cream"],
"salePriceCents": 388,
"imageURL": "http://labs.richrelevance.com/storre/media/catalog/product/g/r/great-value-coffee-non-dairy-creamer-35.3-oz-7853f7455506646c0f389886316a0304.jpg",
"name": "Great Value: Coffee Non-Dairy Creamer, 35.3 Oz",
"genre": "Grocery",
"isRecommendable": true,
"priceCents": 388,
"id": "10315241",
"categories": [{
"hasChildren": false,
"name": "Grocery",
"id": "Grocery"
}, {
"hasChildren": false,
"name": "Beverages",
"id": "Grocery.Beverages"
}, {
"hasChildren": false,
"name": "Dairy, Eggs & Cheese",
"id": "Grocery.Dairy, Eggs & Cheese"
}, {
"hasChildren": false,
"name": "Coffee",
"id": "Grocery.Beverages.Coffee"
}, {
"hasChildren": false,
"name": "Milk & Cream",
"id": "Grocery.Dairy, Eggs & Cheese.Milk & Cream"
}],
"brand": "Great Value"
}, {
"clickURL": "http://recs.richrelevance.com/rrserver/apiclick?a=showcaseparent&cak=e9c9e05289be70e6&ct=http%3A%2F%2Flabs.richrelevance.com%2Fstorre%2Fcatalog%2Fproduct%2Fview%2Fsku%2F10532717&vg=0d470833-48f4-49b4-fd87-69529e9847d6&stid=82&pti=11&pa=-1&pos=1&p=10532717&channelId=e9c9e05289be70e6&s=1&u=1",
"regionPriceDescription": "",
"salePriceRangeCents": [177, 177],
"rating": 4.861999988555908,
"numReviews": 0,
"priceRangeCents": [177, 177],
"categoryIds": ["Grocery", "Baby", "Baby.Diapering & Potty", "Grocery.Infant & Childcare", "Baby.Diapering & Potty.Other Diaper Accessories", "Grocery.Infant & Childcare.Baby Skin Care & Grooming"],
"salePriceCents": 177,
"imageURL": "http://labs.richrelevance.com/storre/media/catalog/product/e/q/enfamil-mild-baby-powder-22-oz-f1bab211aed511a83db87d1d7beb5cc1.jpg",
"name": "Enfamil Mild Baby Powder 22 Oz",
"genre": "Grocery",
"isRecommendable": true,
"priceCents": 177,
"id": "10532717",
"categories": [{
"hasChildren": false,
"name": "Grocery",
"id": "Grocery"
}, {
"hasChildren": false,
"name": "Baby",
"id": "Baby"
}, {
"hasChildren": false,
"name": "Diapering & Potty",
"id": "Baby.Diapering & Potty"
}, {
"hasChildren": false,
"name": "Infant & Childcare",
"id": "Grocery.Infant & Childcare"
}, {
"hasChildren": false,
"name": "Other Diaper Accessories",
"id": "Baby.Diapering & Potty.Other Diaper Accessories"
}, {
"hasChildren": false,
"name": "Baby Skin Care & Grooming",
"id": "Grocery.Infant & Childcare.Baby Skin Care & Grooming"
}],
"brand": "Enfamil"
}, {
"clickURL": "http://recs.richrelevance.com/rrserver/apiclick?a=showcaseparent&cak=e9c9e05289be70e6&ct=http%3A%2F%2Flabs.richrelevance.com%2Fstorre%2Fcatalog%2Fproduct%2Fview%2Fsku%2F10532717&vg=0d470833-48f4-49b4-fd87-69529e9847d6&stid=82&pti=11&pa=-1&pos=2&p=10532717&channelId=e9c9e05289be70e6&s=1&u=1",
"regionPriceDescription": "",
"salePriceRangeCents": [177, 177],
"rating": 4.861999988555908,
"numReviews": 0,
"priceRangeCents": [177, 177],
"categoryIds": ["Grocery", "Baby", "Baby.Diapering & Potty", "Grocery.Infant & Childcare", "Baby.Diapering & Potty.Other Diaper Accessories", "Grocery.Infant & Childcare.Baby Skin Care & Grooming"],
"salePriceCents": 177,
"imageURL": "http://labs.richrelevance.com/storre/media/catalog/product/e/q/enfamil-mild-baby-powder-22-oz-f1bab211aed511a83db87d1d7beb5cc1.jpg",
"name": "Enfamil Mild Baby Powder 22 Oz",
"genre": "Grocery",
"isRecommendable": true,
"priceCents": 177,
"id": "10532717",
"categories": [{
"hasChildren": false,
"name": "Grocery",
"id": "Grocery"
}, {
"hasChildren": false,
"name": "Baby",
"id": "Baby"
}, {
"hasChildren": false,
"name": "Diapering & Potty",
"id": "Baby.Diapering & Potty"
}, {
"hasChildren": false,
"name": "Infant & Childcare",
"id": "Grocery.Infant & Childcare"
}, {
"hasChildren": false,
"name": "Other Diaper Accessories",
"id": "Baby.Diapering & Potty.Other Diaper Accessories"
}, {
"hasChildren": false,
"name": "Baby Skin Care & Grooming",
"id": "Grocery.Infant & Childcare.Baby Skin Care & Grooming"
}],
"brand": "Enfamil"
}, {
"clickURL": "http://recs.richrelevance.com/rrserver/apiclick?a=showcaseparent&cak=e9c9e05289be70e6&ct=http%3A%2F%2Flabs.richrelevance.com%2Fstorre%2Fcatalog%2Fproduct%2Fview%2Fsku%2F13399650&vg=0d470833-48f4-49b4-fd87-69529e9847d6&stid=82&pti=11&pa=-1&pos=3&p=13399650&channelId=e9c9e05289be70e6&s=1&u=1",
"regionPriceDescription": "",
"salePriceRangeCents": [474, 474],
"rating": 4.76200008392334,
"numReviews": 0,
"priceRangeCents": [497, 497],
"categoryIds": ["Grocery", "Grocery.Dairy, Eggs & Cheese", "Health", "Health.Diet & Nutrition", "Grocery.Dairy, Eggs & Cheese.Milk & Cream", "lth", "lth.Diet & Nutrition", "Health.Diet & Nutrition.Sports Nutrition", "lth.Diet & Nutrition.Sports Nutrition"],
"salePriceCents": 474,
"imageURL": "http://labs.richrelevance.com/storre/media/catalog/product/e/a/health-advantedge-carb-control-rich-dark-chocolate-ready-to-drink-shake-11-fl-oz-carton-4-count-d3b10172d9d46e72e57780688ac1d4ae.jpg",
"name": "Health AdvantEDGE Carb Control Rich Dark Chocolate Ready-to-Drink Shake, 11 fl oz carton, 4-count",
"genre": "Health",
"isRecommendable": true,
"priceCents": 497,
"id": "13399650",
"categories": [{
"hasChildren": false,
"name": "Grocery",
"id": "Grocery"
}, {
"hasChildren": false,
"name": "Dairy, Eggs & Cheese",
"id": "Grocery.Dairy, Eggs & Cheese"
}, {
"hasChildren": false,
"name": "Health",
"id": "Health"
}, {
"hasChildren": false,
"name": "Diet & Nutrition",
"id": "Health.Diet & Nutrition"
}, {
"hasChildren": false,
"name": "Milk & Cream",
"id": "Grocery.Dairy, Eggs & Cheese.Milk & Cream"
}, {
"hasChildren": false,
"name": "lth",
"id": "lth"
}, {
"hasChildren": false,
"name": "Diet & Nutrition",
"id": "lth.Diet & Nutrition"
}, {
"hasChildren": false,
"name": "Sports Nutrition",
"id": "Health.Diet & Nutrition.Sports Nutrition"
}, {
"hasChildren": false,
"name": "Sports Nutrition",
"id": "lth.Diet & Nutrition.Sports Nutrition"
}],
"brand": "EAS"
}, {
"clickURL": "http://recs.richrelevance.com/rrserver/apiclick?a=showcaseparent&cak=e9c9e05289be70e6&ct=http%3A%2F%2Flabs.richrelevance.com%2Fstorre%2Fcatalog%2Fproduct%2Fview%2Fsku%2F10292621&vg=0d470833-48f4-49b4-fd87-69529e9847d6&stid=82&pti=11&pa=-1&pos=4&p=10292621&channelId=e9c9e05289be70e6&s=1&u=1",
"regionPriceDescription": "",
"salePriceRangeCents": [250, 250],
"rating": 3.9549999237060547,
"numReviews": 0,
"priceRangeCents": [250, 250],
"categoryIds": ["Grocery", "Grocery.Snacks, Cookies & Chips", "Home", "Grocery.Snacks, Cookies & Chips.Crackers"],
"salePriceCents": 250,
"imageURL": "http://labs.richrelevance.com/storre/media/catalog/product/n/a/nabisco-premium-original-saltine-crackers-16-oz-3e0fbe10087a255d525fb6ebe20f7e33.jpg",
"name": "Nabisco Premium Original Saltine Crackers, 16 oz",
"genre": "Grocery",
"isRecommendable": true,
"priceCents": 250,
"id": "10292621",
"categories": [{
"hasChildren": false,
"name": "Grocery",
"id": "Grocery"
}, {
"hasChildren": false,
"name": "Snacks, Cookies & Chips",
"id": "Grocery.Snacks, Cookies & Chips"
}, {
"hasChildren": false,
"name": "Home",
"id": "Home"
}, {
"hasChildren": false,
"name": "Crackers",
"id": "Grocery.Snacks, Cookies & Chips.Crackers"
}],
"brand": "Nabisco"
}]
}