Skip to content
campaiDeveloper
campai.com

Donation · Donations

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

Create donations from transactions

Records incoming cash transactions as donations, booking unassigned transactions on the given account or taking over their existing uncommitted posting

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.insert
  • posting.insert
  • cashTransaction.edit

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired

Body

Content-Type: application/json

  • accountintegerrequired

    1–999999999

  • campaignidrequirednullable
  • confirmationStatusstringrequired
    pending notRequired
  • itemsobject[]required

    1–100 items

    4 properties
    • cashTransactionIdidrequired
    • postingIdidrequirednullable
    • donatorAccountintegerrequirednullable

      1–999999999

    • donatorNamestringrequired

      1–81 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/createDonationsFromCashTransactions' \
  --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

  • createdCountinteger

    at least 0

  • failuresobject[]
    2 properties
    • cashTransactionIdid
    • messagestring
Response200
{
  "createdCount": 0,
  "failures": [
    {
      "cashTransactionId": "000000000000000000000001",
      "message": "string"
    }
  ]
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.