Update pricing timeband
PUT /api/configuration/timebands/{timebandId}
- Products: Operator (
FOH) - Features: Front of House Generic Access (
FOHGENERIC)
Overview
Replaces the configuration of one pricing timeband. A timeband is a named period that pricing and access control hang off: prices are held per timeband, and a timeband can additionally be flagged as one that denies swipe access at entry points.
This is a full replacement, not a partial update. Every field in the table below is written — including the ones you left out of the JSON. Omit description and it is set to null; omit restrictEntryInd and it is set to 0; omit translations and every translation held against the timeband is deleted. Fetch the current state with Get pricing timeband by ID first, apply your change to that object, and send the whole thing back.
The write is not all-or-nothing. The timeband is saved first, and only then are its translations deleted and re-created, so a bad translations entry can leave you with the field changes saved and no translations at all. See the 500 rows under Errors.
A successful call returns 204 No Content with an empty body.
Endpoint
PUT {base_url}/api/configuration/timebands/{timebandId}
{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
timebandId | string | Yes | The id of an existing timeband, as returned by List all pricing timebands. Up to 15 characters. Ids are upper case, but what you send is converted to upper case before the lookup, so peak and PEAK both resolve. No timeband with that id gives 404. Any id in the request body is ignored — this path value always wins. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
description | string | No | The name of the timeband as staff see it — "Peak", "Off peak", and so on. Validation rejects an empty string (A blank description is not allowed) and anything over 255 characters, but only 25 characters can be saved, so a description of 26–255 characters passes validation and then fails the save with 500. Treat 25 as the real limit. Leaving the field out of the body is not the same as leaving it alone: it passes validation as null and blanks the stored description. |
restrictEntryInd | integer (int32) | No | Whether this timeband denies swipe access at entry points: 0 for no, 1 for yes. Only values 0–255 can be saved. Omitting the field sends 0, which clears an existing restriction — send the current value back if you are not changing it. |
translations | array of object | No | Translated descriptions of this timeband for bilingual sites. The array you send replaces the stored set outright: every translation held against this timeband is deleted first, then the entries here are added. Omit the field, or send an empty array, and the timeband is left with no translations at all. |
translations[].type | string | No | The name of the field this entry translates. Use description — the retrieval endpoints only ever read back translations whose property is description, so an entry with any other value is saved and then never returned. Must not be null; a null fails with 500. |
translations[].culture | string | No | The culture code the translation is for, up to 20 characters, taken from Get all available cultures. A code the platform does not know fails with 500. Within one request, the combination of culture and type must be unique, or the save fails. |
translations[].text | string | No | The description as it should read in that culture. No length limit, but it must not be null. |
Sample request
curl -X PUT '{base_url}/api/configuration/timebands/{timebandId}' \
-H 'Authorization: Bearer {accessToken}' \
-H 'X-Use-SSO: true' \
-H 'Content-Type: application/json' \
-d '{
"description": "string",
"restrictEntryInd": 1,
"translations": [
{
"type": "string",
"culture": "string",
"text": "string"
}
]
}'Errors
Validation failures return a validation problem document (application/problem+json) with an errors map keyed by field name. Every other failure returns its message as a plain string body.
| Status | Meaning | When |
|---|---|---|
400 | Bad request | description is present but an empty string. Message: A blank description is not allowed. |
400 | Bad request | description is longer than 255 characters. Message: The pricing timeband description cannot be more than 255 characters. Between 26 and 255 characters you get 500 instead, not this. |
400 | Bad request | Malformed JSON, or a value of the wrong type for its field — for example a string in restrictEntryInd. |
404 | Not found | No timeband exists with the id in the path. Body: Record cannot be found. Nothing is written. |
500 | Internal server error | description is 26–255 characters, beyond the 25 characters that can be saved. The timeband is not updated, and its translations are not deleted either, because the failure happens first. |
500 | Internal server error | A translations[].culture is not a code the platform recognises, or type, culture or text is null. The timeband has already been saved and its old translations already deleted by this point, so you are left with the field changes applied and no translations. |
500 | Internal server error | Any other unexpected server-side failure. |