Skip to main content
RichRelevance

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 paramets are case sensitive.

Important   Only call parameters that you need. RichRelevance operates off a set of APIs that support many applications and clients concurrently. RichRelevance may update and enhance these APIs at any time. If you are building a mobile app, please use our mobile SDKs.

Name Required or Optional Description

apiKey

Required

A unique key that identifies the site. Each RichRelevance client has a unique API key to separate data and traffic from other clients. This is provided by RichRelevance.

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:
  • pref_brand
  • pref_category
  • pref_product
  • pref_store

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']
  }
}