Get all activity groups

GET /api/configuration/activity-groups

Success: 200 OK

Overview

Lists every activity group configured for the tenant, each with the activities that belong to it. An activity group is an operator-defined folder used to organise activities (for example "Racquet Sports", "Swimming") so they can be presented as a two-level list. This is reference data: call it once at start-up to populate a category picker, and cache the result.

Two behaviours will catch you out:

Ids are operator-defined strings, not platform constants. See [].id below before you hard-code one.

Endpoint

GET {base_url}/api/configuration/activity-groups

{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.

Sample request

cURL
curl -X GET '{base_url}/api/configuration/activity-groups' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'

Response fields

FieldTypeDescription
[].descriptionstringDisplay name of the group, as typed by the operator — use this as the label in a category list. Maximum 255 characters. A group can come back with a null or empty description while still having a valid id; fall back to the id rather than rendering a blank row.
[].idstringThe group's unique identifier within your tenant, and the value activities are grouped under. Maximum 15 characters. Operator-defined per tenant — these are typed by whoever configured the site, not allocated from a platform-wide list, so an id such as SWIM in one tenant may not exist in another, or may mean something different. Never hard-code one; always resolve it from this call at run time.
[].commentsstringFree-text note the operator attached to the group, intended for display alongside it. Populated from the group's web comment; if that is empty, the kiosk comment is used instead. Maximum 255 characters. Empty or null when the operator has set neither — treat it as optional decoration, not something to key logic on.
[].activitiesarray of objectThe activities assigned to this group. Present on every group; an empty array means the group exists but currently has no activities attached, which is normal for a group the operator has stopped using. Not filtered — see the Overview.
[].activities[].idstringThe activity's unique identifier within your tenant, used wherever the booking APIs take an activity identifier. Maximum 15 characters. Operator-defined per tenant, with the same warning as [].id — do not hard-code it.
[].activities[].descriptionstringDisplay name of the activity. Maximum 255 characters, and nullable in the same way as the group description.
[].activities[].commentsstringFree-text note for the activity. The operator can set three separate comments and the first non-empty one is returned, in order: the general comment, then the web comment, then the kiosk comment. So the text you see here may have been authored for a different channel than yours. Empty or null when all three are unset.
[].activities[].backColourHexstringSuggested background colour for the activity when shown in a diary or grid, as #RRGGBB. Returned as an empty string, not null, when no colour is configured, so test for emptiness rather than nullness before using it in a stylesheet. No alpha channel and no contrast guarantee against textColourHex.
[].activities[].textColourHexstringSuggested foreground/text colour to pair with backColourHex, in the same #RRGGBB form and with the same empty-string-when-unset behaviour. The operator sets the two independently, so an unreadable combination is possible; validate contrast before adopting them verbatim.

Sample response

200 OK
[
  {
    "description": "string",
    "id": "string",
    "comments": "string",
    "activities": [
      {
        "id": "string",
        "description": "string",
        "comments": "string",
        "backColourHex": "string",
        "textColourHex": "string"
      }
    ]
  }
]

Errors

StatusMeaningWhen
500Internal server errorAny unexpected server-side failure while reading the groups. The response has no body and no error code; there is nothing in it to branch on. Treat it as transient, retry with backoff, and fall back to your cached copy of this reference data.
204No content (not an error)The tenant has no activity groups configured. Listed here because it is the success path most integrations mishandle: the body is empty, so parsing it as JSON throws. Check the status code before parsing.

This page as markdown · All pages · llms.txt