Cancel Lab Visit (v1)
Method & Path
DELETE /api/v1/workspace/:workspaceId/labs/visits/:labVisitId
Actual backend path: /v1/workspace/:workspaceId/labs/visits/:labVisitId
Description
Cancel a lab visit. This performs a soft-delete and marks the visit as cancelled.
Authentication
Required: JWT token in Authorization header
Persona Access:
- Workspace Owner: Allowed
- Staff: Allowed (role-based)
Required Permissions:
labs.run
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer token: Bearer <token> |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier (MongoDB ObjectId) |
labVisitId | string | Yes | Lab visit identifier (MongoDB ObjectId) |
Response 204 No Content
No response body.
Common Errors
401 Unauthorized: Missing or invalid authentication token
403 Forbidden: Insufficient permissions (labs.run required)
404 Not Found: Workspace or lab visit not found
422 Validation Error: Invalid IDs or cannot cancel invoiced visit