Delete site

DELETE /api/configuration/sites/{all}

Overview

Deletes a site outright. There is no soft delete and no undo: the site is removed, together with its amenity, facility and organisation mappings and its site-scoped system configuration. Seven configuration keys are deliberately left behind because the platform recreates them automatically — SiteAddress, SiteLatitude, SiteLongitude, SiteManagerEMail, SiteTaxNumber, SiteTelephoneNumber and SiteUrl.

A site that belongs to a site group cannot be deleted. The endpoint checks site-group membership before it touches anything and returns 409 if the site is a member of one, so remove the site from its group with Update site group first, then delete the site.

Deleting a site that is not there returns 404, not a silent success — so repeating a delete that already worked gives you 404. A successful call returns 204 No Content with an empty body.

Endpoint

DELETE {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 to delete, matching the id returned by Retrieve all sites. Site identifiers are strings, not numbers.

Sample request

cURL
curl -X DELETE '{base_url}/api/configuration/sites/{all}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'

Errors

StatusMeaningWhen
400Bad requestThe id path segment is empty. The body is the literal string Id cannot be null or empty.
404Not foundNo site exists with that id, including when you repeat a delete that has already succeeded. The body is empty.
409ConflictThe site {siteId} belongs to a site group and cannot be deleted — take the site out of its site group first. Alternatively There are records linked to the ID {siteId} that are stopping the operation being completed, when the delete is refused because other records still reference the site.
500Internal server errorAny other unexpected server-side failure.

This page as markdown · All pages · llms.txt