List all past bookings (v1.0)

GET /api/members/{memberId}/past-bookings

Success: 200 OK

Overview

Returns the bookings a member has already taken part in, as a plain JSON array — no envelope, no total count, no paging. A booking counts as past when its start time falls before the upper bound (dateTimeTo, which defaults to the moment you call), so a session that has started but not yet finished is included. The array is not sorted, so treat the order of the array as arbitrary and sort it yourself if it matters.

Reach for this when you are showing a member their own history. Each entry carries the activity and site display names, plus any translations configured against them, so you can render a list without a further call per booking. Authorisation requires the access token to belong to the member named in the path — you cannot read another member's history, including that of a member linked to the account you are authenticated as.

A newer version exists at GET /api/members/v2/{memberId}/past-bookings ("List all past bookings with pagination (v2.0)"), and new integrations should use it: it accepts limit and offset, wraps the bookings in an object carrying navigation URLs and a total, and orders them newest first. Two concrete differences to weigh before you switch. v2.0 does not return activityTranslations, siteName or siteTranslations — only this version does. And v2.0 rejects an offset that is not less than the total number of matching bookings, so a member with nothing in range gets a 400 there where this version simply returns [].

Endpoint

GET {base_url}/api/members/{memberId}/past-bookings

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

Path parameters

NameTypeRequiredDescription
memberIdinteger (int32)YesThe member whose booking history you want. Existence is checked before anything else, so an unknown id fails with 404 rather than returning an empty list; a member who exists but has nothing in range returns 200 and [].

Query parameters

NameTypeRequiredDescription
dateTimeFromstring (date-time)NoInclusive lower bound applied to each booking's start time (startDateTime >= dateTimeFrom). Must be strictly in the past — a value at or after the current UTC time is rejected with 400. Omit it to apply no lower bound and return the member's whole history.
dateTimeTostring (date-time)NoExclusive upper bound applied to each booking's start time (startDateTime < dateTimeTo). Must not be in the future and must not be earlier than dateTimeFrom. Omit it and it defaults to the current UTC time, which is what makes the result past bookings. Because it filters on start time only, a booking that started before this bound but finishes after it is still returned.

Sample request

cURL
curl -X GET '{base_url}/api/members/{memberId}/past-bookings' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'

Response fields

FieldTypeDescription
[].bookingIdinteger (int32)Identifier of the booking this entry records. This is the value other bookings endpoints accept as a booking id.
[].bookingRefinteger (int32)The reference held against this member's place on the booking, not against the booking itself — do not use it to identify a booking, use bookingId. An entry with no reference held comes back as 0 rather than null.
[].activityIdstringIdentifier of the activity that was booked. It is the same activity identifier the booking restrictions endpoints take as activityId, so you can feed it straight back in to check whether the member may book that activity again.
[].activityNamestringThe activity's short description — display text, not an identifier, and not translated. Use activityTranslations when rendering in another language.
[].activityDescriptionstringThe activity's long description: the fuller free-text version of activityName, likewise untranslated.
[].activityTranslationsarray of objectTranslated text configured against the activity. Every translation held for it is returned, not just one language, so filter to the culture you are rendering. You receive an empty array, never null, when no translations are configured.
[].activityTranslations[].typestring
[].activityTranslations[].culturestringThe culture this entry's text is written for. No fallback entry is added, so when the culture you want is absent, fall back to activityName or activityDescription yourself.
[].activityTranslations[].textstringThe translated activity text for that culture.
[].startDateTimestring (date-time)When the booked session starts. This is the only field the dateTimeFrom and dateTimeTo filters are applied to, and the field v2.0 sorts on.
[].endDateTimestring (date-time)When the booked session ends. Returned for display only — neither date filter looks at it.
[].siteIdstringIdentifier of the site the booked activity belongs to, read from the activity rather than from the booking.
[].siteNamestringThe site's description — display text, untranslated. v2.0 does not return this field.
[].siteTranslationsarray of objectTranslated text configured against the site, in the same shape as activityTranslations, and likewise an empty array when none is configured. v2.0 does not return this field.
[].siteTranslations[].typestring
[].siteTranslations[].culturestringThe culture this entry's site text is written for.
[].siteTranslations[].textstringThe translated site text for that culture.

Sample response

200 OK
[
  {
    "bookingId": 12345,
    "bookingRef": 1,
    "activityId": "string",
    "activityName": "string",
    "activityDescription": "string",
    "activityTranslations": [
      {
        "type": "string",
        "culture": "string",
        "text": "string"
      }
    ],
    "startDateTime": "2026-08-14T19:00:00Z",
    "endDateTime": "2026-08-14T19:00:00Z",
    "siteId": "string",
    "siteName": "string",
    "siteTranslations": [
      {
        "type": "string",
        "culture": "string",
        "text": "string"
      }
    ]
  }
]

Errors

StatusMeaningWhen
400Bad requestdateTimeFrom is at or after the current UTC time ("The supplied dateTimeFrom must be in the past"), dateTimeTo is in the future ("The supplied dateTimeTo must be in the past"), or dateTimeFrom is later than dateTimeTo ("dateTimeTo must be in the past and after dateTimeFrom").
404Not foundNo member exists with the supplied memberId — "Member ID {memberId} does not exist". Checked before the date parameters are validated, so this wins over a 400.
500Internal server error

This page as markdown · All pages · llms.txt