POST {clientId}/Profile/Preferences/AlternateIdType/{alternateIdType}/AlternateId/{alternateId}

This method allows you to submit preferences for one or more preference offerings configured in your MyPreferences account by Alternate Id. You can store preferences with the Profile or associate them with any of the available Contact Elements on the Profile. This method will upsert (update or insert) preferences submitted with the request. If a Profile Contact Element doesn’t exist, it will be added to the profile for the specified element type before saving preferences. If the Type specified in the request doesn't exist, the API will return a 404 – Not Found.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
clientId

This is your organization’s MyPreferences account Id.

string

Required

alternateIdType

Type of AlternateId for the Profile

string

Required

alternateId

Value of the Profile's AlternateId

string

Required

Body Parameters

NameDescriptionTypeAdditional information
ProfilePreferences

A collection of preferences associated with the User Profile.

Collection of CreateProfilePreference

Profile preferences are tied to the user’s profile. These preferences are not associated with any contact element on the profile.

Addresses

A collection of preferences associated with the mailing addresses on the User Profile

Collection of CreateAddressPreference
PhoneNumbers

A collection of preferences associated with the phone numbers on the User Profile

Collection of CreatePhoneNumberPreference
Emails

A collection of preferences associated with the email addresses on the User Profile

Collection of CreateEmailPreference

Request Formats

application/json, text/json, application/json-patch+json

