Update site

PUT /api/configuration/sites/{all}

Overview

Updates a site — a physical leisure centre — including its address, geographic position, contact details, public-facing links and the amenities, facilities and organisations attached to it.

This is mostly a merge, with two fields that are not. Every string field, and isActive, is only written when you send a non-null value, so leaving one out genuinely means "no change". Two fields break that rule and are written on every call whatever you send:

Send both explicitly on every call. amenities, facilities and organisations follow the merge rule at the field level — omit them and the existing links are untouched — but each one you do send replaces that whole set, so an empty array removes every link of that kind.

address, location and contact are required as objects even when you are not changing anything inside them. Send at least "address": {}, "location": {} and "contact": {}, because the fields inside them are individually optional but the containers are not.

A successful update returns 204 No Content. Read the current state with Get site by ID first so you can send back the values you do not intend to change.

Endpoint

PUT {base_url}/api/configuration/sites/{all}

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

Path parameters

NameTypeRequiredDescription
siteIdstringYesThe site's identifier, as returned in id by List sites. Up to 15 characters. The value is converted to upper case before the lookup, so case in the URL does not matter. An empty value fails with 400; one that matches no site fails with 404.

Request body

FieldTypeRequiredDescription
namestringNoThe site's public name — the label a member sees when choosing a centre. Maximum 255 characters (Site name cannot be more than 255 characters); an empty string is rejected with Site name cannot be empty, though omitting the field or sending null leaves the stored name unchanged. description below is a separate field for longer text.
legalNamestringNoLegal name cannot be more than 255 characters.
vatIdstringNoVat ID cannot be more than 20 characters.
descriptionstringNoLonger free-text describing the site, held separately from name and used where a fuller blurb is wanted. Maximum 255 characters (Site description cannot be more than 255 characters). Omit it or send null to leave the stored text unchanged.
addressobjectYesThe site's postal address. The object itself is required on every call — omitting it fails with Address section is required — but every field inside it is optional, so send {} when you are not changing the address. Fields you leave out are not cleared.
address.addressLine1stringNoAddress line 1 cannot be more than 100 characters.
address.addressLine2stringNoAddress line 2 cannot be more than 100 characters.
address.addressLine3stringNoAddress line 3 cannot be more than 100 characters.
address.townCitystringNoTown/City cannot be more than 100 characters.
address.regionstringNoRegion cannot be more than 100 characters.
address.postalCodestringNoPostalCode cannot be more than 25 characters.
address.countrystringNoCountry cannot be more than 100 characters.
locationobjectYesThe site's geographic position, used for distance-based site searches. Required as an object — omitting it fails with Location section is required — but both fields inside are optional, so send {} to leave the position alone.
location.latitudestringNoLatitude cannot be more than 40 characters.
location.longitudestringNoLongitude cannot be more than 40 characters.
contactobjectYesThe site's public contact details. Required as an object — omitting it fails with Contact section is required — but both fields inside are optional, so send {} to leave them alone.
contact.telephonestringNoTelephone cannot be more than 100 characters.
contact.emailstringNoEmail cannot be more than 255 characters.
websiteUrlstringNoWebsiteUrl cannot be more than 255 characters.
logoUrlstringNoLogoUrl cannot be more than 255 characters.
termsConditionsUrlstringNoTerms and conditions cannot be more than 255 characters.
privacyPolicyUrlstringNoPrivacy policy URL cannot be more than 255 characters.
openActiveTaxModestringNoOpen active tax mode cannot be more than 100 characters.
isActivebooleanNoWhether the site is in service. false takes the site out of use. Omitting it or sending null leaves the stored value unchanged — unlike isWebVisible, this field does honour omission. Independent of isWebVisible: a site can be active but hidden from public search, or visible but inactive.
isWebVisiblebooleanNoWhether the site appears in public, web-facing site listings. Written on every call regardless: omitting it or sending null sets it to false, which removes the site from public listings even if you were only changing an address. Always send the value you want.
openingDatestring (date-time)NoThe date the site opens to the public. Only the date part is kept; any time component is discarded. Must be today or later, or the call fails with Site opening date cannot be in the past. — with one exception: re-sending the date already stored is accepted even when that date has passed, so a routine read-modify-write on an established site does not fail. Written on every call regardless: omitting it or sending null clears the stored date.
amenitiesarray of objectNoThe complete set of amenities to link to the site, such as parking or a café. Omit the field to leave the existing links untouched; send an array and it replaces them wholesale, so [] removes them all. Ids must be distinct — repeats fail with Unable to update site as Amenities with ID {ids} are duplicated — and must already exist, or the call fails with Unable to update the site with Amenities as the Amenity ID(s) {ids} do not exist.
amenities[].idinteger (int32)YesThe amenity's numeric identifier, taken from List site amenities. Amenities are a fixed reference list you select from, not free text you can invent here. An omitted id is read as 0, which then fails the existence check.
facilitiesarray of objectNoThe complete set of facilities to link to the site, such as a pool or a gym. Same replacement semantics as amenities: omit to leave untouched, send an array to replace the whole set, [] to clear it. Repeats fail with Unable to update site as Facilities with ID {ids} are duplicated; unknown ids fail with Unable to update a site with Facilities as the Facility ID(s) {ids} do not exist.
facilities[].idinteger (int32)YesThe facility's numeric identifier, taken from List site facilities. A fixed reference list, not free text. An omitted id is read as 0 and fails the existence check.
organisationsarray of objectNoThe complete set of organisations the site belongs to. Same replacement semantics as amenities: omit to leave untouched, send an array to replace the whole set, [] to clear it. Repeats fail with Unable to update site as Organisations with ID {ids} are duplicated; unknown ids fail with Unable to update a site with Organisations as the Organisation ID(s) {ids} do not exist.
organisations[].idinteger (int32)YesThe organisation's numeric identifier, taken from List organisations. An omitted id is read as 0 and fails the existence check.

