Skip to content
campaiDeveloper
campai.com

Donation · Forms · Submissions

POST/{organizationId}/{mandateId}/donation/forms/submissions/{donationFormSubmissionId}/accept

Accept donation form submission

Accepts a recurring donation waiting for a decision: creates the contract on its plan with the chosen amount for a new contact or the given existing one, whose debtor takes over the payment method of the submission

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
  • donationFormSubmission.edit
  • contract.insert
  • plan.read
  • debtor.insert
Also checked, depending on the request and the records it touches
  • ` { [contact:${form.contactType}]: contactId ? { edit: true } : { insert: true } } `

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired
  • donationFormSubmissionIdidrequired

Body

Content-Type: application/json

  • contactIdid
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/forms/submissions/YOUR_DONATION_FORM_SUBMISSION_ID/accept' \
  --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

  • contactIdid
  • contractIdid
Response200
{
  "contactId": "000000000000000000000001",
  "contractId": "000000000000000000000001"
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.