Donation
Get donation settings
Gets donation settings for the organization identified by organizationId. Returns the organization's donation settings, including confirmation and country settings.
Permissions
Send an API key of the organization in the path, using the X-API-Key header.
Who may call it
- The caller must have organization access.
- The caller needs the
donationsSettings.readpermission.
Request
Path parameters
-
organizationIdidrequired
Query parameters
-
modifiedBeforestring · date-time -
modifiedAfterstring · date-time
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
--request GET 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/donation/settings' \
--header 'X-API-Key: YOUR_API_KEY'const response = await fetch("https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/donation/settings", {
method: "GET",
headers: {
"X-API-Key": "YOUR_API_KEY"
},
redirect: 'error',
signal: AbortSignal.timeout(30_000),
});
if (!response.ok) throw new Error(`campai HTTP ${response.status}`);
const text = await response.text();
const result = text ? JSON.parse(text) : null;
console.log(JSON.stringify(result, null, 2));<?php
$context = stream_context_create(['http' => [
'method' => 'GET',
'header' => [
'X-API-Key: YOUR_API_KEY',
],
'timeout' => 30,
'follow_location' => 0,
'ignore_errors' => true,
]]);
$text = @file_get_contents('https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/donation/settings', false, $context);
preg_match('/^HTTP\/\S+ (\d{3})/', $http_response_header[0] ?? '', $match);
$status = (int) ($match[1] ?? 0);
if ($text === false || $status < 200 || $status >= 300) {
throw new RuntimeException("campai HTTP $status (0 means no response)");
}
$result = $text === '' ? null : json_decode($text, true, 512, JSON_THROW_ON_ERROR);
echo json_encode($result, JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR), PHP_EOL;
Response
200 Successful response
Content-Type: application/json
-
membershipFeesboolean -
invoiceDonationAccountsinteger[]each 1–999999999
-
numberStartinteger1–99999999
-
overpaymentDonationsboolean -
countrySettingsobject5 properties
-
deobject6 properties
-
signaturestringat most 30000 characters
-
purposestringat most 300 characters
-
onlineGeneratedMessagestring1–400 characters
-
requireAddressAboveAmountnumberat least 0
-
exemptionNoticeobjectnullable2 properties
-
fromstring -
assessmentPeriodstring
-
-
determinationNoticeobjectnullable1 property
-
fromstring
-
-
-
luobject6 properties
-
signaturestringat most 30000 characters
-
purposestringat most 300 characters
-
onlineGeneratedMessagestring1–400 characters
-
requireAddressAboveAmountnumberat least 0
-
exemptionNoticeobjectnullable2 properties
-
fromstring -
assessmentPeriodstring
-
-
determinationNoticeobjectnullable1 property
-
fromstring
-
-
-
chobject6 properties
-
signaturestringat most 30000 characters
-
purposestringat most 300 characters
-
onlineGeneratedMessagestring1–400 characters
-
requireAddressAboveAmountnumberat least 0
-
exemptionNoticeobjectnullable2 properties
-
fromstring -
assessmentPeriodstring
-
-
determinationNoticeobjectnullable1 property
-
fromstring
-
-
-
atobject3 properties
-
fastNrOrgnumbernullableat most 999999999
-
bankParticipantIdstringat most 50 characters
-
orgTypestringnullable24 values
ASBIFFFWGMKKKRMÖMPNTÖKÖSPAPKPSSESGSNSOSPSVUNZGZI
-
-
usany
-
-
confirmationobject9 properties
-
enabledboolean -
sendboolean -
templateid -
useDocumentOnlyForLettersboolean -
documentContentstringat most 4000 characters
-
fileNamePrefixstring1–40 characters
-
subjectstring1–998 characters
-
messagestring1–10000 characters
-
thankYouobject6 properties
-
thresholdintegernullableat most 9999999999
-
onlyThankYouLettersboolean -
documentContentstringat most 4000 characters
-
fileNamePrefixstring1–40 characters
-
subjectstring1–998 characters
-
messagestring1–10000 characters
-
-
{
"membershipFees": true,
"invoiceDonationAccounts": [
1
],
"numberStart": 1,
"overpaymentDonations": true,
"countrySettings": {
"de": {
"signature": "string",
"purpose": "string",
"onlineGeneratedMessage": "string",
"requireAddressAboveAmount": 0,
"exemptionNotice": {
"from": "string",
"assessmentPeriod": "string"
},
"determinationNotice": {
"from": "string"
}
},
"lu": {
"signature": "string",
"purpose": "string",
"onlineGeneratedMessage": "string",
"requireAddressAboveAmount": 0,
"exemptionNotice": {
"from": "string",
"assessmentPeriod": "string"
},
"determinationNotice": {
"from": "string"
}
},
"ch": {
"signature": "string",
"purpose": "string",
"onlineGeneratedMessage": "string",
"requireAddressAboveAmount": 0,
"exemptionNotice": {
"from": "string",
"assessmentPeriod": "string"
},
"determinationNotice": {
"from": "string"
}
}
},
"confirmation": {
"enabled": true,
"send": true,
"template": "000000000000000000000001",
"useDocumentOnlyForLetters": true,
"documentContent": "string",
"fileNamePrefix": "string",
"subject": "string",
"message": "string",
"thankYou": {
"threshold": 1,
"onlyThankYouLetters": true,
"documentContent": "string",
"fileNamePrefix": "string",
"subject": "string",
"message": "string"
}
}
}
Errors
Other errors
| Status | Error | When |
|---|---|---|
| 404 | Donations settings are missing | If donation settings are missing, the endpoint returns HTTP 404 NOT_FOUND with message key donation.settings.getDonationsSettings.notFound. |
Errors nearly every request can meet are listed under Errors.