This article provides information about working with Purpose and Channel Preferences via the API.
The Purpose and Channel Preferences endpoint allows to you retrieve or update Channels and Purposes for a constituent
A get request to the endpoint below will return a list of preferences as follows
- PreferenceType - This can be
- Channel - indicating that the preference relates to a communication channel - e.g. Email, or
- Purpose - indicating that the preference relates to a communication purpose - e.g. Fundraising
- PreferenceName is the description of the channel or purpose
- PreferenceAllowed can contain
- true - the preference is permitted
- false - the preference is not permitted
- null - the preference has not been set and is unknown, this will therefore not update the Channel.
Where a constituent has been created via the API the values would have been set to be either true or false, so if no values were passed at the time of creation then the constituent will have been added as not permitted.
A post request can be used to update the preferences - your request can optionally include
- PreferenceDate - the date the preference was updated - if omitted the system date is used
- Campaign - any campaign associated with the update - if provided must be an existing campaign in your Donorfy
- Reason - any reason associated with the update - if provided must be an existing reason in your Donorfy
- ConsentStatement - any consent statement associated with the update - if provided must be an existing consent statement in your Donorfy
- PreferredChannel -
- the Preferred Communication Channel for the constituent
- this can be one of mail, email, phone, sms
- Important - if you assign a Preferred Channel for which the constituent does not have any contact details - e.g. your Preferred Channel is email but the constituent does not have an email address then the preferred channel will be set to Do Not Contact
You must include a list of preferences including PreferenceType, PreferenceName and PreferenceAllowed as described above - if you pass null as PreferenceAllowed then any existing preference will not be changed.
Preference updates will be shown in the preference centre history.
The Donorfy API is a Professional-only feature. Essential subscribers, please contact us to find out more about upgrading.