POST {clientId}/Preferences
Add Preferences. This method allows you to submit multi-channel preference requests for a variety of preference options (Filters) across various programs.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| clientId | string |
None. |
Body Parameters
A collection of preferences to submit.
Collection of Preference| Name | Description | Type | Additional information |
|---|---|---|---|
| ProgramID |
Read-Only: This field is only provided when retrieving preference information and has no relevance to adding preferences. |
string |
Max length: 50 Read-Only |
| ChannelID |
Read-Only: This field is only provided when retrieving preference information and has no relevance to adding preferences. |
string |
Max length: 100 Read-Only |
| UserID |
Read-Only: This field is only provided when retrieving preference information and has no relevance to adding preferences. |
string |
Max length: 256 Read-Only |
| SourceID |
Read-Only: This field is only provided when retrieving preference information and has no relevance to adding preferences. |
string |
Max length: 100 Read-Only |
| LastModifiedDate |
Read-Only: This field is only provided when retrieving preference information and has no relevance to adding preferences. |
string |
Read-Only |
| FilterID |
Contains the ID of the filter in which to store the submitted preference. |
string |
Required Max length: 50 |
| CustomProperties |
Read-Only: This collection is only provided when retrieving preference information and has no relevance to adding preferences. |
Collection of Attribute |
Read-Only |
| CID |
Contains the customer id associated with this preference. This value can be empty ("") or null if a contact element is provided. |
string |
Max length: 50 |
| Prefix |
Contains the name prefix associated with this preference. This value can be empty ("") or null if a contact element is provided. |
string |
Max length: 5 |
| FirstName |
Contains the first name associated with this preference. This value can be empty ("") or null if a contact element is provided. |
string |
Max length: 32 |
| MiddleName |
Contains the middle name associated with this preference. This value can be empty ("") or null if a contact element is provided. |
string |
Max length: 32 |
| LastName |
Contains the last name associated with this preference. This value can be empty ("") or null if a contact element is provided. |
string |
Max length: 100 |
| Suffix |
Contains the name suffix associated with this preference. This value can be empty ("") or null if a contact element is provided. |
string |
Max length: 5 |
| PreferenceType |
Contains the preference type number to determine if it is an Opt-In filter (1) or Opt-Out filter (2). |
integer |
Required |
| ContactElement |
Contains the contact element information to submit with this preference. This field can be ommitted or null if a CID is provided. |
ContactElement |
None. |
| FrequencyID |
Contains the FrequencyID to submit with the preference. This frequencyId must have been defined for this Filter ID in order for it to be submitted properly. |
string |
Max length: 20 |
| PreferenceAttributes |
Contains the preference attributes associated with this CID or ContactElement for this specific Filter ID. |
Collection of Attribute |
None. |
| CustomerDate |
Contains the customer date to associate with this preference. If no date is provided then today's date and time, determined at processing time, will be assigned to this preference. Write-Only field: This field is only evaluated during the submission of preferences. |
string |
Write-Only |
| MatchType |
Read-Only field: This field is only provided when retrieving preference information and has no relevance to adding preferences. |
string |
Max length: 9 Read-Only |
| ReasonCode |
Write-Only Field: This field is only provided for Deactivate Preference and has no relevance to adding and/or getting preferences. |
string |
Write-Only |
| ExpirationDate |
Read-Only field: This field is only provided when retrieving preference information and has no relevance to adding preferences. |
string |
Read-Only |
| PreferenceStatus |
Read-Only field: This field is only provided when retrieving preference information and has no relevance to adding preferences. |
string |
Max length: 7 Read-Only |
Request Formats
application/json, text/json
[
{
"ProgramID": "sample string 1",
"ChannelID": "sample string 2",
"UserID": "sample string 3",
"SourceID": "sample string 4",
"LastModifiedDate": "sample string 5",
"FilterID": "sample string 6",
"CustomProperties": [
{
"Link": 1,
"Key": "sample string 2",
"Value": "sample string 3"
}
],
"CID": "sample string 7",
"Prefix": "sample string 8",
"FirstName": "sample string 9",
"MiddleName": "sample string 10",
"LastName": "sample string 11",
"Suffix": "sample string 12",
"PreferenceType": 13,
"ContactElement": {
"Email": "sample string 1",
"PFT": "sample string 2",
"Address1": "sample string 3",
"Address2": "sample string 4",
"City": "sample string 5",
"StateProvince": "sample string 6",
"CountryCode": "sample string 7",
"PostalCode": "sample string 8"
},
"FrequencyID": "sample string 14",
"PreferenceAttributes": [
{
"Link": 1,
"Key": "sample string 2",
"Value": "sample string 3"
}
],
"CustomerDate": "sample string 15",
"MatchType": "sample string 16",
"ReasonCode": "sample string 17",
"ExpirationDate": "sample string 18",
"PreferenceStatus": "sample string 19"
}
]
application/xml, text/xml
<ArrayOfPreference xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MyPreferences.REST.Models">
<Preference>
<CID>sample string 7</CID>
<ChannelID>sample string 2</ChannelID>
<ContactElement>
<Address1>sample string 3</Address1>
<Address2>sample string 4</Address2>
<City>sample string 5</City>
<CountryCode>sample string 7</CountryCode>
<Email>sample string 1</Email>
<PFT>sample string 2</PFT>
<PostalCode>sample string 8</PostalCode>
<StateProvince>sample string 6</StateProvince>
</ContactElement>
<CustomProperties>
<Attribute>
<Key>sample string 2</Key>
<Link>1</Link>
<Value>sample string 3</Value>
</Attribute>
</CustomProperties>
<CustomerDate>sample string 15</CustomerDate>
<ExpirationDate>sample string 18</ExpirationDate>
<FilterID>sample string 6</FilterID>
<FirstName>sample string 9</FirstName>
<FrequencyID>sample string 14</FrequencyID>
<LastModifiedDate>sample string 5</LastModifiedDate>
<LastName>sample string 11</LastName>
<MatchType>sample string 16</MatchType>
<MiddleName>sample string 10</MiddleName>
<PrefXML>sample string 26</PrefXML>
<PreferenceAttributes>
<Attribute>
<Key>sample string 2</Key>
<Link>1</Link>
<Value>sample string 3</Value>
</Attribute>
</PreferenceAttributes>
<PreferenceStatus>sample string 19</PreferenceStatus>
<PreferenceType>13</PreferenceType>
<Prefix>sample string 8</Prefix>
<ProgramID>sample string 1</ProgramID>
<ReasonCode>sample string 17</ReasonCode>
<SourceID>sample string 4</SourceID>
<Suffix>sample string 12</Suffix>
<UserID>sample string 3</UserID>
</Preference>
</ArrayOfPreference>
application/x-www-form-urlencoded
Sample not available.
Response Information
Response Codes
- NotFound (404)
- BadRequest (400)
- Unauthorized (401)
- NoContent (204)
Resource Description
None.