Digicollect API v1 documentation

Donations

A donation is a transaction of funds to a specific collection box.

List all Donations

Get a list of donations for the current site.

GET /v1/donations

The result will be returned as JSON with a donations key. This will be an array with objects containing Donation attributes.

Curl example:

curl -H "X-Api-Key: 12345" https://api.digicollect.nl/v1/donations

Example response body:

{
  "donations": [
    {
      "id": 1,
      "collection_box_id": 82,
      "created_at": "2017-06-30T14:41:48Z",
      "updated_at": "2017-06-30T14:46:25Z",
      "newsletter": false,
      "device_type": "desktop",
      "locale": "nl",
      "amount": "15.0",
      "transaction_costs": "0.4",
      "total_amount": "15.4",
      "invoicenumber": "D20170000027",
      "payment_method": "ideal",
      "payment_status": "paid",
      "transaction_id": "1234567890ABCDEF1234567890ABCDEF",
      "payment_id": "FEDCBA0987654321FEDCBA0987654321",
      "target_url": "https://demo1.digicollect.nl/"
    }
  ],
  "links": {
    "pages": {
      "last": "https://api.digicollect.nl/v1/donations?page=31&per_page=1",
      "next": "https://api.digicollect.nl/v1/donations?page=2&per_page=1"
    }
  },
  "total_entries": 31,
  "total_pages": 31,
  "per_page": 1,
  "current_page": 1
}

Retrieve a single Donation

Retrieve a single donation for the current site. Donations can be queried by ID.

GET /v1/donations/1

The result will be returned as JSON with a donation key. This will be an object containing Donation attributes.

Curl example:

curl -H "X-Api-Key: 12345" https://api.digicollect.nl/v1/donations/1

Example response body:

{
  "donation": {
    "id": 1,
    "collection_box_id": 82,
    "created_at": "2022-09-26T14:50:14Z",
    "updated_at": "2022-09-26T14:50:30Z",
    "newsletter": false,
    "device_type": "desktop",
    "locale": "nl",
    "amount": "15.0",
    "transaction_costs": "0.4",
    "total_amount": "15.4",
    "invoicenumber": "D20170000027",
    "payment_method": "ideal",
    "payment_status": "paid",
    "transaction_id": "1234567890ABCDEF1234567890ABCDEF",
    "payment_id": "FEDCBA0987654321FEDCBA0987654321",
    "target_url": "https://demo1.digicollect.nl/",
    "consents": [
      {
        "consent_type": "terms_conditions",
        "consent_status": "granted",
        "granted_at": "2022-09-26T14:50:14Z",
        "consent_text": "Op onze dienstverlening zijn onze <a href='/algemene-voorwaarden' target='_blank'>Algemene Voorwaarden</a> &amp; <a href='/privacy' target='_blank'>Privacyverklaring</a> van toepassing.",
        "url": "https://demo1.digicollect.nl/",
        "terms_conditions_version": "V5 22-06-2016 13:09",
        "privacy_version": "V2 07-12-2018 08:34"
      }
    ]
  }
}

Donation attributes

A donation response object contains the following attributes:

Name Type Description
id number Unique identifier for this donation.
collection_box_id number Unique identifier for the collection box associated with the donation.
created_at string The time (ISO 8601 format) when the donation was created.
updated_at string The time (ISO 8601 format) when the donation was last updated.
name string The name of the donator. optional
email string The email address of the donator. optional
newsletter boolean Indicates if the donator subscribed to the newsletter.
device_type string The device type that was used while submitting the donation form (desktop, tablet or phone).
locale string The locale that was used while submitting the donation form (nl, en, de, etc).
amount string The donation amount (with decimals).
transaction_costs string The transaction costs (with decimals). optional
total_amount string Total amount of the donation (amount + transaction costs).
invoicenumber string Unique reference to be used as invoice number.
payment_method string The payment method used to make the donation.
payment_status string The payment status of the donation (pledged, refunded, canceled, paid, started, unknown).
transaction_id string The Buckaroo transaction ID for the donation.
payment_id string The Buckaroo payment ID for the donation.
target_url string The URL where the donation was made to.
consents array List of consents associated with the donation. See Donation - Consent object. optional

This object contains information about a specific consent a donor has given, for example the processing of personal data when donating.

Some consents can also be revoked later on by the donor, after which the status will change to revoked and the attribute revoked_at will be returned.

Attribute Type Description
consent_type string Type of consent. See below for possible values with their description.
consent_status string Status of the consent (granted or revoked).
granted_at string The time (ISO 8601 format) when the consent was granted.
revoked_at string The time (ISO 8601 format) when the consent was revoked. optional
consent_text string The consent text the fundraiser has agreed to.
url string The URL of the webpage where the consent was given.
terms_conditions_version string Version of terms and conditions when the consent was given.
privacy_version string Version of privacy statement when the consent was given. optional

Available consent types (given by donors) are:

Consent type Description
terms_conditions Accepting the terms and conditions.