Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
311 lines (248 sloc) 7.33 KB

Client Donations List ⇄ Details

GET https://api.betterplace.org/de/api_v4/clients/volksfreund/client_donations.json?facets=client_reference%3A922ec9b-etc

For betterplace.org clients only:

This API returns all donations to all client projects that where made using the client donation form (but none of the other donation-sources).

Results are contained in a data attribute.

URL Parameters

Parameter Example Required Description
client_id volksfreund yes

The betterplace.org-internal client permalink.

facets client_reference:922ec9b-etc no

You can search for a specific client_reference: ?facets=client_reference:54


Example: https://api.betterplace.org/en/api_v4/ clients/karmic_minion/ client_donations?facets=client_reference:54
This feature is only used in some cases that relate to the ThirdPartyApp custom donation form for organisations and the Client donation pledge endpoint.

Response Attributes

Root Attributes

Attribute Types Example Description
amount_in_cents number 10100

Donated amount in cents

state string "confirmed"

At the moment, all donations that are returned by the API are "confirmed". Unconfirmed donations do not show up at all or disappear after they were revoked. Revocations usually take place during the first 14 days – but there are no guarantees.

Please make sure to check for the "confirmed" state in your application explicitly since we might add a "revoked" state in the future.

token string ofMmTgfiPL-n1dDlNmFWqTQN

A token uniquely identifies a donation on the platform.

client_reference string 922ec9b-etc

Client Donations can be identified via a custom client reference token.

This donation_client_reference can be provided by users of our ThirdPartyApp custom donation form for organisations, for example.

created_at string "1994-11-05T13:15:30Z"

DateTime (ISO8601 with Timezone)

receiver_type string "Project"

Client donations may go to a Project, a Project's Element, a FundraisingEvent, a Pool.

receiver_id number 1114

The id of the project, project element or fundraising event.

receiver_title string "Skateistan Afghanistan"

The title of the project, project element or fundraising event.

Response Links

Linkname Description

receiver

Link to the project details, project need details, fundraising event details, that is associated with this donation.
Right now, there is no api end point for donations that are redirect or donated to the client pool.

self

Link to this resource itself (client donation details)

donor_contact_data

Link to the donor contact data (donor contact data details)

Response Example

{
  "total_entries": 18434,
  "offset": 0,
  "total_pages": 6145,
  "current_page": 1,
  "per_page": 3,
  "data": [
    {
      "amount_in_cents": 200,
      "state": "confirmed",
      "token": "540b9325884a2a7dc51c",
      "client_reference": null,
      "created_at": "2011-12-13T13:48:15+01:00",
      "receiver_type": "FundraisingEvent",
      "receiver_id": 8821,
      "receiver_title": "Stark fürs Leben - für die Zukunft unserer Kinder",
      "links": [
        {
          "rel": "receiver",
          "href": "https://api.betterplace.org/de/api_v4/fundraising_events/8821.json"
        },
        {
          "rel": "self",
          "href": "https://api.betterplace.org/de/api_v4/clients/volksfreund/client_donations/540b9325884a2a7dc51c.json"
        },
        {
          "rel": "donor_contact_data",
          "href": "https://api.betterplace.org/de/api_v4/clients/volksfreund/client_donations/540b9325884a2a7dc51c/donor_contact_data.json"
        }
      ]
    },
    {
      "amount_in_cents": 100,
      "state": "confirmed",
      "token": "563b46eb4213d52454be",
      "client_reference": null,
      "created_at": "2012-05-23T16:41:06+02:00",
      "receiver_type": "FundraisingEvent",
      "receiver_id": 9866,
      "receiver_title": "Fab&Vivien Nr. 3 | The third fundraising bet",
      "links": [
        {
          "rel": "receiver",
          "href": "https://api.betterplace.org/de/api_v4/fundraising_events/9866.json"
        },
        {
          "rel": "self",
          "href": "https://api.betterplace.org/de/api_v4/clients/volksfreund/client_donations/563b46eb4213d52454be.json"
        },
        {
          "rel": "donor_contact_data",
          "href": "https://api.betterplace.org/de/api_v4/clients/volksfreund/client_donations/563b46eb4213d52454be/donor_contact_data.json"
        }
      ]
    },
    {
      "amount_in_cents": 1000,
      "state": "confirmed",
      "token": "bde16185aac7ac946b58",
      "client_reference": null,
      "created_at": "2012-06-12T16:53:03+02:00",
      "receiver_type": "FundraisingEvent",
      "receiver_id": 10987,
      "receiver_title": "Touchrugbyturnier",
      "links": [
        {
          "rel": "receiver",
          "href": "https://api.betterplace.org/de/api_v4/fundraising_events/10987.json"
        },
        {
          "rel": "self",
          "href": "https://api.betterplace.org/de/api_v4/clients/volksfreund/client_donations/bde16185aac7ac946b58.json"
        },
        {
          "rel": "donor_contact_data",
          "href": "https://api.betterplace.org/de/api_v4/clients/volksfreund/client_donations/bde16185aac7ac946b58/donor_contact_data.json"
        }
      ]
    }
  ]
}