POST /preferencecentre/setpersonpref
This documentation is no longer supportedFor the latest information on our API, see Getting Started with the RedEye API
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.
{
"pid": "custrefid",
"person": [
{
"custrefid": "12345678",
"firstname": "Joe",
"town": "Halifax"
},
{
"custrefid": "87654321",
"firstname": "Jane",
"town": "Crewe"
}
]
}
Depending on your authorised set of parameters, you can set the parameters for one person (or multiple people in an array), for example, by updating their name. If the same person is included in the API call, any parameter updates will take the values off the last entry of that person.
Creating New Person Records
If the person does not exist in the database then the person or people passed in the call will be created and the corresponding parameters updated as long as you specify a primary personal identifier. Your primary PID is set in the database and is also known as your primary dedup field.
Warning: We do not support the creation of person records based on a secondary personal identifier. Person aliases are not supported
Note: A maximum limit of 1000 person records applies to the request as a whole. The entire request is rejected if the limit is exceeded.
Note: 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.
Body Sample
{
"person": [
{
"email": "string",
"firstname": "string",
"lastname": "string",
"postcode": "string",
"dob": "string",
"gender": "string",
"kids": 0,
"location": "string",
"income": 0,
"housenumber": "string",
"homephone": "string",
"workphone": "string",
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"title": "string",
"mobile": "string",
"maritalstatus": "string",
"occupation": "string",
"carowner": 0,
"emailpermit": 0,
"postalpermit": "string",
"sms_optout": "string",
"push_permit": "string"
}
]
}
Body Schema
{} PersonsPrefCenterRequest
person array*[PersonPrefCenter]
{} PersonPrefCenter
emailstring*(required): The email address of the person.
firstnamestring(optional)The person's first name.
lastnamestring(optional)The person's last name.
postcodestring(optional)
dobstring(optional)
genderstring(optional)
kidsinteger(optional)
locationstring(optional)
incomeinteger(optional)
housenumberstring(optional)
homephonestring(optional)
workphonestring(optional)
address1string(optional)
address2string(optional)
address3string(optional)
address4string(optional)
titlestring(optional)
mobilestring(optional)
maritalstatusstring(optional)
occupationstring(optional)
carownerinteger(optional)
emailpermitinteger(optional): This can be an integer with values 1 (allow email permit) or 0 (do not allow email permit) or a string with the following allowed values - "1","0","Y","N"
postalpermitstring(optional): Accepts values of "1" to enable postal permit or "0" to disable postal permit
sms_optoutstring(optional): Accepts values of "0" to enable SMS or "1" to disable SMS
push_permitstring(optional): Accepts values of "1" to enable push permit or "0" to disable push permit
Response Sample
[
{
"email": "string",
"firstname": "string",
"lastname": "string",
"postcode": "string",
"dob": "string",
"gender": "string",
"kids": 0,
"location": "string",
"income": 0,
"housenumber": "string",
"homephone": "string",
"workphone": "string",
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"title": "string",
"mobile": "string",
"maritalstatus": "string",
"occupation": "string",
"carowner": 0,
"emailpermit": 0,
"postalpermit": "string",
"sms_optout": "string",
"push_permit": "string"
}
]
Response Schema
{} PersonPrefCenter
emailstring(required): The email address of the person.
firstnamestring(optional): The person's first name.
lastnamestring(optional): The person's last name.
postcodestring(optional)
dobstring(optional)
genderstring(optional)
kidsinteger(optional)
locationstring(optional)
incomeinteger(optional)
housenumberstring(optional)
homephonestring(optional)
workphonestring(optional)
address1string(optional)
address2string(optional)
address3string(optional)
address4string(optional)
titlestring(optional)
mobilestring(optional)
maritalstatusstring(optional)
occupationstring(optional)
carownerinteger(optional)
emailpermitinteger(optional): This can be an integer with values 1 (allow email permit) or 0 (do not allow email permit) or a string with the following allowed values - "1","0","Y","N"
postalpermitstring(optional): Accepts values of "1" to enable postal permit or "0" to disable postal permit
smsoptoutstring(optional): Accepts values of "0" to enable SMS or "1" to disable SMS
pushpermitstring(optional): Accepts values of "1" to enable push permit or "0" to disable push permit
Retrieve someone's preferences
POST /preferencecentre/getpersonpref
You can retrieve person preferences by calling the preferencecentre/getpersonpref command. The command enables you to retrieve any of the predefined list of allowed parameters for a single person or people by using their primary identifier (PID). Only one record per person can be retrieved.
Note: If you're going to use a secondary identifier (instead of a primary) and the PID search value matches more than one person record in the database then only the most recent person record will be returned.
The PID is an optional parameter that allows you to explicitly set a secondary personal identifier in the request or it can be set by RedEye Administrators in the database.
{
"person": [
{
"custrefid": "12345678"
}
],
"prefs": [
"firstname",
"lastname",
"address1"
]
}
Body Sample
{
"person": \[
{
"email": "string",
"prefs": [
{
"email": "string",
"firstname": "string",
"lastname": "string",
"postcode": "string",
"dob": "string",
"gender": "string",
"kids": 0,
"location": "string",
"income": 0,
"housenumber": "string",
"homephone": "string",
"workphone": "string",
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"title": "string",
"mobile": "string",
"maritalstatus": "string",
"occupation": "string",
"carowner": 0,
"emailpermit": 0,
"postalpermit": "string",
"sms_optout": "string",
"push_permit": "string"
}
]
}
]
}
Body Schema
{} GetPerfCenterRequest
personarray[PersonPrefCenterGet]
{} PersonPrefCenterGet
emailstring: The email address of the person.
prefsarray[PersonPrefCenter]: A list of a person's preferences.
{} PersonPrefCenter
emailstring(required): The email address of the person.
firstnamestring(optional): The person's first name.
lastnamestring(optional): The person's last name.
postcode string(optional)
dobstring(optional)
genderstring(optional)
kidsinteger(optional)
locationstring(optional)
incomeinteger(optional)
housenumberstring(optional)
homephonestring(optional)
workphonestring(optional)
address1string(optional)
address2string(optional)
address3string(optional)
address4string(optional)
titlestring(optional)
mobilestring(optional)
maritalstatusstring(optional)
occupationstring(optional)
carownerinteger(optional)
emailpermitinteger(optional): This can be an integer with values 1 (allow email permit) or 0 (do not allow email permit) or a string with the following allowed values - "1","0","Y","N"
postalpermitstring(optional): Accepts values of "1" to enable postal permit or "0" to disable postal permit
smsoptout string(optional): Accepts values of "0" to enable SMS or "1" to disable SMS
push_permitstring(optional): Accepts values of "1" to enable push permit or "0" to disable push permit
Response Sample
{
"[email protected]": {
"email": "string",
"firstname": "string",
"lastname": "string",
"postcode": "string",
"dob": "string",
"gender": "string",
"kids": 0,
"location": "string",
"income": 0,
"housenumber": "string",
"homephone": "string",
"workphone": "string",
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"title": "string",
"mobile": "string",
"maritalstatus": "string",
"occupation": "string",
"carowner": 0,
"emailpermit": 0,
"postalpermit": "string",
"sms_optout": "string",
"push_permit": "string"
}
}
Response Schema
{} GetPrefCentreResponse
[email protected] PersonPrefCenter(optional)
{} PersonPrefCenter
emailstring(required) The email address of the person.
firstnamestring(optional)The person's first name.
lastnamestring(optional)The person's last name.
postcodestring(optional)
dobstring(optional)
genderstring(optional)
kidsinteger(optional)
locationstring(optional)
incomeinteger(optional)
housenumberstring(optional)
homephonestring(optional)
workphonestring(optional)
address1string(optional)
address2string(optional)
address3string(optional)
address4string(optional)
titlestring(optional)
mobilestring(optional)
maritalstatusstring(optional)
occupationstring(optional)
carownerinteger(optional)
emailpermitinteger(optional): This can be an integer with values 1 (allow email permit) or 0 (do not allow email permit) or a string with the following allowed values - "1","0","Y","N"
postalpermitstring(optional): Accepts values of "1" to enable postal permit or "0" to disable postal permit
smsoptout string(optional): Accepts values of "0" to enable SMS or "1" to disable SMS
pushpermit string(optional): Accepts values of "1" to enable push permit or "0" to disable push permit
