Core Integration recsForPlacements API
Description
This endpoint logs shopper behavior and when used with a placement name returns recommendations for a named placement.
URL
Production
Use this URL to request personalization from your production environment.
https://recs.richrelevance.com/rrserver/api/rrPlatform/recsForPlacements
Integration
Use this URL to request personalization from your QA, staging or development environment. This way, you can test change without impacting your production environment.
https://integration.richrelevance.com/rrserver/api/rrPlatform/recsForPlacements
Parameters
Note:
- You need only call parameters.
- Algonomy operates off a set of APIs that support many applications and clients concurrently. Algonomy may update and enhance these APIs at any time.
- All parameters are case sensitive.
Name | Required or Optional | Description |
---|---|---|
aari | Optional | |
apiClientKey | Required | |
apiKey | Required | |
atcid | Required on Add to Cart page | |
bi | Optional | |
categoryData | Optional | |
categoryId | Required on category_page | |
chi | Optional | |
count | Optional | |
excludeHtml | Optional | |
filterAtr | Optional | |
flv | Optional | |
fpb | Optional | |
includeBrandFilteredProducts | Optional | |
ipor | Optional | |
jcb | Required for jsonp | |
jsonp | Optional | |
o
|
Required on purchase_complete_page | |
placements | Required | |
pp |
Required on purchase_complete_page Optional on cart_page |
|
ppc |
Required on purchase_complete_page Optional on cart_page |
|
productId | Required on item_page, purchase_complete_page, and cart_page (when not empty) |
A single product ID, or a list of product IDs. Part of an order definition on the purchase complete page. Use the pipe "|" character to separate the product IDs. Example: productId=uv2345|xt1234 Note: For the add_to_cart_page request, the product ID is passed as the Add to Cart ID through the 'atcid' parameter. Hence this productId field is not required. Note: SKU IDs can be passed to API calls as well. When specifying a PRODUCT ID, the SKU ID should be appended with a tilde ('~') separator. Example: ...&productId=[product_id]~[sku_id] |
q |
Required on purchase_complete_page Optional on cart_page |
|
rcs | Required |
Algonomy Cookie String. This is the encrypted Algonomy cookie for the user associated with the API request. It should be passed exactly as it was received in a prior API response. Clients should ensure to preserve the 'rcs' value just as it was served. The 'rcs' parameter is always alphanumeric and case-sensitive, with the token value including a mix of uppercase letters, lowercase letters, and numbers. Note: The 'rcs' parameter allows merchants to effectively provide the Algonomy platform access to a user's Algonomy browser cookie by acting as a cookie proxy (or cookie pass-through). This process involves the merchant reading and writing a user's Algonomy browser cookie and passing it to and from Algonomy via the server-side API. |
rg | Optional | |
rgt | Optional | |
rid | Optional | |
searchTerm | Required on search_page | |
sessionId | Required | |
sgs | Optional | |
st | Optional | |
ts | Optional | |
userAttribute | Optional | |
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: userAttribute=eye_color:|hair_color: |
userId | Optional |
#1 Example Requests (Core)
Retrieve the rcs parameter with Home Page placement page type.
GET /rrserver/api/rrPlatform/recsForPlacements?apiKey=showcaseparent&apiClientKey=776cdd80331919e7&userId=48454648&sessionId=827ccb0eea8a706c4c34a16891f84e7b&placements=home_page
Retrieve the rcs parameter with Item Page placement page type using the seed product ID 24516217 for the user with ID 48454648.
GET /rrserver/api/rrPlatform/recsForPlacements?apiKey=showcaseparent&apiClientKey=776cdd80331919e7&userId=48454648&sessionId=827ccb0eea8a706c4c34a16891f84e7b&placements=item_page&productId=24516217
Retrieve the rcs parameter with Add to Cart Page placement page type, for the user with ID 48454648, passing 24516217 (the ID of the product added to the cart) in the atcid parameter.
GET /rrserver/api/rrPlatform/recsForPlacements?apiKey=showcaseparent&apiClientKey=776cdd80331919e7&userId=48454648&sessionId=827ccb0eea8a706c4c34a16891f84e7b&placements=add_to_cart_page&atcid=24516217
#1 Example Response
{ "rcs": "eF5j4cotK8lM4TMzsNA11DVkKU32MEkyBAJjM11jYzMzXRNTozRdA0sgYZxiammQaGJmZmaaDABuTQ0O", "status": "ok" }
#2 Example Requests
Retrieve the rcs parameter with Category Page placement page for user ID 48454648, and for category 6406:
GET /rrserver/api/rrPlatform/recsForPlacements?apiKey=a6x5029gd6941a22&st=0&count=20&apiClientKey=x3f023fd649003&placements=category_page &sessionId=27083322340392734752015&userId=48454648&categoryId=6406
#2 Example Response
The response is a JSON object with rcs and status.
{ "rcs": "eF5j48otK8lM4TGy0DXUNWQpTfZINU80TLG0NNdNtrRM1DUxSk3WNTY3NdI1MjM1MUg1TzI0SzPgKgXqSeYwstBLBAAmHBDP", "status": "ok" }