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

Project Need Details ⇄ List

GET https://api.betterplace.org/de/api_v4/projects/1114/needs/59220.json

The details of a betterplace.org project need (donate money). The details and list view show the same data per project need.

For betterplace.org clients: There is no client-scoped URL. Please use the API calls that are provided inside the client project url response to make sure you only request data that is associated with one of your projects.

URL Parameters

Parameter Example Required Description
project_id 1114 yes

Project id as an integer number ≥ 14.

id 59220 yes

Need-id as an integer number ≥ 29.

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)

title string

Max 50 character

description string
completed boolean false

True if the need is 100 % financed

progress_percentage number 82

% financed

donated_amount_in_cents number 12382

How many cents are donated already. This includes all donations that can be given to a need (direct donation, forwarding of project donation, forwarding of organisation donation, forwarding of fundraising event donations, offline donations and also(!) external donations)

open_amount_in_cents number 12382

How many cents are still needed to complete the need

requested_amount_in_cents number 12382

How much money is needed in total

Response Links

Linkname Description

self

Link to this resource itself (need details)

project

Link to the related project's details

new_client_donation

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

new_donation

Link to the regular donation form.

Response Example

{
  "id": 142997,
  "created_at": "2016-04-06T10:48:08+02:00",
  "updated_at": "2017-07-24T21:32:36+02:00",
  "title": "Learning supplies",
  "description": "The equivalent of supplying 60 Back to School children with learning supplies for the semester.",
  "completed": false,
  "progress_percentage": 0.25,
  "donated_amount_in_cents": 500,
  "open_amount_in_cents": 199500,
  "requested_amount_in_cents": 200000,
  "links": [
    {
      "rel": "self",
      "href": "https://api.betterplace.org/de/api_v4/projects/1114/needs/142997.json"
    },
    {
      "rel": "project",
      "href": "https://api.betterplace.org/de/api_v4/projects/1114.json"
    },
    {
      "rel": "new_client_donation",
      "href": "https://www.betterplace.org/de/projects/1114/client_donations/new?client_id=%7Bclient_id%7D&donation_earmark_id=142997",
      "templated": true
    },
    {
      "rel": "new_donation",
      "href": "https://www.betterplace.org/de/projects/1114/donations/new?donation_earmark_id=142997"
    }
  ]
}