Permalink
Switch branches/tags
Nothing to show
Find file Copy path
52c3a21 Jun 20, 2018
1 contributor

Users who have contributed to this file

931 lines (773 sloc) 25.4 KB

Fundraising Event List ⇄ Details

GET https://api.betterplace.org/de/api_v4/fundraising_events.json?facets=tax_deductible%3Atrue&order=rank%3ADESC&q=Die+Eckerts&scope=location

A list of betterplace.org fundraising events (donate money). Results are contained in a data attribute.

For betterplace.org clients: Use this resource as follows: /clients/PERMALINK/fundraising-events.json.

To guarantee stable search results, all clients are required to specify at least one facet and order with each request as explained below.

URL Parameters

Parameter Example Required Description
scope location no

Use the scope to specify how the search-query q should behave:

  • "no scope" (default) performs a full text search
  • human_name searches only on the manager-fullname and carrier-fullname. Use this to get all entities by "Unicef" or by "Till Behnke".
Learn how to format the parameter.
q Die Eckerts no

Search query. The searches behaviour is based on the scope.

facets tax_deductible:true no

Filter the result set.
It is strongly recommended to specify facets with each request. A recommended set of facets is tax_deductible:true| closed:false| prohibit_donations:false (without the spaces) which only shows active fundraising events that can receive donations.
Supported filters are:

  • tax_deductible:true/false
  • prohibit_donations:true/false
  • completed:true/false – is this fundraising event fully financed (100 %)? See completed_at
  • closed:true/false – has this fundraising event been closed by its manager? See closed_at
  • prohibit_donations:true/false – are donations to this fundraising event forbidden at the moment? Closed and blocked fundraising events will always return true, for example.
It is possible to set multiple facet filters. Learn how to format the parameter.
order rank:DESC no

Order the result set.
It is strongly recommended to specify an order with each request. The default order might change at any time without notice. A recommended order is score:desc|closed:asc|completed:asc|rank:desc|last_donation_at:desc (without the spaces). This is the order betterplace.org uses for the fundraising event list.
Supported orders are:

  • score:ASC/DESC – as provided by the search engine whenever a search term is given.
  • rank:ASC/DESC – a betterplace.org-specific, platform-wide activity indicator
  • tax_deductible:ASC/DESC – true (1) or false (0)
  • last_donation_at:ASC/DESC
  • completed:ASC/DESC
  • closed:ASC/DESC
It is possible to set multiple order parameters. Learn how to format the parameter.

Response Attributes

Root Attributes

Attribute Types Example Description
id number 1

An integer number ≥ 1

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

DateTime (ISO8601 with Timezone)

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

DateTime (ISO8601 with Timezone)

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

DateTime (ISO8601 with Timezone)

title string Gemeinsam gegen Ebola: Deine Spende für Westafrika

Max 50 character

description string Lorem ipsum

A description of the fundraising event. This may contain any of the following HTML tags: a, b, br, div, em, i, iframe, img, li, ol, p, strong, ul. Max 25.000 characters.

tax_deductible boolean true

True if the fundraising event is marked as tax deductible and can only support tax deductible projects. If so, users can request a tax receipt for their donation that can be used with the German tax authorities.

donations_prohibited boolean false

True if the fundraising event must not and cannot receive donations. This might happen if the event was closed by the manager or blocked by a platform administrator.

Please check this flag whenever you display a donation button. Should you show a button for an event that cannot receive donations the user will open the donation form and see an error message on betterplace.org instead!

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

DateTime (ISO8601 with Timezone) when the fundraising event was closed by the manager.

donor_count number 46

Number of unique donors, based on the payment-email-address

donated_amount_in_cents number 232323

How many cents were already raised with the fundraising event

requested_amount_in_cents number 12382

How many cents were requested to be raised with the fundraising event. This value is optional! The manager decides if his event has a goal or not.

progress_percentage number 5

% financed. This value is only present in case the manager decided to add a requested_amount_in_cents.

↓contact object TODO

The public face of the fundraising event / fundraising event manager

↓profile_picture null | object //betterplace-assets.betterplace.org ↪/uploads/user/profile_picture ↪/000/000/001 ↪/fill_100x100_original_tb.jpg

TODO

↑Nested Attributes: contact

Attribute Types Example Description
contact.id number 1

An integer number ≥ 1

contact.name null | string "Till B."

Display name of a betterplace.org user. Possible formats: "Till B.", "T. Behnke", "Till Behnke".

In the case of donation-opinions the name might also be empty/null for anonymous donations for anonymous donations.

↓contact.picture object //betterplace-assets.betterplace.org ↪/uploads/user/profile_picture ↪/000/000/001 ↪/fill_100x100_original_tb.jpg

User profile picture or a fallback image

↑Nested Attributes: contact.picture

