Skip to content
campaiDeveloper
campai.com

Donation · Donations

POST/{organizationId}/{mandateId}/donation/donations/getDonationConfirmationPreviewReads only

Get donation confirmation preview

Returns a preview of the confirmation or thank-you letter for the first donator of a confirmation run with the given texts, i.e. before creating the confirmations of the filtered pending donations. Sample data is used when no donator of the run gets this kind of document

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

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

  • thankYoubooleanrequired
  • textsobjectrequired
    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/getDonationConfirmationPreview' \
  --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

  • documentstring
  • pagesinteger

    at least 0

  • donatorNamestring

    1–81 characters

  • sampleboolean
  • subjectstring
  • messagestring
Response200
{
  "document": "string",
  "pages": 0,
  "donatorName": "string",
  "sample": true,
  "subject": "string",
  "message": "string"
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.