The Preference Centre contains any data that has been parsed via the API.
If a record does not exist in the database, this can be created using the Preference Centre API call, and multiple rows of data can be updated for each person identifier using this method too.
Any data that exists within the Preference Centre can also be retrieved.
Update or create someone's preferences
You can update preferences by calling the preferencecentre/setpersonpref command. The command enables you to update multiple rows for each personal identifier (PID) passed in the call. For example, if you specify the username parameter, all rows with the same username value will be updated with the corresponding parameter values passed in the request.
The PID is an optional parameter that allows you to use it as an alternative way of identifying a person. If not specified, the PID used to identify a person is the email address. Alternative PIDs are custrefid, custrefnum, username and mobile. Please contact your RedEye Account Manager if you need to use an alternative PID.
Considerations
- Person aliases are not supported.
- A maximum limit of 1000 person records applies to the request as a whole. The entire request is rejected if the limit is exceeded.
- The parameters you want to specify in the call must be agreed on with your account manager before you proceed. Additional configuration is required to allow certain parameters to be processed in the call.
- If you supply the PID in the call, this should be in lower case.
- Number parameters are supported without string format, however these are adjusted to be string before being added to the database.
URL to use
METHOD: POST
https://api.redeye.com/[client_id]/preferencecentre/setpersonpref/
Body Sample
{
"pid": "custrefid",
"person": [
{
"custrefid": "string",
"firstname": "string",
"lastname": "string",
"postcode": "string"
},
{
"custrefid": "string",
"firstname": "string",
"lastname": "string"
}
]
}