Responses

In response to a request, a response body will typically be sent back in the form of JSON object.

There's two types of responses, those involving collections of objects and the responses with a single object:

Collections

Collections returns arrays in response to a query made against and endpoint which always ends with / (trailing slash).

Response body always contents 2 main keys:

Attribute Type Description
items array An array of the endpoint objects (limited to the maximum results per page specified in filters)
meta object This object will return meta information with some relevant information about the current request. Such as the total number of elements, the current page or the applied filters ☞ MetaProject
extra object Some endpoints may return this additional object with some relevant information, this is documented where applies
{
    items: [
            {
                "..."
            }
        ],
    meta: {
            "..."
        },
    extra: {
            "..."
        }
}

Single objects

Single object endpoints does not ends with the / (trailing slash).

Response body will be the final object returned by the endpoint

{
    "..."
}

Error responses

For 40X errors, the response body will be in JSON format as well. Typically with a description of the error:

{
  "error": 401,
  "message": "Invalid access method or wrong credentials"
}

Meta

Meta information may include (depending on the endpoint, this applies for the projects endpoint) this keys:

MetaProject
Attribute Type Description
category array Only if filtering by category
footprint array Only if filtering by footprint
from_date string Only if filtering by from_date
lang array Only if filtering by lang
limit integer Limit of results per page when retrieving a collection
location array Only if filtering by location
node array Only if filtering by node
page integer Current page, 0 based (first page is zero)
project array Only if filtering by project
sdg array Only if filtering by Sustainable Development Goal
social_commitment array Only if filtering by social_commitment
to_date string Only if filtering by to_date
total integer Total elements available for the collection