Get timebands

GET /api/booking-sheets/timebands

Success: 200 OK

Overview

Lists the time bands configured for your sites. A time band is a named period of the day — an off-peak morning, a peak evening — that a booking sheet is divided into, and it is the unit you work in when you block time out.

Its main use is to find the timeBandId values that Create one or more booking sheet exceptions will accept. That endpoint only accepts bands whose restrictEntry is true, so call this with restrictedOnly=true before building an exception request rather than guessing an id and taking a 400.

Time bands are configuration rather than live data, so a band created moments ago may not appear in this list straight away.

Endpoint

GET {base_url}/api/booking-sheets/timebands

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

Query parameters

NameTypeRequiredDescription
restrictedOnlybooleanNoFilters by whether the band restricts entry. Careful: this is a three-way switch, not a flag. Omit it and you get every band; send true and you get only entry-restricted bands — the ones booking sheet exceptions can be created against; send false and you get only the bands that are not entry-restricted. Sending false is therefore not the same as leaving it out.

Sample request

cURL
curl -X GET '{base_url}/api/booking-sheets/timebands' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'

Response fields

FieldTypeDescription
[].idstringThe time band's identifier, and the value to send as times[].timeBandId when creating booking sheet exceptions. It is a configured code rather than a generated number, so treat it as opaque and read it from this endpoint rather than hard-coding it.
[].descriptionstringThe band's name as configured by the operator — what a member of staff would call it, such as Peak or Off Peak Morning. Intended for display; it carries no times of its own and is not usable as an identifier.
[].restrictEntrybooleanWhether the band can have entry restricted during it, which is what makes it usable for booking sheet exceptions. Only bands with true are accepted as times[].timeBandId by Create one or more booking sheet exceptions; sending an id where this is false fails with One or more TimeBand IDs do not exist or are not marked as entry restricted.

Sample response

200 OK
[
  {
    "id": "PEAK",
    "description": "Peak",
    "restrictEntry": true
  },
  {
    "id": "OFFPEAK",
    "description": "Off Peak",
    "restrictEntry": false
  }
]

Errors

StatusMeaningWhen
500Internal server errorAny unexpected server-side failure, with an empty body — including the case where no time bands are configured at all, which returns 500 rather than 404. An empty array is returned only when bands exist and none match restrictedOnly.

This page as markdown · All pages · llms.txt