Delete site
DELETE /api/configuration/sites/{all}
- Products: Operator (
FOH) - Features: Front of House Generic Access (
FOHGENERIC)
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
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The site to delete, matching the id returned by Retrieve all sites. Site identifiers are strings, not numbers. |
Sample request
curl -X DELETE '{base_url}/api/configuration/sites/{all}' \
-H 'Authorization: Bearer {accessToken}' \
-H 'X-Use-SSO: true'Errors
| Status | Meaning | When |
|---|---|---|
400 | Bad request | The id path segment is empty. The body is the literal string Id cannot be null or empty. |
404 | Not found | No site exists with that id, including when you repeat a delete that has already succeeded. The body is empty. |
409 | Conflict | The 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. |
500 | Internal server error | Any other unexpected server-side failure. |