API reference · Donations
Claim a donation
POST/v1/donations/{donationId}/claim
Link a donation with a given Charity.
Requires a Bearer access token.
Parameters
This field has no description in the spec.
donationId#stringin pathrequired
Body
ClaimDonationDto1 of 3 fields has no description in the spec.
charityId#stringrequiredUUIDId of the Charity to which the donation will be made.
amount#integer (int64)minimum 1Donation amount in minor currency unit i.e cents if not provided on creation.
lead#LeadInfo6 child fields
fullnamestringcompanyNamestringemailstringemail addressphonestringcustomstringhasAcceptedTermsbooleanrequired
Response
200 · DonationNo field is described in the spec.
donationId#stringalways returnedamount#integer (int64)externalId#stringuniqueExternalId#stringstatus#DonationStatusalways returnedPENDINGDONEPROCESSEDCANCELEDsecret#stringalways returnedwithFiscalReceipt#booleanalways returnedhasBeenCharged#booleanalways returnedclaimedAt#string (date-time)validatedAt#string (date-time)processedAt#string (date-time)billingStatus#BillingStatusalways returnedPENDINGBILLEDPAIDhideAmount#booleanalways returnedbilledOn#DonationBilledOnalways returnedCREATIONCLAIMautoAssigned#booleanexpiryDate#string (date-time)sendingMode#CampaignSendingModealways returnedMANUALEMAILPHYSICALSLACKPOSTALsendingDate#string (date-time)sendingStatus#DonationSendingStatusalways returnedPENDINGFAILEDDONEexternalSendingId#stringlastReminderId#stringmessage#stringreminderMessage#stringfrom#stringlanguage#Languagealways returnedfrenptoType#PaidTimeOffTypealways returnedNONEPAID_TIME_OFFWORKING_TIME_REDUCTIONaccountId#stringalways returnedcampaignId#stringalways returnedcharityId#stringrecurringDonationId#stringtransactionId#stringdonorId#stringorderPlatformUserId#stringusageId#stringparentDonationId#stringparentVoteId#stringparentRecurringDonationId#stringcreatedAt#string (date-time)always returnedupdatedAt#string (date-time)always returned
Errors
- 400 Bad Request
Lead is required
{ "statusCode": 400, "message": "Lead is required", "error": "Bad Request" }Lead has to accept terms and conditions
{ "statusCode": 400, "message": "Lead has to accept terms and conditions", "error": "Bad Request" }Invalid lead information
{ "statusCode": 400, "message": "Invalid lead information", "error": "Bad Request" }Lead collection is not enabled for this campaign
{ "statusCode": 400, "message": "Lead collection is not enabled for this campaign", "error": "Bad Request" }A field is missing, has the wrong type, or is not part of the request schema.
Every request with a body or query is validated.
{ "statusCode": 400, "message": [ "amount must not be less than 1", "property foo should not exist" ], "error": "Bad Request" }- 401 Unauthorized
Unauthorized
Missing, expired or invalid access token.
{ "statusCode": 401, "message": "Unauthorized" }- 403 Forbidden
Campaign has ended.
{ "statusCode": 403, "message": "Campaign has ended.", "error": "Forbidden" }Account not validated
{ "statusCode": 403, "message": "Account not validated", "error": "Forbidden" }Account closed
{ "message": "Account closed", "code": "ACCOUNT_CLOSED" }Forbidden
Your credentials cannot perform this action on this resource. An id from another account answers 404 in the path, 400 in the body or the query.
{ "statusCode": 403, "message": "Forbidden" }- 404 Not Found
Not Found
No resource with this id on your account: the API answers as if it did not exist.
{ "statusCode": 404, "message": "Not Found" }- 409 Conflict
Donation already claimed
{ "statusCode": 409, "message": "Donation already claimed", "error": "Conflict" }
curl -X POST https://api.sandbox.charitips.com/v1/donations/<donationId>/claim \ -H "Authorization: Bearer $CHARITIPS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "charityId": "<charityId>" }'Request bodies are written for this docs and checked against the API's validation; ids in angle brackets are placeholders. Response values are placeholders built from the schema.