Sample:
{
  "ProfilePreferences": [
    {
      "PreferenceAttributes": [
        {
          "Key": "sample string 1",
          "Value": "sample string 2"
        },
        {
          "Key": "sample string 1",
          "Value": "sample string 2"
        }
      ],
      "FilterId": "sample string 1",
      "PreferenceType": 1,
      "FrequencyId": "sample string 2",
      "CustomerDate": "sample string 3"
    },
    {
      "PreferenceAttributes": [
        {
          "Key": "sample string 1",
          "Value": "sample string 2"
        },
        {
          "Key": "sample string 1",
          "Value": "sample string 2"
        }
      ],
      "FilterId": "sample string 1",
      "PreferenceType": 1,
      "FrequencyId": "sample string 2",
      "CustomerDate": "sample string 3"
    }
  ],
  "Addresses": [
    {
      "AddressPreferences": [
        {
          "PreferenceAttributes": [
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            },
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            }
          ],
          "FilterId": "sample string 1",
          "PreferenceType": 1,
          "FrequencyId": "sample string 2",
          "CustomerDate": "sample string 3"
        },
        {
          "PreferenceAttributes": [
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            },
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            }
          ],
          "FilterId": "sample string 1",
          "PreferenceType": 1,
          "FrequencyId": "sample string 2",
          "CustomerDate": "sample string 3"
        }
      ],
      "AddressType": "sample string 1",
      "Address1": "sample string 3",
      "Address2": "sample string 4",
      "City": "sample string 5",
      "StateProvince": "sample string 6",
      "CountryCode_Numeric": "sample string 7",
      "CountryCode_Alpha2": "sample string 8",
      "CountryCode_Alpha3": "sample string 9",
      "PostalCode": "sample string 10",
      "IsDefault": "true"
    },
    {
      "AddressPreferences": [
        {
          "PreferenceAttributes": [
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            },
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            }
          ],
          "FilterId": "sample string 1",
          "PreferenceType": 1,
          "FrequencyId": "sample string 2",
          "CustomerDate": "sample string 3"
        },
        {
          "PreferenceAttributes": [
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            },
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            }
          ],
          "FilterId": "sample string 1",
          "PreferenceType": 1,
          "FrequencyId": "sample string 2",
          "CustomerDate": "sample string 3"
        }
      ],
      "AddressType": "sample string 1",
      "Address1": "sample string 3",
      "Address2": "sample string 4",
      "City": "sample string 5",
      "StateProvince": "sample string 6",
      "CountryCode_Numeric": "sample string 7",
      "CountryCode_Alpha2": "sample string 8",
      "CountryCode_Alpha3": "sample string 9",
      "PostalCode": "sample string 10",
      "IsDefault": "true"
    }
  ],
  "PhoneNumbers": [
    {
      "PhonePreferences": [
        {
          "PreferenceAttributes": [
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            },
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            }
          ],
          "FilterId": "sample string 1",
          "PreferenceType": 1,
          "FrequencyId": "sample string 2",
          "CustomerDate": "sample string 3"
        },
        {
          "PreferenceAttributes": [
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            },
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            }
          ],
          "FilterId": "sample string 1",
          "PreferenceType": 1,
          "FrequencyId": "sample string 2",
          "CustomerDate": "sample string 3"
        }
      ],
      "PhoneType": "sample string 1",
      "PhoneNumber": "sample string 2",
      "IsDefault": "true",
      "IsMobile" : "true"
    },
    {
      "PhonePreferences": [
        {
          "PreferenceAttributes": [
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            },
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            }
          ],
          "FilterId": "sample string 1",
          "PreferenceType": 1,
          "FrequencyId": "sample string 2",
          "CustomerDate": "sample string 3"
        },
        {
          "PreferenceAttributes": [
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            },
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            }
          ],
          "FilterId": "sample string 1",
          "PreferenceType": 1,
          "FrequencyId": "sample string 2",
          "CustomerDate": "sample string 3"
        }
      ],
      "PhoneType": "sample string 1",
      "PhoneNumber": "sample string 2",
      "IsDefault": "true",
      "IsMobile" : "true"
    }
  ],
  "Emails": [
    {
      "EmailPreferences": [
        {
          "PreferenceAttributes": [
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            },
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            }
          ],
          "FilterId": "sample string 1",
          "PreferenceType": 1,
          "FrequencyId": "sample string 2",
          "CustomerDate": "sample string 3"
        },
        {
          "PreferenceAttributes": [
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            },
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            }
          ],
          "FilterId": "sample string 1",
          "PreferenceType": 1,
          "FrequencyId": "sample string 2",
          "CustomerDate": "sample string 3"
        }
      ],
      "EmailAddressType": "sample string 1",
      "EmailAddress": "sample string 2",
      "IsDefault": "true"
    },
    {
      "EmailPreferences": [
        {
          "PreferenceAttributes": [
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            },
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            }
          ],
          "FilterId": "sample string 1",
          "PreferenceType": 1,
          "FrequencyId": "sample string 2",
          "CustomerDate": "sample string 3"
        },
        {
          "PreferenceAttributes": [
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            },
            {
              "Key": "sample string 1",
              "Value": "sample string 2"
            }
          ],
          "FilterId": "sample string 1",
          "PreferenceType": 1,
          "FrequencyId": "sample string 2",
          "CustomerDate": "sample string 3"
        }
      ],
      "EmailAddressType": "sample string 1",
      "EmailAddress": "sample string 2",
      "IsDefault": "true"
    }
  ]
}

application/xml, text/xml