Attribute Types Example Description
contact.picture.fallback boolean true

Specifies whether a fallback image is given or not

↑Nested Attributes: profile_picture

Attribute Types Example Description
profile_picture.fallback boolean true

Specifies whether a fallback image is given or not

Response Links

Linkname Description

self

Link to this resource itself (fundraising event details)

featured_projects

A list of projects are currently supported by the fundraising event.

Please note that this project list has no fixed relation to the list of projects that received money by this fundraising event (see Featured Projects List). A Fundraising event manager can change the list of supported projects at any time; regardless if they received money before.

forwardings

Provides a list of forwarded amounts and their receiving projects.

Each fundraising event can have multiple projects that it supports. The fundraising event manager specifies the amount that is forwarded from the fundraising event to the project. Please note that this list of forwarded donations and their corresponding receiving projects is not required to be in sync with the Featured Project List endpoint. To find out if all donations of the fundraising event have been forwarded, please sum the amounts provided by this api endpoint and compare it to the donated amount attribute of the fundraising event api endpoint.

platform

Permalink to betterplace.org

new_client_donation

Link to the donation form. Templated, needs insertion of the client_id.

new_donation

Link to the regular donation form.

contact.platform

The user's profile on betterplace.org. To view a user profile you have to be logged in. This array is empty if the user has no useraccount with betterplace.org but donated via one of our partner.

contact.contact_data

The user's contact data. Please note that you need to be authenticated as a client with matching access rights in order to see this information.

contact.picture.fill_100x100

100×100 Pixel

contact.picture.original

Maximum sized image. This is the original image with default-cropping or user-cropping applied.

profile_picture.fill_960x500

950×500 Pixel

profile_picture.fill_730x380

730×380 Pixel

profile_picture.fill_618x322

618×322 Pixel / DEPRECATED, will be removed after 5/2015

profile_picture.fill_410x214

410×214 Pixel

profile_picture.fill_270x141

270×141 Pixel / DEPRECATED, will be removed after 5/2015

profile_picture.original

Maximum sized image. This is the original image with default-cropping or user-cropping applied.

Response Example

