π¨ Marketing Preferences
On the Donations & Fundraising Platform a Marketing Permission statement can be set for donors and fundraisers to provide their marketing preferences. This can include opting in or out of being contacted by email, post, text or phone.
The following table contains the fields that are returned within the response call of the marketing preferences endpoint.
Key | Label | Type | Description |
---|---|---|---|
allowedToContact | Allowed To Contact | Boolean | Response from user whether they can be contacted. |
answeredAt | Answered At | Date | Date that marketing preferences were completed |
charityAccountGuid | Charity Account Guid | UUID | Charity Account GUID |
charityId | Charity Id | Long | Charity Id |
emailOptIn | Email Opt In | Boolean | Has user opted in for contact via email |
permissionStatement | Permission Statement | String | Statement sent to user asking for permission to contact |
phoneOptIn | Phone Opt In | Boolean | Has user opted in for contact via phone |
postOptIn | Post Opt In | Boolean | Has user opted in for contact via post |
smsOptIn | SMS Opt In | Boolean | Has user opted in for contact via SMS |
supporterId | Supporter Id | Long | Supporter Id |
π Search Marketing Preferences
/marketingPreferences
Get a list of marketing preferences filterable by the attributes below:
Key | Label | Type | Description |
---|---|---|---|
campaign_guids | Campaign Guids | Array[string] | Campaign GUID associated with the marketing preferences object |
event_ids | Event Ids | Array[Long] | Event Ids associated with the marketing preferences object |
date_from | Date From | String | Date from which to filter based on the answer date of the supporter |
date_to | Date To | String | Date to filter to based on the answer date of the supporter |
limit | Limit | Integer | Number of records to be returned in the response |
page | Page | Integer | The number of pages to skip before starting to collect the result set |
ReminderYou can only use either Campaign Guids or Event Ids but not both at the same time
Sample Request
GET - http://dataapi.enthuse.com/marketingPreferences?access_token=rR5_kQN_TVZMwqz4tyc8vzJ0ltc
&campaign_guids=00000000-0000-0000-0000-000000000000
&date_from=2020-02-25%2000%3A00%3A00
&date_to=2020-03-01%2000%3A00%3A00
&limit=25
&page=1
Sample Responses:
200 - OK call was successful and returned data
{
"allowedToContact": true,
"answeredAt": "2020-01-01 00:00:00",
"charityAccountGuid": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"charityId": 7236487,
"emailOptIn": true,
"permissionStatement": "string",
"phoneOptIn": true,
"postOptIn": true,
"smsOptIn": true,
"supporterId": 7236487
}
401 - Access token has expired or is incorrect
{
"message": "Unauthorized.",
"status": 401
}
403 - The account linked to the token does not match the account of the records attempting to retrieve
{
"message": "Forbidden.",
"status": 403
}
404 - Call authenticated but no records match the searched criteria
{
"message": "No records found.",
"status": 404
}
416 - Call authenticated but both eventId and campaignGuid used together
{
"message": "eventId and campaignGuid cannot be used in unison",
"status": 416
}
500 - Error occurred within Service, data could not be returned
{
"message": "Internal Server Error.",
"status": 500
}
π Get Marketing Preferences from a Supporter ID
/marketingPreferences/{supporter_id}
Get a marketing preferences object from a known Supporter ID filterable by the attribute below
Key | Label | Type | Description |
---|---|---|---|
supporterId | Supporter Id | Long | Supporter Id |
Sample Request
GET - http://dataapi.enthuse.com/marketingPreferences/123?access_token=rR5_kQN_TVZMwqz4tyc8vzJ0ltc
Sample Responses:
200 - OK call was successful and returned data
{
"allowedToContact": true,
"answeredAt": "2020-01-01 00:00:00",
"charityAccountGuid": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"charityId": 7236487,
"emailOptIn": true,
"permissionStatement": "string",
"phoneOptIn": true,
"postOptIn": true,
"smsOptIn": true,
"supporterId": 7236487
}
401 - Access token has expired or is incorrect
{
"message": "Unauthorized.",
"status": 401
}
403 - The account linked to the token does not match the account of the records attempting to retrieve
{
"message": "Forbidden.",
"status": 403
}
404 - Call authenticated but no records match the searched criteria
{
"message": "No records found.",
"status": 404
}
500 - Error occurred within Service, data could not be returned
{
"message": "Internal Server Error.",
"status": 500
}
Updated about 2 months ago