UserPreference
UserPreference Service
post /userpreference/v1/store
Store a user preference
Request:
Body
Media type: application/json
Type: object
Properties
Property | Required (type) | Description |
---|---|---|
siteId | (integer) | The identifier for the site. |
sessionId | (string) | The identifier for the session, as assigned by the merchant |
targetList | required (array of ) | The list of nouns associated with the target. |
rUserGuid | required (string) | The user id assigned to the request by Rich Relevance. |
rViewGuid | required (string) | The view context id assigned by Rich Relevance. |
userId: | required (string) | The merchant defined identifier for the user. |
action | required (string) | The user's preference for the product. |
target | required (string) | The product for which we store the user's preference. |
timestamp | (integer) | The date time stamp. |
Example:
{ "rUserGuid": "2694fbdf-c756-4a79-b7bf-a6560ac2ebd5", "rViewGuid": "37a50ce0-d867-5b8a-c8e0-b7671bd3fce6", "userId":"7da4bdfe1ea3f0963eb66f0793", "sessionId":"KPH9N15vmqB6Sd41hB92_XzYsFng0YnRhR4=", "timestamp":1485075094497, "siteId":1077, "target":"product", "targetList":["V_347G175"], "action":"like" }
Response:
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{}
HTTP status code 400
Body
Media type: application/json
Type: object
Properties
- code: required (integer)
- details: required (string)
- message: required (string)
- status: required (string)
HTTP status code 500
Body
Media type: application/json
Type: object
Properties
- code: required (integer)
- details: required (string)
- message: required (string)
- status: required (string)
GET /userpreference/{version}/get
Retrieve user preference for a user ID
Request
URI Parameters
- version: required (string)
Query Parameters
- userid: required (integer)
The merchant defined identifier for the user
Example:
23
HTTP status code 200
Body
Media type: application/json
Type: object
Properties
Property | Required (type) | Description |
---|---|---|
siteId | (integer) | The identifier for the site. |
externalSessionId | required (string) | The identifier for the session, as assigned by the merchant. |
userGUID | required (string) | The user id assigned to the request by Rich Relevance. |
viewGUID | required (string) | The view context id assigned by Rich Relevance. |
targetIds | required (array of ) | The list of nouns associated with the target. |
datetime | required (integer) | The date time stamp. |
action | required (string) | The user's preference for the product. |
target | required (string) | The product for which we store the user's preference. |
externalUserId | required (string) | The merchant defined identifier for the user. |
Example:
{
"userGUID": "2694fbdf-c756-4a79-b7bf-a6560ac2ebd5",
"viewGUID": "792b640b-8b56-4e8b-5249-0856340e99ce",
"externalUserId": "23",
"externalSessionId": "KPH9N15vmqB6Sd41hB92_XzYsFng0YnRhR4=",
"datetime": 1492721307691,
"siteId": 1077,
"target": "product",
"targetIds": [
"V_347G175"
],
"action": "like"
}
HTTP status code 500
Body
Media type: application/json
Type: object
Properties
- code: required (integer)
- details: required (string)
- message: required (string)
- status: required (string)