{
  "total_entries": 6128,
  "offset": 0,
  "total_pages": 2043,
  "current_page": 1,
  "per_page": 3,
  "data": [
    {
      "id": 401,
      "created_at": "2008-09-12T16:50:38+02:00",
      "updated_at": "2018-03-29T02:43:00+02:00",
      "content_updated_at": "2016-02-23T17:17:45+01:00",
      "title": "Die Eckerts",
      "description": "In Deutschland gibt es 12.673 Telefonbucheinträge mit dem Namen \"Eckert\". Wenn jeder davon nur einen Euro im Monat spenden würde, kämen 152.076 Euro zusammen. Aber fangen wir erst mal mit fünf Eckerts (dafür etwas mehr als ein Euro im Monat) an - bringt auch schon eine ordentliche Summe zusammen, mit der wir hier auf betterplace.org was Gutes tun können.",
      "tax_deductible": true,
      "donations_prohibited": true,
      "closed_at": "2016-01-22T08:14:18+01:00",
      "donor_count": 13,
      "donated_amount_in_cents": 92602,
      "requested_amount_in_cents": null,
      "progress_percentage": null,
      "contact": {
        "id": 6,
        "name": "Anna B.",
        "picture": {
          "links": [
            {
              "rel": "fill_100x100",
              "href": "https://betterplace-assets.betterplace.org/uploads/user/profile_picture/000/000/006/fill_100x100_original_eckert.png"
            },
            {
              "rel": "original",
              "href": "https://betterplace-assets.betterplace.org/uploads/user/profile_picture/000/000/006/crop_original_original_eckert.png"
            }
          ]
        },
        "links": [
          {
            "rel": "platform",
            "href": "https://www.betterplace.org/de/users/6"
          },
          {
            "rel": "contact_data",
            "href": "https://api.betterplace.org/de/api_v4/users/6/contact_data.json"
          }
        ]
      },
      "profile_picture": {
        "links": [
          {
            "rel": "fill_960x500",
            "href": "https://betterplace-assets.betterplace.org/uploads/fundraising_event/profile_picture/000/000/401/fill_960x500_original_eckert_absolute.png"
          },
          {
            "rel": "fill_730x380",
            "href": "https://betterplace-assets.betterplace.org/uploads/fundraising_event/profile_picture/000/000/401/fill_730x380_original_eckert_absolute.png"
          },
          {
            "rel": "fill_618x322",
            "href": "https://betterplace-assets.betterplace.org/uploads/fundraising_event/profile_picture/000/000/401/fill_618x322_original_eckert_absolute.png"
          },
          {
            "rel": "fill_410x214",
            "href": "https://betterplace-assets.betterplace.org/uploads/fundraising_event/profile_picture/000/000/401/fill_410x214_original_eckert_absolute.png"
          },
          {
            "rel": "fill_270x141",
            "href": "https://betterplace-assets.betterplace.org/uploads/fundraising_event/profile_picture/000/000/401/fill_270x141_original_eckert_absolute.png"
          },
          {
            "rel": "original",
            "href": "https://betterplace-assets.betterplace.org/uploads/fundraising_event/profile_picture/000/000/401/crop_original_original_eckert_absolute.png"
          }
        ]
      },
      "links": [
        {
          "rel": "self",
          "href": "https://api.betterplace.org/de/api_v4/fundraising_events/401.json"
        },
        {
          "rel": "featured_projects",
          "href": "https://api.betterplace.org/de/api_v4/fundraising_events/401/featured_projects.json"
        },
        {
          "rel": "forwardings",
          "href": "https://api.betterplace.org/de/api_v4/fundraising_events/401/forwardings.json"
        },
        {
          "rel": "platform",
          "href": "https://www.betterplace.org/de/fundraising-events/401-die-eckerts"
        },
        {
          "rel": "new_client_donation",
          "href": "https://www.betterplace.org/de/fundraising-events/401/client_donations/new?client_id=%7Bclient_id%7D",
          "templated": true
        },
        {
          "rel": "new_donation",
          "href": "https://www.betterplace.org/de/fundraising-events/401/donations/new"
        }
      ]
    },
    {
      "id": 13224,
      "created_at": "2013-01-31T15:09:18+01:00",
      "updated_at": "2016-10-21T09:35:45+02:00",
      "content_updated_at": "2015-11-22T08:05:39+01:00",
      "title": "Matthiass Spendenaktion",
      "description": "Schön, dass Du meine Spendenaktion bei betterplace.org besuchst! Das Spenden über betterplace.org ist sicher und unkompliziert. betterplace.org leitet das von uns zusammen gesammelte Geld weiter. Wenn Du willst, kannst Du das sogar nachverfolgen: Denn betterplace.org ist nicht nur klasse, um mit einer Aktion Spenden zu sammeln, sondern - durch seine Transparenz - auch toll, um zu sehen, was die Hilfe beim Projekt vor Ort bewirkt.<br><br>Deshalb freue ich mich um so mehr, wenn Du jetzt hier an meine Aktion spendest! Vielen Dank.<br>",
      "tax_deductible": false,
      "donations_prohibited": true,
      "closed_at": "2015-11-22T08:05:38+01:00",
      "donor_count": 0,
      "donated_amount_in_cents": 0,
      "requested_amount_in_cents": null,
      "progress_percentage": null,
      "contact": {
        "id": 296030,
        "name": "M. Pfeffer",
        "picture": {
          "fallback": true,
          "links": [
            {
              "rel": "fill_100x100",
              "href": "https://betterplace-assets.betterplace.org/assets/default/user_profile_picture/fill_100x100_default.jpg"
            },
            {
              "rel": "original",
              "href": "https://betterplace-assets.betterplace.org/assets/default/user_profile_picture/fill_100x100_default.jpg"
            }
          ]
        },
        "links": [
          {
            "rel": "platform",
            "href": "https://www.betterplace.org/de/users/296030"
          },
          {
            "rel": "contact_data",
            "href": "https://api.betterplace.org/de/api_v4/users/296030/contact_data.json"
          }
        ]
      },
      "profile_picture": {
        "fallback": true,
        "links": [
          {
            "rel": "fill_960x500",
            "href": "https://betterplace-assets.betterplace.org/assets/default/fundraising_event_profile_picture/fill_960x500_default.jpg"
          },
          {
            "rel": "fill_730x380",
            "href": "https://betterplace-assets.betterplace.org/assets/default/fundraising_event_profile_picture/fill_730x380_default.jpg"
          },
          {
            "rel": "fill_618x322",
            "href": "https://betterplace-assets.betterplace.org/assets/default/fundraising_event_profile_picture/fill_618x322_default.jpg"
          },
          {
            "rel": "fill_410x214",
            "href": "https://betterplace-assets.betterplace.org/assets/default/fundraising_event_profile_picture/fill_410x214_default.jpg"
          },
          {
            "rel": "fill_270x141",
            "href": "https://betterplace-assets.betterplace.org/assets/default/fundraising_event_profile_picture/fill_270x141_default.jpg"
          },
          {
            "rel": "original",
            "href": "https://betterplace-assets.betterplace.org/assets/default/fundraising_event_profile_picture/crop_original_default.jpg"
          }
        ]
      },
      "links": [
        {
          "rel": "self",
          "href": "https://api.betterplace.org/de/api_v4/fundraising_events/13224.json"
        },
        {
          "rel": "featured_projects",
          "href": "https://api.betterplace.org/de/api_v4/fundraising_events/13224/featured_projects.json"
        },
        {
          "rel": "forwardings",
          "href": "https://api.betterplace.org/de/api_v4/fundraising_events/13224/forwardings.json"
        },
        {
          "rel": "platform",
          "href": "https://www.betterplace.org/de/fundraising-events/13224-matthiass-spendenaktion"
        },
        {
          "rel": "new_client_donation",
          "href": "https://www.betterplace.org/de/fundraising-events/13224/client_donations/new?client_id=%7Bclient_id%7D",
          "templated": true
        },
        {
          "rel": "new_donation",
          "href": "https://www.betterplace.org/de/fundraising-events/13224/donations/new"
        }
      ]
    },
    {
      "id": 4518,
      "created_at": "2010-09-27T15:39:44+02:00",
      "updated_at": "2016-10-21T09:32:39+02:00",
      "content_updated_at": "2015-11-22T08:10:31+01:00",
      "title": "Moritzs Spendenaktion",
      "description": "Schön, dass Du meine Spendenaktion bei betterplace.org besuchst! Das Spenden über betterplace.org ist sicher und unkompliziert. betterplace.org leitet das von uns zusammen gesammelte Geld weiter. Wenn Du willst, kannst Du das sogar nachverfolgen: Denn betterplace.org ist nicht nur klasse, um mit einer Aktion Spenden zu sammeln, sondern - durch seine Transparenz - auch toll, um zu sehen, was die Hilfe beim Projekt vor Ort bewirkt.<br><br>Deshalb freue ich mich um so mehr, wenn Du jetzt hier an meine Aktion spendest! Vielen Dank.",
      "tax_deductible": true,
      "donations_prohibited": true,
      "closed_at": "2015-11-22T08:10:30+01:00",
      "donor_count": 0,
      "donated_amount_in_cents": 0,
      "requested_amount_in_cents": null,
      "progress_percentage": null,
      "contact": {
        "id": 6,
        "name": "Anna B.",
        "picture": {
          "links": [
            {
              "rel": "fill_100x100",
              "href": "https://betterplace-assets.betterplace.org/uploads/user/profile_picture/000/000/006/fill_100x100_original_eckert.png"
            },
            {
              "rel": "original",
              "href": "https://betterplace-assets.betterplace.org/uploads/user/profile_picture/000/000/006/crop_original_original_eckert.png"
            }
          ]
        },
        "links": [
          {
            "rel": "platform",
            "href": "https://www.betterplace.org/de/users/6"
          },
          {
            "rel": "contact_data",
            "href": "https://api.betterplace.org/de/api_v4/users/6/contact_data.json"
          }
        ]
      },
      "profile_picture": {
        "fallback": true,
        "links": [
          {
            "rel": "fill_960x500",
            "href": "https://betterplace-assets.betterplace.org/assets/default/fundraising_event_profile_picture/fill_960x500_default.jpg"
          },
          {
            "rel": "fill_730x380",
            "href": "https://betterplace-assets.betterplace.org/assets/default/fundraising_event_profile_picture/fill_730x380_default.jpg"
          },
          {
            "rel": "fill_618x322",
            "href": "https://betterplace-assets.betterplace.org/assets/default/fundraising_event_profile_picture/fill_618x322_default.jpg"
          },
          {
            "rel": "fill_410x214",
            "href": "https://betterplace-assets.betterplace.org/assets/default/fundraising_event_profile_picture/fill_410x214_default.jpg"
          },
          {
            "rel": "fill_270x141",
            "href": "https://betterplace-assets.betterplace.org/assets/default/fundraising_event_profile_picture/fill_270x141_default.jpg"
          },
          {
            "rel": "original",
            "href": "https://betterplace-assets.betterplace.org/assets/default/fundraising_event_profile_picture/crop_original_default.jpg"
          }
        ]
      },
      "links": [
        {
          "rel": "self",
          "href": "https://api.betterplace.org/de/api_v4/fundraising_events/4518.json"
        },
        {
          "rel": "featured_projects",
          "href": "https://api.betterplace.org/de/api_v4/fundraising_events/4518/featured_projects.json"
        },
        {
          "rel": "forwardings",
          "href": "https://api.betterplace.org/de/api_v4/fundraising_events/4518/forwardings.json"
        },
        {
          "rel": "platform",
          "href": "https://www.betterplace.org/de/fundraising-events/4518-moritzs-spendenaktion"
        },
        {
          "rel": "new_client_donation",
          "href": "https://www.betterplace.org/de/fundraising-events/4518/client_donations/new?client_id=%7Bclient_id%7D",
          "templated": true
        },
        {
          "rel": "new_donation",
          "href": "https://www.betterplace.org/de/fundraising-events/4518/donations/new"
        }
      ]
    }
  ]
}