user/preference{USER ID}
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
Note: All parameters are case sensitive.
Important: Only call parameters that you need. Personalization Cloud operates off a set of APIs that support many applications and clients concurrently. Personalization Cloud may update and enhance these APIs at any time.
Name | Required or Optional | Description |
---|---|---|
apiKey |
Required | |
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 |
NOTE: This API expects the userID to be a path parameter and not a query parameter.
Example 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); } }); }
Example Result
200 OK
{ 'userId': 'USER185', 'pref_brand': { 'like': ['Sony', 'Nabisco'] } }