Your masjid · Donation campaigns
Your donation figures
What your organization collected over a range of days: totals, a series per period, and the split per source, campaign and card reader.
Right on the key: Donation campaigns: read for a read, edit (secret key) for a write.
Your donation figures
GET/v1/masjid/stats/donations
What your organization collected over a range of days (from, to, read in your account's time zone; all time by default): totals, a series per groupBy period, and the split per source, one-off against recurring, per campaign and per card reader. Amounts in minor units. Needs Donation campaigns: read.
Parameters
fromstring · YYYY-MM-DD · queryFirst day,
YYYY-MM-DD, in the account's time zone; absent: all time.tostring · YYYY-MM-DD · queryLast day,
YYYY-MM-DD, in the account's time zone; absent: today.groupByhour | day | week | month | year · queryThe period of
series(hour: seven days at most); absent:day.
Returns
The figures.
objectdonation_statsAlways
donation_stats.currencystring | nullISO 4217: every amount here is in it.
timezonestringThe time zone the days are read and grouped in.
groupBystringThe period of
series.summaryobjectTotals over the range.
Show child attributes (8)
totalCollectednumberCollected, in minor units.
totalDonationsnumberSucceeded donations.
averageDonationnumberAverage donation, in minor units.
activeSubscriptionsnumberRecurring donations running now.
normalizedMonthlyRecurringnumberRecurring donations, per month, in minor units.
giftAidReclaimablenumberGift Aid to reclaim, in minor units.
giftAidCountnumberDonations a Gift Aid declaration covers.
receiptCountnumberFiscal receipts issued.
seriesobject[]One entry per period of the range.
Show child attributes (3)
datestringThe period.
amountnumberCollected, in minor units.
countnumberSucceeded donations.
bySourceobjectPer source:
web,terminal,application,one,widget,pages.byTypeobjectOne-off against recurring.
Show child attributes (6)
oneTimeobjectOne-off donations.
oneTime.amountnumberCollected, in minor units.
oneTime.countnumberSucceeded donations.
recurringobjectPayments of recurring donations.
recurring.amountnumberCollected, in minor units.
recurring.countnumberSucceeded donations.
byCampaignobject[]Every campaign of the account.
Show child attributes (4)
campaignstringThe campaign id.
titlestring | nullIts title.
amountnumberCollected, in minor units.
countnumberSucceeded donations.
byTerminalobject[]Every card reader of the account.
Show child attributes (4)
terminalstringThe card reader id.
namestring | nullIts name.
amountnumberCollected, in minor units.
countnumberSucceeded donations.
Errors
curl "https://hub.masjidbox.com/v1/masjid/stats/donations" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"byCampaign": [
{
"amount": 3000,
"campaign": "cmp_6af5c9e2bc095fbd2dc5735b",
"count": 2,
"title": "Ramadan Appeal"
}
],
"bySource": {
"terminal": {
"amount": 1500,
"count": 1
},
"web": {
"amount": 3000,
"count": 2
}
},
"byTerminal": [
{
"amount": 1500,
"count": 1,
"name": "Entrance",
"terminal": "trm_6af5c9e2bc095fbd2dc5735f"
}
],
"byType": {
"oneTime": {
"amount": 1500,
"count": 1
},
"recurring": {
"amount": 3000,
"count": 2
}
},
"currency": "GBP",
"groupBy": "day",
"object": "donation_stats",
"series": [
{
"amount": 4500,
"count": 3,
"date": "2026-11-01"
}
],
"summary": {
"activeSubscriptions": 2,
"averageDonation": 1500,
"giftAidCount": 1,
"giftAidReclaimable": 250,
"normalizedMonthlyRecurring": 3000,
"receiptCount": 0,
"totalCollected": 4500,
"totalDonations": 3
},
"timezone": "Europe/London"
}