curl --request POST \
--url https://api.example.com/api/church/createdonation/:pastorId \
--header 'Content-Type: application/json' \
--data '
{
"church": "<string>",
"donationName": "<string>",
"donationStatus": {},
"startDate": "<string>",
"endDate": "<string>",
"donationDescription": "<string>",
"bankDetails": {
"bankDetails.accountName": "<string>",
"bankDetails.accountNumber": "<string>",
"bankDetails.bankName": "<string>"
},
"donationSupportContact": {
"donationSupportContact.phone": "<string>",
"donationSupportContact.email": "<string>"
},
"donationMetrics": {
"donationMetrics.targetAmount": 123,
"donationMetrics.minAmount": 123
}
}
'{
"success": true,
"message": "<string>",
"data": {
"data._id": "<string>",
"data.church": {},
"data.donationName": "<string>",
"data.donationStatus": {},
"data.startDate": "<string>",
"data.endDate": "<string>",
"data.donationDescription": "<string>",
"data.bankDetails": {},
"data.donationSupportContact": {},
"data.donationMetrics": {},
"data.donators": [
{}
],
"data.createdAt": "<string>",
"data.updatedAt": "<string>"
}
}Create a new donation campaign for a church. Only pastors can create donations.
curl --request POST \
--url https://api.example.com/api/church/createdonation/:pastorId \
--header 'Content-Type: application/json' \
--data '
{
"church": "<string>",
"donationName": "<string>",
"donationStatus": {},
"startDate": "<string>",
"endDate": "<string>",
"donationDescription": "<string>",
"bankDetails": {
"bankDetails.accountName": "<string>",
"bankDetails.accountNumber": "<string>",
"bankDetails.bankName": "<string>"
},
"donationSupportContact": {
"donationSupportContact.phone": "<string>",
"donationSupportContact.email": "<string>"
},
"donationMetrics": {
"donationMetrics.targetAmount": 123,
"donationMetrics.minAmount": 123
}
}
'{
"success": true,
"message": "<string>",
"data": {
"data._id": "<string>",
"data.church": {},
"data.donationName": "<string>",
"data.donationStatus": {},
"data.startDate": "<string>",
"data.endDate": "<string>",
"data.donationDescription": "<string>",
"data.bankDetails": {},
"data.donationSupportContact": {},
"data.donationMetrics": {},
"data.donators": [
{}
],
"data.createdAt": "<string>",
"data.updatedAt": "<string>"
}
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/SidneyEmeka/church_management_system/llms.txt
Use this file to discover all available pages before exploring further.
pastorPOST /api/church/createdonation/:pastorId
"on" - Donation is active and accepting contributions"off" - Donation is paused"completed" - Donation target has been reachedcurl -X POST "https://api.example.com/api/church/createdonation/60d5ec49f1b2c72b8c8e4f1a" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"church": "60d5ec49f1b2c72b8c8e4f1b",
"donationName": "Building Fund 2026",
"donationStatus": "on",
"startDate": "2026-04-01T00:00:00.000Z",
"endDate": "2026-12-31T23:59:59.000Z",
"donationDescription": "Fundraising for new church building construction",
"bankDetails": {
"accountName": "First Baptist Church",
"accountNumber": "1234567890",
"bankName": "Community Bank"
},
"donationSupportContact": {
"phone": "+1-555-0123",
"email": "[email protected]"
},
"donationMetrics": {
"targetAmount": 500000,
"minAmount": 10
}
}'
{
"success": true,
"message": "Your Building Fund 2026 donation is now open",
"data": {
"_id": "60d5ec49f1b2c72b8c8e4f1c",
"church": {
"_id": "60d5ec49f1b2c72b8c8e4f1b",
"name": "First Baptist Church",
"pastor": "60d5ec49f1b2c72b8c8e4f1a"
},
"donationName": "Building Fund 2026",
"donationStatus": "on",
"startDate": "2026-04-01T00:00:00.000Z",
"endDate": "2026-12-31T23:59:59.000Z",
"donationDescription": "Fundraising for new church building construction",
"bankDetails": {
"accountName": "First Baptist Church",
"accountNumber": "1234567890",
"bankName": "Community Bank"
},
"donationSupportContact": {
"phone": "+1-555-0123",
"email": "[email protected]"
},
"donationMetrics": {
"targetAmount": 500000,
"minAmount": 10,
"totalGotten": 0
},
"donators": [],
"createdAt": "2026-03-07T10:30:00.000Z",
"updatedAt": "2026-03-07T10:30:00.000Z"
}
}
{
"success": false,
"message": "Unable to create donation",
"data": "Donation with this name already exists in this church"
}
{
"success": false,
"message": "Unable to create donation",
"data": "You are not the pastor of this church"
}
{
"success": false,
"message": "Unable to create donation",
"data": "Church with this Id does not exist"
}
{
"success": false,
"message": "Unable to create a donation",
"data": "Error message details"
}
totalGotten field in donationMetrics is automatically initialized to 0