This article provides information about working with Activities via the API.
Note if you want to add activities that are linked to recurring payment instructions you should use the https://data.donorfy.com/api/v1/<apikey>/rpis/<rpiid>/AddActivity endpoint - you can then use the endpoints described below to perform further work with activities add by that endpoint.
The constituent activities endpoint allows you to retrieve all activities for a constituent - e.g. https://data.donorfy.com/api/v1/<apikey>/constituents/<constituentid>/Activities
You can work with individual activities as follows
- Activities can be added by a post request to the https://data.donorfy.com/api/v1/<apikey>/Activities end point - you
- Must pass a valid Activity type with the request
- Can link a new activity to an existing constituent by providing a valid constituent id in the ExistingConstituentId property - if you pass any constituent information e.g. last name it will be ignored if the ExistingConstituentId has a value - you will need to perform a separate call to the API to update a constituent
- Can create a new constituent and activity at the same time by providing a constituent type plus any other name or contact information you have for the new constituent
- If you do not pass in an ActivityDate the current system date will be used
- Existing activities can be
- retrieved via a get request to the https://data.donorfy.com/api/v1/<apikey>/Activities/<activity id>/ endpoint
- updated via a put request to the https://data.donorfy.com/api/v1/<apikey>/Activities/<activity id>/ endpoint
- deleted via a put request to the https://data.donorfy.com/api/v1/<apikey>/Activities/<activity id>/ endpoint
When adding an activity you can add a task linked to the activity to do this you must pass in value at least one of the following TaskDetails, TaskAssignedToEmail, TaskDueDate or TaskCompleted, note that
- The TaskAssignedToEmail must be the email address of an existing user to whom the task notification will be sent
- If TaskCompleted is true then the task completed date will be set to the current system date
- If TaskSendNotification is true and your Donorfy is connected to your email server then a task notification email will be sent to the TaskAssignedToEmail address. If sending the email fails the activity and task will still be added and the message returned will include any error message we received when trying to send the email
The Donorfy API is a Professional-only feature. Essential subscribers, please contact us to find out more about upgrading.