Digicollect API v1 documentation

Sites

The current Digicollect site. A site contains groups and/or collection boxes.

Retrieve the current site

Get a detailed view of the current site.

GET /v1/sites/current

The result will be returned as JSON with a site key. This will be an object containing Site attributes.

Curl example:

curl -H "X-Api-Key: 12345" https://api.digicollect.nl/v1/sites/current

Example response body:

{
  "site": {
    "created_at": "2017-05-18T14:42:39Z",
    "updated_at": "2017-07-13T10:01:20Z",
    "host": "demo1.digicollect.nl",
    "name": "demo1",
    "title": "Aut est maxime nostrum.",
    "description": "<p>Maiores ut velit fugiat eos. Quae est nostrum rerum aut et nihil. Sequi eveniet occaecati et est corporis et enim.</p>",
    "total_amount": "240.0",
    "total_donations": 10,
    "url": "https://demo1.digicollect.nl/",
    "banners": [
      {
        "id": 14,
        "created_at": "2017-06-17T16:32:11Z",
        "updated_at": "2017-06-17T16:32:11Z",
        "url": "https://d2a3ux41sjxpco.cloudfront.net/carousel/file/site_banners/banner/1/normal_93be693da7ec2dde1a85ea4aec3832a8dfc60330.JPG",
        "text": "example",
        "link": "http://www.example.com/"
      }
    ]
  }
}

Site attributes

A site response object contains the following attributes:

Name Type Description
created_at string The time (ISO 8601 format) when the site was created.
updated_at string The time (ISO 8601 format) when the site was last updated.
host string The hostname for this site.
name string Name for the site.
title string Title displayed on the homepage of the site.
description string Description for the site.
total_amount string The amount that was donated to the site (with decimals).
total_donations number The number of donations for the site.
url string The URL to the site.
banners array An array of objects that represent the banners associated with the site. optional