Skip to content
campaiDeveloper
campai.com

Donation ยท Donations

GET/{organizationId}/{mandateId}/donation/donation-countersReads only

Get donation counters

Returns the amount in cents and the number of donors of the donations dated from the first of this month until today, and the same figures for the same days of the previous month. Revoked donations are left out

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
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/donation-counters' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • amountThisMonthnumber

    at least 0

  • donatorsThisMonthinteger

    at least 0

  • previousMonthAmountnumber

    at least 0

  • previousMonthDonatorsinteger

    at least 0

Response200
{
  "amountThisMonth": 0,
  "donatorsThisMonth": 0,
  "previousMonthAmount": 0,
  "previousMonthDonators": 0
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.