Locations
Delete location
Delete location using Ovok’s Slim API.
| Method | Path |
|---|---|
DELETE | /v1/slim/location/:id |
Authentication · Access policies
Deletes a location that has no devices attached.
Auth: Bearer token. The caller must be a project admin or super admin. The access policy must grant Location:delete and Device:update (admins and super admins skip the access-policy check, so in practice only the admin role matters).
Scope: The location must belong to the caller's project (from the token).
Request
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | Location id. |
Behaviour
- Detach every device first (
PUT /v1/slim/location/{id}with"deviceId": []). A location with a device attached is refused. - The Location resource is deleted.
- The write is atomic and takes a short write lock. A concurrent write to the same location gets a 409.
- A location-deleted entry is added to the change history. A failure to write that entry does not fail the request.
- The response has no body.
Example
curl -X DELETE 'https://api.sandbox.ovok.com/v1/slim/location/5d2a9c64-7e1b-4830-b6f5-9a3c1e8d7b02' \
-H "Authorization: Bearer ${OVOK_TOKEN}"Successful response
200 — Location deleted. The response has no body.
Errors
| Status | Meaning |
|---|---|
400 | The FHIR backend refuses the delete. |
401 | Bearer token is missing, invalid or expired. |
403 | You are not an admin or super admin, you lack Location:delete or Device:update, or the location does not exist or is outside your project. |
409 | Another write holds the location. Retry. |
422 | id is not a UUID, or devices are still at the location. |
Last updated on