Skip to content
campaiDeveloper
campai.com

Donation · Donations · Statistics

GET/{organizationId}/{mandateId}/donation/donations/statistics/donationDevelopmentReads only

Get donation development

Returns the donations of a period and of the period of the same length right before it: their value in cents, count and donators, the value per month and donation type, the five largest donators, the donators who only gave in the previous period, the donators who gave for the first time or in both periods, and the value per campaign. Refers to the single positions of the donations and leaves out revoked ones. Also returns the donations waiting for a confirmation

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Permission checks in detail
Required permissions
  • mandate.read
  • donation.read

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired

Query parameters

  • fromDatestringrequired
  • toDatestringrequired
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request GET 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/YOUR_MANDATE_ID/donation/donations/statistics/donationDevelopment' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • summaryobject
    9 properties
    • totalValuenumber

      at least 0

    • donationCountinteger

      at least 0

    • donatorCountinteger

      at least 0

    • previousTotalValuenumber

      at least 0

    • previousDonationCountinteger

      at least 0

    • previousDonatorCountinteger

      at least 0

    • newDonatorCountinteger

      at least 0

    • retainedDonatorCountinteger

      at least 0

    • pendingConfirmationCountinteger

      at least 0

  • monthsobject[]
    8 properties
    • datestring
    • totalValuenumber

      at least 0

    • donationCountinteger

      at least 0

    • cashnumber

      at least 0

    • nonCashnumber

      at least 0

    • membershipFeenumber

      at least 0

    • assetStocknumber

      at least 0

    • refundnumber

      at least 0

  • topDonatorsobject[]
    5 properties
    • keystring
    • namestring
    • accountnumbernullable
    • totalValuenumber

      at least 0

    • donationCountinteger

      at least 0

  • inactiveDonatorCountinteger

    at least 0

  • inactiveDonatorsobject[]
    5 properties
    • keystring
    • namestring
    • accountnumbernullable
    • previousTotalValuenumber

      at least 0

    • lastDonationDatestring
  • campaignsobject[]
    5 properties
    • campaignidnullable
    • namestringnullable

      1–100 characters

    • goalProgressnumbernullable

      at least 0

    • totalValuenumber

      at least 0

    • donationCountinteger

      at least 0

Response200
{
  "summary": {
    "totalValue": 0,
    "donationCount": 0,
    "donatorCount": 0,
    "previousTotalValue": 0,
    "previousDonationCount": 0,
    "previousDonatorCount": 0,
    "newDonatorCount": 0,
    "retainedDonatorCount": 0,
    "pendingConfirmationCount": 0
  },
  "months": [
    {
      "date": "string",
      "totalValue": 0,
      "donationCount": 0,
      "cash": 0,
      "nonCash": 0,
      "membershipFee": 0,
      "assetStock": 0,
      "refund": 0
    }
  ],
  "topDonators": [
    {
      "key": "string",
      "name": "string",
      "account": 1,
      "totalValue": 0,
      "donationCount": 0
    }
  ],
  "inactiveDonatorCount": 0,
  "inactiveDonators": [
    {
      "key": "string",
      "name": "string",
      "account": 1,
      "previousTotalValue": 0,
      "lastDonationDate": "string"
    }
  ],
  "campaigns": [
    {
      "campaign": "000000000000000000000001",
      "name": "string",
      "goalProgress": 0,
      "totalValue": 0,
      "donationCount": 0
    }
  ]
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.