Sample request

cURL
curl -X PUT '{base_url}/api/configuration/sites/{all}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "legalName": "string",
  "vatId": "string",
  "description": "string",
  "address": {
    "addressLine1": "string",
    "addressLine2": "string",
    "addressLine3": "string",
    "townCity": "string",
    "region": "string",
    "postalCode": "string",
    "country": "string"
  },
  "location": {
    "latitude": "string",
    "longitude": "string"
  },
  "contact": {
    "telephone": "string",
    "email": "member@example.com"
  },
  "websiteUrl": "string",
  "logoUrl": "string",
  "termsConditionsUrl": "string",
  "privacyPolicyUrl": "string",
  "openActiveTaxMode": "string",
  "isActive": true,
  "isWebVisible": true,
  "openingDate": "2026-08-14T19:00:00Z",
  "amenities": [
    {
      "id": 12345
    }
  ],
  "facilities": [
    {
      "id": 12345
    }
  ],
  "organisations": [
    {
      "id": 12345
    }
  ]
}'

Errors

StatusMeaningWhen
400Bad requestA field exceeds its maximum length, or name is an empty string. The body is a validation error object keyed by field name, carrying messages such as Site name cannot be more than 255 characters.
400Bad requestaddress, location or contact is missing — Address section is required, Location section is required or Contact section is required.
400Bad requestsiteId resolves to an empty value — Site ID cannot be empty.
400Bad requestopeningDate is in the past and differs from the date already stored — Site opening date cannot be in the past.
400Bad requestamenities, facilities or organisations repeats an id, or references one that does not exist. The message names the offending ids, for example Unable to update the site with Amenities as the Amenity ID(s) 4, 9 do not exist. Validation runs before any write, so nothing is applied.
404Not foundNo site has that siteId — Site ID: {siteId} cannot be found.
500Internal server errorAn unexpected server-side failure. Nothing is saved.

This page as markdown · All pages · llms.txt