Skip to content
campaiDeveloper
campai.com

Donation ยท Forms

GET/{organizationId}/{mandateId}/donation/forms/{donationFormId}/statisticsReads only

Get donation form statistics

Returns statistics for a donation form identified by organization, mandate, and donation form IDs. The response includes one-time donation counts, amounts and amounts paid, plus approved recurring donation counts and yearly amounts.

Permissions

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

Who may call it

  • Organization access is required.
  • The caller needs mandate.read.
  • The caller needs donationForm.read.

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired
  • donationFormIdidrequired
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/forms/YOUR_DONATION_FORM_ID/statistics' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • oneTimeCountinteger

    at least 0

  • oneTimeAmountinteger

    at least 0

  • oneTimePaidAmountinteger

    at least 0

  • recurringCountinteger

    at least 0

  • recurringYearlyAmountinteger

    at least 0

Response200
{
  "oneTimeCount": 0,
  "oneTimeAmount": 0,
  "oneTimePaidAmount": 0,
  "recurringCount": 0,
  "recurringYearlyAmount": 0
}

Errors

Other errors

StatusErrorWhen
404The donation form was not found.If the donation form is not found, the endpoint returns HTTP 404 with NOT_FOUND and the key routes.donation.forms.formNotFound.

Errors nearly every request can meet are listed under Errors.