Funds
The Fundraise API allows to manage comprehensive fundraising activities by handling funds (base entity for collecting money), campaigns (targeted fundraising initiatives tied to specific funds), pledges (promises for future donations), and actual donations. Create and track multiple fundraising campaigns simultaneously, each connected to one or more funds, while managing incoming donations and pledges.
The Pledge object
A pledge represents a promised future donation to a fund, tracking the committed amount and optional target date for fulfillment, with the applications array recording when and how much of the pledge has been fulfilled through actual donations. Other than donations, pledges applications will only be set when a donation is created that fulfills the pledge. The applications will be handled automatically and are not allowed to be set by payload.
Required attributes
- Name
_id- Type
- string
- Description
The ID of the Pledge
- Name
amount- Type
- number
- Description
The amount of the pledge
- Name
currency- Type
- enum(EUR, USD, GBP, AUD, CHF, THB, ILS, COP, MXN, DKK, NOK, SEK, QAR, CAD, ISK, GTQ, INR, DOP, SGD, PLN, SAR, TTD, ZAR, KYD, HKD, CZK, KRW, JPY, NZD, AED, MAD, TWD, BRL, BWP, NAD, KES, SCR, TRY, SZL, LSL, TZS, UGX, ZMW, ZWG, GHS, NGN, SLE, LRD, XOF, XAF, GEL, IDR, ARS, CRC, HUF, EGP, MYR, VND, PHP)
- Description
The currency of the pledge (will be automatically set using the seller's currency)
- Name
customerId- Type
- string
- Description
The ID of the customer of the pledge
- Name
fundId- Type
- string
- Description
The ID of the fund of the pledge
- Name
sellerId- Type
- string
- Description
The ID of the seller owning the pledge
- Name
createdAt- Type
- string
- Description
An ISO timestamp indicating when the pledge was created.
- Name
updatedAt- Type
- string
- Description
An ISO timestamp indicating when the pledge was updated.
Optional attributes
- Name
applications- Type
- array<object>
- Description
An array of donations that have fulfilled this pledge.
Required nested attributes (3)
- Name
donationId- Type
- string
- Description
An ISO timestamp indicating when the application was applied.
- Name
amount- Type
- number
- Description
The amount of the donation that was applied to the pledge.
- Name
appliedAt- Type
- string
- Description
An ISO timestamp indicating when the application was applied.
- Name
campaignId- Type
- string
- Description
The ID of the campaign of the pledge
- Name
salesChannelId- Type
- string
- Description
The ID of the sales channel of the pledge
- Name
notes- Type
- string
- Description
The notes of the pledge
- Name
targetDate- Type
- string
- Description
An ISO timestamp indicating when the pledge is planned to be fulfilled.
- Name
externalId- Type
- string
- Description
The external ID of the pledge
- Name
pledgedAt- Type
- string
- Description
An ISO timestamp indicating when the pledge was pledged. (esp. helpful for pledges from external integrations)
Example
{
"_id": "507f191e810c19729de860ea",
"amount": 10.5,
"currency": "EUR",
"customerId": "507f191e810c19729de860ea",
"fundId": "507f191e810c19729de860ea",
"sellerId": "507f191e810c19729de860ea",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z",
"applications": [
{
"donationId": "507f191e810c19729de860ea",
"amount": 10.5,
"appliedAt": "2030-01-23T23:00:00.123Z"
}
],
"campaignId": "507f191e810c19729de860ea",
"salesChannelId": "507f191e810c19729de860ea",
"notes": "string",
"targetDate": "2030-01-23T23:00:00.123Z",
"externalId": "507f191e810c19729de860ea",
"pledgedAt": "2030-01-23T23:00:00.123Z"
}Create a Pledge
Create a Pledge
Payload
Required attributes
- Name
amount- Type
- number
- Description
The amount of the pledge
- Name
fundId- Type
- string
- Description
The ID of the fund of the pledge
- Name
customerId- Type
- string
- Description
The ID of the customer of the pledge
Optional attributes
- Name
campaignId- Type
- string
- Description
The ID of the campaign of the pledge
- Name
salesChannelId- Type
- string
- Description
The ID of the sales channel of the pledge
- Name
notes- Type
- string
- Description
The notes of the pledge
- Name
targetDate- Type
- string
- Description
An ISO timestamp indicating when the pledge is planned to be fulfilled.
- Name
externalId- Type
- string
- Description
The external ID of the pledge
- Name
pledgedAt- Type
- string
- Description
An ISO timestamp indicating when the pledge was pledged. (esp. helpful for pledges from external integrations)
Request
const response = await fetch('https://vivenu.com/api/fundraise/pledges', {
method: 'POST',
headers: {
Authorization: 'Bearer {token}',
'Content-Type': 'application/json',
},
body: JSON.stringify( {
"amount": 10.5,
"fundId": "507f191e810c19729de860ea",
"customerId": "507f191e810c19729de860ea",
"campaignId": "507f191e810c19729de860ea",
"salesChannelId": "507f191e810c19729de860ea",
"notes": "string",
"targetDate": "2030-01-23T23:00:00.123Z",
"externalId": "507f191e810c19729de860ea",
"pledgedAt": "2030-01-23T23:00:00.123Z"
}),
})
const data = await response.json()Response (201)
{
"_id": "507f191e810c19729de860ea",
"amount": 10.5,
"currency": "EUR",
"customerId": "507f191e810c19729de860ea",
"fundId": "507f191e810c19729de860ea",
"sellerId": "507f191e810c19729de860ea",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z",
"applications": [
{
"donationId": "507f191e810c19729de860ea",
"amount": 10.5,
"appliedAt": "2030-01-23T23:00:00.123Z"
}
],
"campaignId": "507f191e810c19729de860ea",
"salesChannelId": "507f191e810c19729de860ea",
"notes": "string",
"targetDate": "2030-01-23T23:00:00.123Z",
"externalId": "507f191e810c19729de860ea",
"pledgedAt": "2030-01-23T23:00:00.123Z"
}Get a Pledge
Get a Pledge
Request
const response = await fetch('https://vivenu.com/api/fundraise/pledges/507f191e810c19729de860ea', {
method: 'GET',
headers: {
Authorization: 'Bearer {token}',
},
})
const data = await response.json()Response (200)
{
"_id": "507f191e810c19729de860ea",
"amount": 10.5,
"currency": "EUR",
"customerId": "507f191e810c19729de860ea",
"fundId": "507f191e810c19729de860ea",
"sellerId": "507f191e810c19729de860ea",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z",
"applications": [
{
"donationId": "507f191e810c19729de860ea",
"amount": 10.5,
"appliedAt": "2030-01-23T23:00:00.123Z"
}
],
"campaignId": "507f191e810c19729de860ea",
"salesChannelId": "507f191e810c19729de860ea",
"notes": "string",
"targetDate": "2030-01-23T23:00:00.123Z",
"externalId": "507f191e810c19729de860ea",
"pledgedAt": "2030-01-23T23:00:00.123Z"
}