user/preference{USER ID}
Overview
Description
API: https://recs.richrelevance.com/rrserver/api/user/preference/{USER_ID}
This is part of Customer Preference Center (CPC). It summarizes the customer's information and preferences.
Parameters
All parameters are case-sensitive.
IMPORTANT: Only call the 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.
Name |
Required or Optional |
Description |
---|---|---|
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 |
fields |
Required |
Returned preference values. Separate the values must be separated by the pipe "|" character. It can only be the following values:
Example: fields=pref_brand|pref_product |
This API expects the userID to be a path parameter and not a query parameter.
Sample Request
function retrieveUser(fields) {
var prefUrl="http://recs.richrelevance.com/rrserver/api/user/preference/"
+ R3_COMMON.userId + "?apiKey="+ R3_COMMON.apiKey + "&fields="
+ fields;
jQuery.ajax(prefUrl, {
dataType: "jsonp",
success: function(data, status) {
console.log(data);
}
});
}
Sample Result
200 OK
{
'userId': 'USER185',
'pref_brand': {
'like': ['Sony', 'Nabisco']
}
}