Get activities by tags
GET /api/configuration/activities-by-tags
Success: 200 OK
- Products: Operator (
FOH), Consumer (CONSUMER) (any one of these products, not all) - Features: Online Bookings (
ONLINEBOOK), Online Joining (ONLINEJOIN), Front of House Generic Access (FOHGENERIC) (any one of these features, not all)
Overview
Returns activities grouped under the tags you ask for. Tags are the operator-defined labels used to categorise activities — "Swimming", "Family", "Racket sports" — and this endpoint is how a consumer-facing site turns a category the user picked into the activity identifiers it needs for availability and booking calls.
Unlike the full activity list, this endpoint is available anonymously, which is what makes it usable from a public booking journey before anyone has signed in.
webBookableOnly defaults to true. Leave it out and you get only the activities the operator has marked as bookable on the web — which is what a consumer journey wants, but is a smaller set than the tag actually contains. Send webBookableOnly=false explicitly if you are building a staff tool and need everything.
Tag ids are numeric and tenant-specific, and they are not validated against the tag list. A tag that does not exist, or one that exists but has no matching activities, is simply left out of the response rather than reported. The array can therefore be shorter than the list you asked for, and an entirely fruitless request returns [] with 200, never a 404.
Activity identifiers are tenant-specific and operator-chosen, so read them from here at runtime rather than hard-coding them. The id inside each group is the same identifier the rest of the booking API expects, and an activity carrying two of the tags you asked for appears once under each.
Results reflect configuration changes immediately — unlike the full activity list, which can take a while to show recent changes.
Endpoint
GET {base_url}/api/configuration/activities-by-tags
{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
tagIds | string | Yes | A comma-separated list of numeric tag identifiers — for example tagIds=3,7,12. Whitespace around each entry is trimmed and duplicates are collapsed. Required despite reading as optional: omitting it, or sending it blank or whitespace, returns 400 with No tag IDs were supplied and Tag IDs are required to get activities for tags. Every entry must parse as an integer, or the whole request fails with 400 and One or more of the tag IDs supplied was invalid. Tag IDs can only be numeric. — one bad entry rejects the lot. Tag ids that exist but match nothing, and ids that do not exist at all, are silently omitted from the response. Groups come back in the order you listed the tags. |
webBookableOnly | boolean | No | Restricts each group to activities the operator has flagged as bookable on the web. Defaults to true, so omitting it gives you the filtered view, not everything — send false to include activities that are not web-bookable. A tag whose activities are all excluded by this filter drops out of the response entirely, which can make a valid tag look as though it does not exist. |
Sample request
curl -X GET '{base_url}/api/configuration/activities-by-tags' \
-H 'Authorization: Bearer {accessToken}' \
-H 'X-Use-SSO: true'Response fields
| Field | Type | Description |
|---|---|---|
[].tagId | integer (int32) | The tag this group is for, echoed back from your tagIds list so you can match groups to what you asked for. Only tags with at least one matching activity appear, so compare this against your request rather than assuming a one-to-one mapping. |
[].activities | array of object | The activities carrying this tag, after the webBookableOnly filter. Never empty — a tag with no matching activities is omitted rather than returned with an empty array. The same activity can appear under more than one group when it carries several of the tags you asked for, so de-duplicate by id if you are building a flat list. |
[].activities[].id | string | The activity identifier, and the value every availability and booking call expects. Up to 15 characters, always upper-cased, chosen by the operator and unique within the tenant rather than globally — never carry one between customers or environments. Each activity belongs to exactly one site, so pair it with siteId when you store it. |
[].activities[].name | string | The activity's short label, suitable for a list or a button. It is the activity's configured description, which is why it reads as a name rather than a description. |
[].activities[].description | string | The longer explanatory text about the activity, for a detail panel rather than a list. It can be null or empty when the operator has not filled it in, so do not rely on it being present. |
[].activities[].siteId | string | The site the activity belongs to. This endpoint has no site filter, so results span the whole estate — filter or group on this field yourself if your journey is for one venue. |
[].activities[].translations | array of object | Localised versions of the activity's text, one entry per translated field and culture. Returned as an empty array, not null, when the activity has no translations. Only cultures that have actually been translated appear, so fall back to name and description when nothing matches. |
[].activities[].translations[].Type | string | Which piece of text this entry translates. Note the capital T — this one field is serialised in Pascal case while its siblings are camel case, so a case-sensitive parser needs to allow for it. |
[].activities[].translations[].culture | string | The culture code the translated text is for, matching the codes configured in the tenant's cultures list. Pick the entry matching your user's culture; if none matches, use the untranslated name and description. |
[].activities[].translations[].text | string | The translated text itself, to be shown in place of the field named by Type when the user is in the matching culture. |
Sample response
[
{
"tagId": 12345,
"activities": [
{
"id": "string",
"name": "string",
"description": "string",
"siteId": "string",
"translations": [
{
"Type": "string",
"culture": "string",
"text": "string"
}
]
}
]
}
]Errors
| Status | Meaning | When |
|---|---|---|
400 | Bad request | tagIds was omitted, empty or whitespace — No tag IDs were supplied and Tag IDs are required to get activities for tags. The body is a plain string. |
400 | Bad request | An entry in tagIds is not an integer — One or more of the tag IDs supplied was invalid. Tag IDs can only be numeric.. The check runs over every entry before any lookup, so a single non-numeric value rejects the whole request. |
500 | Internal server error | The activity or translation read failed. The body is empty. Note that unrecognised tag ids do not cause this — they are silently dropped. |