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

Illustrations List

GET https://api.betterplace.org/de/api_v4/illustrations.json?facets=project_id%3A10377&order=amount_in_cents%3Adesc

A list of betterplace.org project illustrations. Results are contained in a data attribute.

URL Parameters

Parameter Example Required Description
facets project_id:10377 no

Filter the result set.
It is strongly recommended to specify facets with each request.
Supported filters are:

  • project_id:10377
It is possible to set multiple facet filters. Learn how to format the parameter.
order amount_in_cents: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.
Supported orders are:

  • amount_in_cents:asc/desc
  • project_id:asc/desc
  • created_at:asc/desc and updated_at:ASC/DESC
  • id: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)

amount_in_cents number 666

Suggested amount to donate in cents

title string Little cheetah kittens need your help

Title of the illustration

description string The kittens really do need your help, don't hesitate…

More detailed description of the illustration

↓picture null | object See below.

Picture to be displayed in the illustration

↑Nested Attributes: picture

Attribute Types Example Description
picture.fallback boolean true

Specifies whether a fallback image is given or not

Response Links

Linkname Description

new_donation

Link to where a new donation can be made

project

Link to the project this illustration belongs to (project details)

picture.fill_410x214

Illustration picture with 410×214 Pixel

Response Example

{
  "total_entries": 2,
  "offset": 0,
  "total_pages": 1,
  "current_page": 1,
  "per_page": 3,
  "data": [
    {
      "id": 2,
      "created_at": "2018-08-28T13:55:58+02:00",
      "updated_at": "2018-08-28T13:56:35+02:00",
      "amount_in_cents": 10000,
      "title": "Wasser-Pumpen",
      "description": "Bereits mit BETRAG können wir mehrere Familien mit Trinkwasser versorgen und verbessern die hygienischen Bedingungen  entscheidend. ",
      "picture": {
        "links": [
          {
            "rel": "fill_410x214",
            "href": "https://betterplace-assets.betterplace.org/uploads/illustration/picture/000/000/002/fill_410x214_bp1535457395_Syrien-nothilfe-verteilung-kinder_002_171112.jpg"
          }
        ]
      },
      "links": [
        {
          "rel": "new_donation",
          "href": "https://api.betterplace.org/de/projects/10377-syrien-hilfe-fur-kinder/donations/new?donation_amount=100&donation_illustration_id=2"
        },
        {
          "rel": "project",
          "href": "https://api.betterplace.org/de/api_v4/projects/10377.json"
        }
      ]
    },
    {
      "id": 1,
      "created_at": "2018-08-28T13:49:16+02:00",
      "updated_at": "2018-08-28T13:52:55+02:00",
      "amount_in_cents": 2000,
      "title": "Nahrung",
      "description": "Bereits mit BETRAG können wir ein Kind in Syrien einen Monat lang mit Nahrung unterstützen.",
      "picture": {
        "links": [
          {
            "rel": "fill_410x214",
            "href": "https://betterplace-assets.betterplace.org/uploads/illustration/picture/000/000/001/fill_410x214_bp1535457175_Syrien-nothilfe-kinder-familien_007_171103_.jpg"
          }
        ]
      },
      "links": [
        {
          "rel": "new_donation",
          "href": "https://api.betterplace.org/de/projects/10377-syrien-hilfe-fur-kinder/donations/new?donation_amount=20&donation_illustration_id=1"
        },
        {
          "rel": "project",
          "href": "https://api.betterplace.org/de/api_v4/projects/10377.json"
        }
      ]
    }
  ]
}