Digicollect API v1 documentation

Groups

Represents a group on a Digicollect site. A group contains collection boxes.

List all Groups

Get a list of groups for the current site.

GET /v1/groups

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

Curl example:

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

Example response body:

{
  "groups": [
    {
      "id": 1,
      "created_at": "2017-09-26T13:03:47Z",
      "updated_at": "2017-10-02T14:32:54Z",
      "name": "Group one"
    }
  ],
  "links": {
    "pages": {
      "last": "https://api.digicollect.nl/v1/groups?page=34&per_page=1",
      "next": "https://api.digicollect.nl/v1/groups?page=2&per_page=1"
    }
  },
  "total_entries": 34,
  "total_pages": 34,
  "per_page": 1,
  "current_page": 1
}

Retrieve a single Group

Retrieve a single group for the current site. A group can be queried by ID.

GET /v1/groups/1

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

Curl example:

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

Example response body:

{
  "group": {
    "id": 1,
    "created_at": "2017-09-26T13:03:47Z",
    "updated_at": "2017-10-02T14:32:54Z",
    "name": "Group one"
  }
}

Create a new Group

Create a new group on the current site.

POST /v1/groups

The request should contain the following attributes in a JSON object:

Name Type Description Required
name string Unique name for this group. Yes

Example request body:

{
  "name": "My group"
}

Curl example:

curl -H "X-Api-Key: 12345" -H "Content-Type: application/json" -d '{ "name": "My group" }' https://api.digicollect.nl/v1/groups

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

Example response body:

{
  "group": {
    "id": 2,
    "created_at": "2017-10-02T14:48:02Z",
    "updated_at": "2017-10-02T14:48:02Z",
    "name": "My group"
  }
}

Group attributes

A group response object contains the following attributes:

Name Type Description
id number Unique identifier for this group.
created_at string The time (ISO 8601 format) when the group was created.
updated_at string The time (ISO 8601 format) when the group was last updated.
name string Unique name for this group.