Skip to content
campaiDeveloper
campai.com

Donation · Donations

POST/{organizationId}/{mandateId}/donation/donations/createDonationConfirmations

Create donation confirmations

Creates confirmations for pending donations of a given mandate. Pending donations of the same donator are combined into one collective confirmation per calendar year, donators below the thank-you threshold can get a thank-you letter instead. Donations which can not be confirmed, e.g. because of a missing address, are returned with the reason instead of being confirmed. The texts of the settings can be replaced for one run and confirmations can be sent as letters instead of emails

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.edit

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired

Body

Content-Type: application/json

  • searchTermstring
  • selectionobject
    2 properties
    • excludeIdsid[]

      1–1000 items

    • idsid[]

      1–1000 items

  • austrianReportingStatusstring
    notReported processing reported changed error notReportable
  • donatorAccountinteger

    1–999999999

  • campaignid
  • periodobject
    2 properties
    • fromstring · date-timerequired
    • tostring · date-timerequired
  • sendConfirmationbooleanrequired
  • useThankYouLettersbooleanrequired
  • sendAsLettersboolean

    default false

  • textsobject
    2 properties
    • confirmationobjectrequired
      3 properties
      • documentContentstringrequired

        at most 4000 characters

      • subjectstringrequired

        1–998 characters

      • messagestringrequired

        1–10000 characters

    • thankYouobjectrequired
      3 properties
      • documentContentstringrequired

        at most 4000 characters

      • subjectstringrequired

        1–998 characters

      • messagestringrequired

        1–10000 characters

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

No request that worked has been recorded yet, so the body is not shown.

Response

200 Successful response

Content-Type: application/json

  • confirmationCountinteger

    at least 0

  • failuresobject[]
    3 properties
    • donationNumbersstring[]

      each at least 1 characters

    • donatorNamestring

      1–81 characters

    • messagestring
Response200
{
  "confirmationCount": 0,
  "failures": [
    {
      "donationNumbers": [
        "string"
      ],
      "donatorName": "string",
      "message": "string"
    }
  ]
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.