Skip to main content
POST
/
encounters
/
{id}
/
cancel
  curl -X POST "https://api.wizlo.example.com/encounters/12345/cancel" \
  -H "Authorization: Bearer <your_access_token>" \
  -H "Content-Type: application/json" \
  -d ''
{
  "id": 1,
  "gfeId": "ES00000001",
  "clinicId": "550e8400-e29b-41d4-a716-446655440000",
  "providerId": "770e8400-e29b-41d4-a716-446655440002",
  "reviewType": "synchronous",
  "serviceQueue": "internal_staff",
  "patientId": "990e8400-e29b-41d4-a716-446655440004",
  "additionalNotes": "Patient reported improvement",
  "reviewerId": "990e8400-e29b-41d4-a716-446655440004",
  "isActive": false,
  "status": "cancelled",
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2024-01-02T15:30:00.000Z",
  "createdBy": "770e8400-e29b-41d4-a716-446655440002",
  "updatedBy": "api-client-uuid-here",
  "zoomMeetingUrl": "https://zoom.us/j/123456789?pwd=xxx",
  "zoomMeeting": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "meetingId": "123456789",
    "topic": "Dr. Smith - John Doe Consultation",
    "startUrl": "https://zoom.us/s/123456789?zak=xxx",
    "joinUrl": "https://zoom.us/j/123456789?pwd=xxx",
    "password": "abc123",
    "startTime": "2024-01-15T14:00:00.000Z",
    "duration": 30,
    "timezone": "America/Los_Angeles",
    "status": "cancelled",
    "createdAt": "2024-01-01T00:00:00.000Z",
    "updatedAt": "2024-01-02T15:30:00.000Z"
  },
  "latestReview": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "encounterId": 1,
    "note": "Patient consultation completed successfully",
    "medical_decision_type": "injectables",
    "medical_decision_note": "All treatments approved",
    "createdAt": "2024-01-01T00:00:00.000Z",
    "updatedAt": "2024-01-01T00:00:00.000Z",
    "createdBy": "770e8400-e29b-41d4-a716-446655440002"
  },
  "latestTreatments": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "encounterId": 1,
      "treatmentId": "123e4567-e89b-12d3-a456-426614174000",
      "status": "indicated",
      "status_note": "Patient meets criteria",
      "icd": "E11.9",
      "createdAt": "2024-01-01T00:00:00.000Z",
      "createdBy": "770e8400-e29b-41d4-a716-446655440002"
    }
  ],
  "documents": [],
  "clientNotes": [],
  "encounterAppointment": null,
  "latestVitals": null,
  "order": null
}

Overview

This endpoint can be used to cancel an encounter. Behavior:
  • Validation: Checks if the encounter exists and is in a cancellable state.
  • Cancellable Statuses: An encounter can only be cancelled if its current status is awaiting, in_review, processing, or missing_id.
  • State Update: Updates the encounter status to cancelled.
  • Restrictions: If the encounter is already completed, cancelled, or rejected, the request will fail.

Headers

This endpoint uses Machine-to-Machine (M2M) authentication.
Authorization
string
required
Standard Bearer token (e.g., Bearer <your_access_token>). See the M2M Authentication guide for details on generating this token.
Content-Type
string
required
Must be set to application/json.

Path Parameters

id
number
required
The unique numeric ID of the encounter to cancel.

Response Parameters

The response returns the updated Encounter object.
id
number
The unique identifier of the encounter.
gfeId
string
The unique Good Faith Exam (GFE) identifier (e.g., ES00000001).
status
string
The new status of the encounter (e.g., cancelled).
isActive
boolean
Indicates if the encounter record is currently active.
clinicId
string
UUID of the clinic.
patientId
string
UUID of the patient.
reviewerId
string
UUID of the assigned reviewer.
providerId
string
UUID of the provider (optional).
reviewType
string
The type of review (e.g., synchronous).
serviceQueue
string
The queue this encounter belongs to (e.g., internal_staff).
additionalNotes
string
Any notes added during creation.
createdAt
string
ISO 8601 timestamp of creation.
updatedAt
string
ISO 8601 timestamp of the last update (cancellation time).
createdBy
string
UUID of the user who created the encounter.
updatedBy
string
UUID of the user (or API Client) who performed the cancellation.
zoomMeetingUrl
string
Direct URL to join the Zoom meeting (if applicable).
zoomMeeting
object
Full details of the associated Zoom meeting.
latestReview
object
Details of the latest review performed on this encounter.
latestTreatments
array
List of treatments associated with this encounter.
documents
array
Documents linked to this encounter.
clientNotes
array
Notes visible to the client/patient.
encounterAppointment
object
Details of the appointment linked to this encounter.
latestVitals
object
Most recent vital signs recorded for the patient.
order
object
Associated order details.

Status Codes

StatusDescription
200OK. Encounter cancelled successfully.
400Bad Request. Encounter cannot be cancelled (e.g., already completed, cancelled, rejected, or invalid state).
401Unauthorized. Authentication required - Missing or invalid JWT token.
403Forbidden. Insufficient permissions or encounter belongs to a different tenant.
404Not Found. Encounter with specified ID not found.
  curl -X POST "https://api.wizlo.example.com/encounters/12345/cancel" \
  -H "Authorization: Bearer <your_access_token>" \
  -H "Content-Type: application/json" \
  -d ''
{
  "id": 1,
  "gfeId": "ES00000001",
  "clinicId": "550e8400-e29b-41d4-a716-446655440000",
  "providerId": "770e8400-e29b-41d4-a716-446655440002",
  "reviewType": "synchronous",
  "serviceQueue": "internal_staff",
  "patientId": "990e8400-e29b-41d4-a716-446655440004",
  "additionalNotes": "Patient reported improvement",
  "reviewerId": "990e8400-e29b-41d4-a716-446655440004",
  "isActive": false,
  "status": "cancelled",
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2024-01-02T15:30:00.000Z",
  "createdBy": "770e8400-e29b-41d4-a716-446655440002",
  "updatedBy": "api-client-uuid-here",
  "zoomMeetingUrl": "https://zoom.us/j/123456789?pwd=xxx",
  "zoomMeeting": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "meetingId": "123456789",
    "topic": "Dr. Smith - John Doe Consultation",
    "startUrl": "https://zoom.us/s/123456789?zak=xxx",
    "joinUrl": "https://zoom.us/j/123456789?pwd=xxx",
    "password": "abc123",
    "startTime": "2024-01-15T14:00:00.000Z",
    "duration": 30,
    "timezone": "America/Los_Angeles",
    "status": "cancelled",
    "createdAt": "2024-01-01T00:00:00.000Z",
    "updatedAt": "2024-01-02T15:30:00.000Z"
  },
  "latestReview": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "encounterId": 1,
    "note": "Patient consultation completed successfully",
    "medical_decision_type": "injectables",
    "medical_decision_note": "All treatments approved",
    "createdAt": "2024-01-01T00:00:00.000Z",
    "updatedAt": "2024-01-01T00:00:00.000Z",
    "createdBy": "770e8400-e29b-41d4-a716-446655440002"
  },
  "latestTreatments": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "encounterId": 1,
      "treatmentId": "123e4567-e89b-12d3-a456-426614174000",
      "status": "indicated",
      "status_note": "Patient meets criteria",
      "icd": "E11.9",
      "createdAt": "2024-01-01T00:00:00.000Z",
      "createdBy": "770e8400-e29b-41d4-a716-446655440002"
    }
  ],
  "documents": [],
  "clientNotes": [],
  "encounterAppointment": null,
  "latestVitals": null,
  "order": null
}