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 Fund object
The FundResource serves as the foundational entity in fundraising, allowing to create named fundraising buckets with optional financial targets and deadlines. Each fund can track its progress towards a specific monetary goal by a target date, while the optional externalId enables seamless integration with external systems or third-party fundraising platforms.
Required attributes
- Name
_id- Type
- string
- Description
The ID of the Fund
- Name
name- Type
- string
- Description
The name of the fund
- Name
sellerId- Type
- string
- Description
The ID of the seller owning the fund
- Name
createdAt- Type
- string
- Description
An ISO timestamp indicating when the fund was created.
- Name
updatedAt- Type
- string
- Description
An ISO timestamp indicating when the fund was created.
Optional attributes
- Name
target- Type
- object
- Description
The target (goal) amount and date of the fund
Optional nested attributes (2)
- Name
amount- Type
- number
- Description
The target amount of the fund
- Name
date- Type
- string
- Description
An ISO timestamp indicating when the fund is planned to reach the goal (amount).
- Name
externalId- Type
- string
- Description
The external ID of the fund
Example
{
"_id": "507f191e810c19729de860ea",
"name": "Example Name",
"sellerId": "507f191e810c19729de860ea",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z",
"target": {
"amount": 10.5,
"date": "2030-01-23T23:00:00.123Z"
},
"externalId": "507f191e810c19729de860ea"
}Create a Fund
Create a Fund
Payload
Required attributes
- Name
name- Type
- string
- Description
The name of the fund
Optional attributes
- Name
target- Type
- object
- Description
The target (goal) amount and date of the fund
Optional nested attributes (2)
- Name
amount- Type
- number
- Description
The target amount of the fund
- Name
date- Type
- string
- Description
An ISO timestamp indicating when the fund is planned to reach the goal (amount).
- Name
externalId- Type
- string
- Description
The external ID of the fund
Request
const response = await fetch('https://vivenu.com/api/fundraise/funds', {
method: 'POST',
headers: {
Authorization: 'Bearer {token}',
'Content-Type': 'application/json',
},
body: JSON.stringify( {
"name": "Example Name",
"target": {
"amount": 10.5,
"date": "2030-01-23T23:00:00.123Z"
},
"externalId": "507f191e810c19729de860ea"
}),
})
const data = await response.json()Response (201)
{
"_id": "507f191e810c19729de860ea",
"name": "Example Name",
"sellerId": "507f191e810c19729de860ea",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z",
"target": {
"amount": 10.5,
"date": "2030-01-23T23:00:00.123Z"
},
"externalId": "507f191e810c19729de860ea"
}Update a Fund
Update a Fund
Payload
Optional attributes
- Name
name- Type
- string
- Description
The name of the fund
- Name
target- Type
- object
- Description
The target (goal) amount and date of the fund
Optional nested attributes (2)
- Name
amount- Type
- number
- Description
The target amount of the fund
- Name
date- Type
- string
- Description
An ISO timestamp indicating when the fund is planned to reach the goal (amount).
- Name
externalId- Type
- string
- Description
The external ID of the fund
Request
const response = await fetch('https://vivenu.com/api/fundraise/funds/507f191e810c19729de860ea', {
method: 'PUT',
headers: {
Authorization: 'Bearer {token}',
'Content-Type': 'application/json',
},
body: JSON.stringify( {
"name": "Example Name",
"target": {
"amount": 10.5,
"date": "2030-01-23T23:00:00.123Z"
},
"externalId": "507f191e810c19729de860ea"
}),
})
const data = await response.json()Response (200)
{
"_id": "507f191e810c19729de860ea",
"name": "Example Name",
"sellerId": "507f191e810c19729de860ea",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z",
"target": {
"amount": 10.5,
"date": "2030-01-23T23:00:00.123Z"
},
"externalId": "507f191e810c19729de860ea"
}Get a Fund
Get a Fund
Request
const response = await fetch('https://vivenu.com/api/fundraise/funds/507f191e810c19729de860ea', {
method: 'GET',
headers: {
Authorization: 'Bearer {token}',
},
})
const data = await response.json()Response (200)
{
"_id": "507f191e810c19729de860ea",
"name": "Example Name",
"sellerId": "507f191e810c19729de860ea",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z",
"target": {
"amount": 10.5,
"date": "2030-01-23T23:00:00.123Z"
},
"externalId": "507f191e810c19729de860ea"
}Get All Funds
Get All Funds
Query parameters
Required query parameters
- Name
top- Type
- integer
- Description
A limit on the number of objects to be returned. Can range between 1 and 1000.
- Name
skip- Type
- integer
- Description
The number of objects to skip for the requested result
Optional query parameters
- Name
_id- Type
- string
- Description
The ID of the fund to search for
- Name
name- Type
- string
- Description
The name of the fund to search for
- Name
externalId- Type
- string
- Description
The external ID of the fund to search for
Request
const response = await fetch('https://vivenu.com/api/fundraise/funds?top=1&skip=1&_id=507f191e810c19729de860ea&name=Example+Name&externalId=507f191e810c19729de860ea', {
method: 'GET',
headers: {
Authorization: 'Bearer {token}',
},
})
const data = await response.json()Response (200)
{
"docs": [],
"total": 10.5
}