Digicollect API v1 documentation

Pools

A pool is a group of donation boxes who compete against each other to raise as much money as possible.

List all Pools

Get a list of pools for the current site.

GET /v1/pools

The result will be returned as JSON with a pools key. This will be an array with objects containing Pool attributes.

Curl example:

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

Example response body:

{
  "pools": [
    {
      "id": 1,
      "slug": "john-doe",
      "name": "John Doe",
      "created_at": "2023-02-01T15:43:56Z",
      "updated_at": "2023-02-01T15:56:28Z",
      "started_at": "2023-02-01T15:56:28Z",
      "started_id": 1,
      "members": [
        {
          "id": 1,
          "position": 2
        },
      ]
    }
  ],
  "links": {
    "pages": {
      "last": "https://api.digicollect.nl/v1/pools?page=5&per_page=1",
      "next": "https://api.digicollect.nl/v1/pools?page=2&per_page=1"
    }
  },
  "total_entries": 20,
  "total_pages": 20,
  "per_page": 1,
  "current_page": 1
}

Retrieve a single Pool

Retrieve a single Pool for the current site.

GET /v1/pools/5
GET /v1/pools-boxes/john-doe

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

Curl example:

curl -H "X-Api-Key: 12345" https://api.digicollect.nl/v1/pools/1
curl -H "X-Api-Key: 12345" https://api.digicollect.nl/v1/pools/john-doe

Example response body:

{
  "pool": {
    "id": 1,
    "slug": "john-doe",
    "name": "John Doe",
    "created_at": "2023-02-01T15:43:56Z",
    "updated_at": "2023-02-01T15:56:28Z",
    "started_at": "2023-02-01T15:56:28Z",
    "started_id": 1,
    "members": [
      {
        "id": 1,
        "position": 2
      },
    ]
  }
}

Pool attributes

A pool response object contains the following attributes:

Name Type Description
id number Unique identifier for this pool.
slug string Unique identifier for this pool, used to create a "nice" pool URL.
name string Name of the pool.
created_at string The time (ISO 8601 format) when the pool was created.
updated_at string The time (ISO 8601 format) when the pool was last updated.
started_at string The time (ISO 8601 format) when the pool was started.
started_id number Unique identifier for the collection box associated with the pool.
members array List of collection boxes associated with the pool. See Pool - Member object.

Pool - Member object

This object contains information about a specific collection box associated with the pool.

Attribute Type Description
id number Unique identifier for the collection box associated with the pool.
position number The position number of the collection box pool.