Sample:
<CreateUserProfilePreference xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ProfileServices.REST.Models">
  <Addresses>
    <CreateAddressPreference>
      <Address1>sample string 3</Address1>
      <Address2>sample string 4</Address2>
      <City>sample string 5</City>
      <CountryCode_Alpha2>sample string 8</CountryCode_Alpha2>
      <CountryCode_Alpha3>sample string 9</CountryCode_Alpha3>
      <CountryCode_Numeric>sample string 7</CountryCode_Numeric>
      <PostalCode>sample string 10</PostalCode>
      <StateProvince>sample string 6</StateProvince>
      <AddressType>sample string 1</AddressType>
      <IsDefault>true</IsDefault>
      <AddressPreferences>
        <CreateProfilePreference>
          <CustomerDate>sample string 3</CustomerDate>
          <FilterId>sample string 1</FilterId>
          <FrequencyId>sample string 2</FrequencyId>
          <PreferenceAttributes>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
          </PreferenceAttributes>
          <PreferenceType>OPTIN</PreferenceType>
        </CreateProfilePreference>
        <CreateProfilePreference>
          <CustomerDate>sample string 3</CustomerDate>
          <FilterId>sample string 1</FilterId>
          <FrequencyId>sample string 2</FrequencyId>
          <PreferenceAttributes>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
          </PreferenceAttributes>
          <PreferenceType>OPTIN</PreferenceType>
        </CreateProfilePreference>
      </AddressPreferences>
    </CreateAddressPreference>
    <CreateAddressPreference>
      <Address1>sample string 3</Address1>
      <Address2>sample string 4</Address2>
      <City>sample string 5</City>
      <CountryCode_Alpha2>sample string 8</CountryCode_Alpha2>
      <CountryCode_Alpha3>sample string 9</CountryCode_Alpha3>
      <CountryCode_Numeric>sample string 7</CountryCode_Numeric>
      <PostalCode>sample string 10</PostalCode>
      <StateProvince>sample string 6</StateProvince>
      <AddressType>sample string 1</AddressType>
      <IsDefault>true</IsDefault>
      <AddressPreferences>
        <CreateProfilePreference>
          <CustomerDate>sample string 3</CustomerDate>
          <FilterId>sample string 1</FilterId>
          <FrequencyId>sample string 2</FrequencyId>
          <PreferenceAttributes>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
          </PreferenceAttributes>
          <PreferenceType>OPTIN</PreferenceType>
        </CreateProfilePreference>
        <CreateProfilePreference>
          <CustomerDate>sample string 3</CustomerDate>
          <FilterId>sample string 1</FilterId>
          <FrequencyId>sample string 2</FrequencyId>
          <PreferenceAttributes>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
          </PreferenceAttributes>
          <PreferenceType>OPTIN</PreferenceType>
        </CreateProfilePreference>
      </AddressPreferences>
    </CreateAddressPreference>
  </Addresses>
  <Emails>
    <CreateEmailPreference>
      <EmailAddress>sample string 2</EmailAddress>
      <EmailAddressType>sample string 1</EmailAddressType>
      <IsDefault>true</IsDefault>
      <EmailPreferences>
        <CreateProfilePreference>
          <CustomerDate>sample string 3</CustomerDate>
          <FilterId>sample string 1</FilterId>
          <FrequencyId>sample string 2</FrequencyId>
          <PreferenceAttributes>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
          </PreferenceAttributes>
          <PreferenceType>OPTIN</PreferenceType>
        </CreateProfilePreference>
        <CreateProfilePreference>
          <CustomerDate>sample string 3</CustomerDate>
          <FilterId>sample string 1</FilterId>
          <FrequencyId>sample string 2</FrequencyId>
          <PreferenceAttributes>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
          </PreferenceAttributes>
          <PreferenceType>OPTIN</PreferenceType>
        </CreateProfilePreference>
      </EmailPreferences>
    </CreateEmailPreference>
    <CreateEmailPreference>
      <EmailAddress>sample string 2</EmailAddress>
      <EmailAddressType>sample string 1</EmailAddressType>
      <IsDefault>true</IsDefault>
      <EmailPreferences>
        <CreateProfilePreference>
          <CustomerDate>sample string 3</CustomerDate>
          <FilterId>sample string 1</FilterId>
          <FrequencyId>sample string 2</FrequencyId>
          <PreferenceAttributes>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
          </PreferenceAttributes>
          <PreferenceType>OPTIN</PreferenceType>
        </CreateProfilePreference>
        <CreateProfilePreference>
          <CustomerDate>sample string 3</CustomerDate>
          <FilterId>sample string 1</FilterId>
          <FrequencyId>sample string 2</FrequencyId>
          <PreferenceAttributes>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
          </PreferenceAttributes>
          <PreferenceType>OPTIN</PreferenceType>
        </CreateProfilePreference>
      </EmailPreferences>
    </CreateEmailPreference>
  </Emails>
  <PhoneNumbers>
    <CreatePhoneNumberPreference>
      <PhoneNumber>sample string 2</PhoneNumber>
      <PhoneType>sample string 1</PhoneType>
      <IsDefault>true</IsDefault>
      <IsMobile>true</IsMobile>
      <PhonePreferences>
        <CreateProfilePreference>
          <CustomerDate>sample string 3</CustomerDate>
          <FilterId>sample string 1</FilterId>
          <FrequencyId>sample string 2</FrequencyId>
          <PreferenceAttributes>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
          </PreferenceAttributes>
          <PreferenceType>OPTIN</PreferenceType>
        </CreateProfilePreference>
        <CreateProfilePreference>
          <CustomerDate>sample string 3</CustomerDate>
          <FilterId>sample string 1</FilterId>
          <FrequencyId>sample string 2</FrequencyId>
          <PreferenceAttributes>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
          </PreferenceAttributes>
          <PreferenceType>OPTIN</PreferenceType>
        </CreateProfilePreference>
      </PhonePreferences>
    </CreatePhoneNumberPreference>
    <CreatePhoneNumberPreference>
      <PhoneNumber>sample string 2</PhoneNumber>
      <PhoneType>sample string 1</PhoneType>
      <IsDefault>true</IsDefault>
      <IsMobile>true</IsMobile>
      <PhonePreferences>
        <CreateProfilePreference>
          <CustomerDate>sample string 3</CustomerDate>
          <FilterId>sample string 1</FilterId>
          <FrequencyId>sample string 2</FrequencyId>
          <PreferenceAttributes>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
          </PreferenceAttributes>
          <PreferenceType>OPTIN</PreferenceType>
        </CreateProfilePreference>
        <CreateProfilePreference>
          <CustomerDate>sample string 3</CustomerDate>
          <FilterId>sample string 1</FilterId>
          <FrequencyId>sample string 2</FrequencyId>
          <PreferenceAttributes>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
            <PreferenceAttribute>
              <Key>sample string 1</Key>
              <Value>sample string 2</Value>
            </PreferenceAttribute>
          </PreferenceAttributes>
          <PreferenceType>OPTIN</PreferenceType>
        </CreateProfilePreference>
      </PhonePreferences>
    </CreatePhoneNumberPreference>
  </PhoneNumbers>
  <ProfilePreferences>
    <CreateProfilePreference>
      <CustomerDate>sample string 3</CustomerDate>
      <FilterId>sample string 1</FilterId>
      <FrequencyId>sample string 2</FrequencyId>
      <PreferenceAttributes>
        <PreferenceAttribute>
          <Key>sample string 1</Key>
          <Value>sample string 2</Value>
        </PreferenceAttribute>
        <PreferenceAttribute>
          <Key>sample string 1</Key>
          <Value>sample string 2</Value>
        </PreferenceAttribute>
      </PreferenceAttributes>
      <PreferenceType>OPTIN</PreferenceType>
    </CreateProfilePreference>
    <CreateProfilePreference>
      <CustomerDate>sample string 3</CustomerDate>
      <FilterId>sample string 1</FilterId>
      <FrequencyId>sample string 2</FrequencyId>
      <PreferenceAttributes>
        <PreferenceAttribute>
          <Key>sample string 1</Key>
          <Value>sample string 2</Value>
        </PreferenceAttribute>
        <PreferenceAttribute>
          <Key>sample string 1</Key>
          <Value>sample string 2</Value>
        </PreferenceAttribute>
      </PreferenceAttributes>
      <PreferenceType>OPTIN</PreferenceType>
    </CreateProfilePreference>
  </ProfilePreferences>
</CreateUserProfilePreference>

Response Information

Response Codes

HTTP Status CodeTextDescription
201 Created The request was successful and resulted in the creation of a new resource. The newly created resource can be referenced by its specific URI returned in the Location header field.
400 Bad Request The request was invalid and cannot be processed. This may be a result of a malformed request. You must update the request before trying again.
401 Unauthorized Authentication credentials are missing or incorrect. You must verify your ClientId, UserId, and Authorization Scheme before trying again.
403 Forbidden The authentication credentials were insufficient to grant access to the requested resource. In most cases, your user may not have the appropriate permissions to access the requested resource. Verify User Group permissions for your user before trying again.
409 Conflict The request could not be completed due to a conflict with the current state of the target resource. In most cases, an instance with the same already exists on the target resource. You must update the request before trying again.
500 Internal Server Error The server encountered an unexpected condition that prevented it from fulfilling the request. Notify PossibleNOW Support if it’s a continuous occurrence.

Resource Description

None.