This article provides information about working with Purpose and Channel Preferences via the API.
The https://data.donorfy.com/api/v1/<apikey>/Constituents/<constituentId>/Preferences endpoint allows to you retrieve or update channel and purposes for a constituent
A get request will return a list of preferences as follows
- PreferenceType - this can be
- Channel - indicating that the preference relates a communication channel - e.g. Email, or
- Purpose - indicating that the preference relates 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
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.