Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/floriansalvi/HEIG-VD_Ocha-api/llms.txt

Use this file to discover all available pages before exploring further.

The Delete Store endpoint permanently removes a store from the Ocha platform. The operation is irreversible — there is no soft-delete or trash mechanism. On success the server responds with 204 No Content and an empty body. If the store does not exist, or if the supplied identifier is malformed, an error is returned before any deletion is attempted.
This endpoint requires administrator privileges. Include a valid admin JWT in the Authorization header as a Bearer token.

Endpoint

DELETE /api/v1/stores/:id

Path Parameters

id
string
required
The MongoDB ObjectId of the store to delete (24-character hex string, e.g. 64f1c2e9a1b2c3d4e5f12345).

Response — 204 No Content

The server returns 204 No Content with an empty body on successful deletion.

Error Codes

StatusDescription
400The supplied id is not a valid MongoDB ObjectId.
401No valid JWT was provided in the Authorization header.
403The authenticated user does not have admin privileges.
404No store exists with the given id.
500Unexpected server error.

Example

curl -X DELETE https://api.ocha.ch/api/v1/stores/64f1c2e9a1b2c3d4e5f12345 \
  -H "Authorization: Bearer <ADMIN_TOKEN>"
A successful request returns HTTP 204 with no response body.

Build docs developers (and LLMs) love