# Get all activity groups

`GET /api/configuration/activity-groups`

- **Success:** `200 OK`
- **Products:** Operator (`FOH`), Consumer (`CONSUMER`) (any one of these products, not all)
- **Features:** Online Bookings (`ONLINEBOOK`), Front of House Generic Access (`FOHGENERIC`) (any one of these features, not all)

HTML version: [Get all activity groups](https://support.gladstonesoftware.cloud/reference/configuration/get-all-activity-groups)

## 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:

- **There is no `200 []`.** When the tenant has no activity groups the endpoint returns `204 No Content` with an empty body, not an empty JSON array. Code that assumes a parsable body on success will fail.
- **Nothing is filtered.** Every activity group is returned, so groups the operator has marked inactive, and groups not flagged as web-visible, are still returned — as are all of their activities, regardless of whether those activities are bookable on web or kiosk. If you only want bookable activities you must filter them yourself using the per-activity configuration endpoints; this response does not carry the flags to do it.

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](../../guides/authenticating-with-gladstone-apis.md).

## Sample request

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

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `[].description` | string | Display 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. |
| `[].id` | string | The 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. |
| `[].comments` | string | Free-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. |
| `[].activities` | array of object | The 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[].id` | string | The 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[].description` | string | Display name of the activity. Maximum 255 characters, and nullable in the same way as the group description. |
| `[].activities[].comments` | string | Free-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[].backColourHex` | string | Suggested 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[].textColourHex` | string | Suggested 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

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

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `500` | Internal server error | Any 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. |
| `204` | No 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. |
