This article provides information about working with Gift Aid Declarations via the API.
You can work with Gift Aid Declarations as follows
- Gift Aid Declarations can be added via a post request to the https://data.donorfy.com/api/v1/<apikey>/constituents/{constituentid}/GiftAidDeclarations endpoint - a new gift aid declaration will be added to the constituent identified by {constituentId} - the body of your request must include
- A valid Declaration Method
- Declaration date, declaration state and end dates
- Tax payer first and last names - which can be up to 35 characters long
- If you pass a campaign or department it must be valid
- Gift Aid Declarations for a constituent can be retrieved via a get request to the https://data.donorfy.com/api/v1/<apikey>/constituents/{constituentid}/GiftAidDeclarations endpoint - a list of gift aid declarations will be returned - you can restrict the list of declarations returned by passing a range of start and end dates - e.g. https://data.donorfy.com/api/v1/<apikey>/constituents/{constituentid}/GiftAidDeclarations?decStartDate=2010-01-01&decEndDate=2018-01-01
- Gift Aid Declarations can be updated via a put request to https://data.donorfy.com/api/v1/<apikey>/constituents/{constituentid}/GiftAidDeclarations
- Gift Aid Declarations can be cancelled via a post request to https://data.donorfy.com/api/v1/<apikey>/constituents/{constituentid}/GiftAidDeclarations/<giftaiddeclarationid>/Cancel - this will set the cancellation date of the gift aid declaration to current system date and mark the declaration as cancelled
The Donorfy API is a Professional-only feature. Essential subscribers, please contact us to find out more about upgrading.
Comments