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

Masjid key · Donation campaigns: read

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 · query

    First day, YYYY-MM-DD, in the account's time zone; absent: all time.

  • tostring · YYYY-MM-DD · query

    Last day, YYYY-MM-DD, in the account's time zone; absent: today.

  • groupByhour | day | week | month | year · query

    The period of series (hour: seven days at most); absent: day.

Returns

The figures.

  • objectdonation_stats

    Always donation_stats.

  • currencystring | null

    ISO 4217: every amount here is in it.

  • timezonestring

    The time zone the days are read and grouped in.

  • groupBystring

    The period of series.

  • summaryobject

    Totals over the range.

    Show child attributes (8)
    • totalCollectednumber

      Collected, in minor units.

    • totalDonationsnumber

      Succeeded donations.

    • averageDonationnumber

      Average donation, in minor units.

    • activeSubscriptionsnumber

      Recurring donations running now.

    • normalizedMonthlyRecurringnumber

      Recurring donations, per month, in minor units.

    • giftAidReclaimablenumber

      Gift Aid to reclaim, in minor units.

    • giftAidCountnumber

      Donations a Gift Aid declaration covers.

    • receiptCountnumber

      Fiscal receipts issued.

  • seriesobject[]

    One entry per period of the range.

    Show child attributes (3)
    • datestring

      The period.

    • amountnumber

      Collected, in minor units.

    • countnumber

      Succeeded donations.

  • bySourceobject

    Per source: web, terminal, application, one, widget, pages.

  • byTypeobject

    One-off against recurring.

    Show child attributes (6)
    • oneTimeobject

      One-off donations.

    • oneTime.amountnumber

      Collected, in minor units.

    • oneTime.countnumber

      Succeeded donations.

    • recurringobject

      Payments of recurring donations.

    • recurring.amountnumber

      Collected, in minor units.

    • recurring.countnumber

      Succeeded donations.

  • byCampaignobject[]

    Every campaign of the account.

    Show child attributes (4)
    • campaignstring

      The campaign id.

    • titlestring | null

      Its title.

    • amountnumber

      Collected, in minor units.

    • countnumber

      Succeeded donations.

  • byTerminalobject[]

    Every card reader of the account.

    Show child attributes (4)
    • terminalstring

      The card reader id.

    • namestring | null

      Its name.

    • amountnumber

      Collected, in minor units.

    • countnumber

      Succeeded donations.

GET /v1/masjid/stats/donations
curl "https://hub.masjidbox.com/v1/masjid/stats/donations" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidDonationStats
{
  "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"
}