Skip to main content

Update Constituent Purpose & Channel Preferences via the API

Update Constituent Purpose & Channel Preferences via the API.

Written by Cristina Gruita
Updated over 2 months ago

A GET request returns all current preferences, while a POST request allows you to update them:


Retrieve Purpose & Channel Preferences

Send a GET request to the Purpose and Channel Preferences endpoint.
The response will include a list of preferences with the following fields:

PreferenceType

Indicates the type of preference:

  • Channel: a communication method such as Email, Phone, SMS, Mail.

  • Purpose: a communication purpose such as Fundraising or Events.

PreferenceName

The name of the channel or purpose.

PreferenceAllowed

Indicates whether communication is allowed:

  • true: the preference is permitted.

  • false: communication is not permitted.

  • null: no explicit preference has been set.
    Null values will not update existing preferences.

📌 Note:
Constituents created via the API are set to true or false for all preferences. If no values are passed during creation, the Constituent is added as not permitted.


Update Purpose & Channel Preferences

Use a POST request to update one or more preferences.

Your request may optionally include:

PreferenceDate

The date of the update. If not included, the system date is used.

Campaign

The associated Campaign must already exist in Donorfy.

Reason

The update Reason must exist in Donorfy.

ConsentStatement

The Consent Statement—must already exist in Donorfy.

PreferredChannel

Sets the Constituent’s preferred communication method.
Valid values: mail, email, phone, sms.
If you assign a Preferred Channel for which the Constituent has no contact details, the Preferred Channel will be automatically set to Do Not Contact.


Required fields for a POST update

Your request must include a list of preferences with:

  • PreferenceType.

  • PreferenceName.

  • PreferenceAllowed.

If PreferenceAllowed = null, Donorfy will not change that preference.

Example behaviour

  • Passing true: sets the preference to permitted.

  • Passing false; sets the preference to not permitted.

  • Passing null; leaves the current setting unchanged.

All updates appear in the Constituent’s Preference Centre History.

⚠️Important:
The Donorfy API is a Professional only feature. Essential subscribers, please contact us to find out more about upgrading.

Did this answer your question?