API v1
v1
View as Markdown

Delete a location

DELETE /api/v1/locations/{location}

Remove a location that holds no other and that no possession has stayed at.

A location holding others answers 422 on location, saying how many and that they must be moved first, for instance "1 location is inside it. Move it first." Nothing is moved on your behalf.

A location any stay of a possession refers to, current or past, answers 422 on location as well, for instance "1 stay of a possession is here. Correct or delete it first." The history of a possession is never lost on your behalf.

The deletion is final, and the account log keeps the name of the location.

Path parameters

Sent as JSON. Anything not listed here is ignored.

location uuid Required

The id of the location. A location belonging to somebody else answers 404.

Returns

Nothing. A location holding others or referred to by a stay answers 422, and one belonging to somebody else answers 404.

Rate limit

Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in X-RateLimit-Remaining.

DELETE
curl https://my.monicahq.com/api/v1/locations/e83a1f6d-27c4-4b95-8d02-6f1b9c4e7a58 \
-X DELETE \
-H "Authorization: Bearer $MONICA_TOKEN"
const response = await fetch('https://my.monicahq.com/api/v1/locations/e83a1f6d-27c4-4b95-8d02-6f1b9c4e7a58', {
method: 'DELETE',
headers: { Authorization: `Bearer ${token}` },
})
$response = Http::withToken($token)->delete('https://my.monicahq.com/api/v1/locations/e83a1f6d-27c4-4b95-8d02-6f1b9c4e7a58');
Response 204
[]

Keys act as you, with exactly the access you have. Make one per integration so you can revoke it alone.