Skip to main content

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

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token: Bearer <token>

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier (MongoDB ObjectId)
labVisitIdstringYesLab 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