Cancel Appointment
Use Cancel Appointment to cancel a scheduled appointment or pending request.
Cancellation availability, late-cancellation rules, and reason options derive from the appointment state and cancellation configuration.
This screen includes:
| # | Element | Description |
|---|---|---|
| 1 | Cancellation reason selector | Displays available cancellation reasons |
| 2 | Free-text reason field | Displays when Other is selected |
| 3 | Late cancellation notice | Displays charge information when applicable |
| 4 | Confirm cancellation action | Submits the cancellation request |
| 5 | Keep appointment action | Dismisses the cancellation flow |
| 6 | Confirmation state | Displays successful cancellation state |
| 7 | Read-only state | Disables actions after cancellation or expiry |
Workflow
- Open Appointment Details.
- Select Cancel request or Cancel appointment.
- Render cancellation configuration.
- Select a cancellation reason.
- Enter additional details when required.
- Display late cancellation notice when applicable.
- Submit the cancellation request.
- Refresh the appointment state.
Cancellation behavior
| Scenario | Behavior |
|---|---|
| Pending request inactive | Transition request to expired state |
| Late cancellation window reached | Display charge notice |
| Appointment canceled | Disable appointment actions |
| Alternative visit supported | Display alternative visit dialog |
Validations
These scenarios define when the SDK blocks cancellation submission or returns validation state.
| Scenario | App Behavior | SDK Output |
|---|---|---|
| No cancellation reason selected. | The primary action remains disabled. | Validation state indicating missing cancellation reason. |
| Reason is Other (please specify) and text is empty. | The primary action remains disabled and the text box shows an inline error. | Validation error for missing free-text reason. |
| Reason is not Other (please specify). | The text box remains hidden. | Page model without free-text field. |
| Cancellation occurs inside the late cancellation window. | The screen displays a charge notice before final confirmation. | Page model with late-cancellation flag and charge notice content. |
| Appointment state does not allow cancellation. | Cancellation remains blocked and an error appears. | Error state indicating cancellation is not permitted. |
| Appointment already canceled or expired. | Actions remain disabled. | Appointment state canceled or expired with read-only actions. |
Actions
These scenarios define how the SDK applies cancellation or returns expiration state.
| Scenario | App Behavior | SDK Output |
|---|---|---|
| Open cancellation flow. | The cancellation UI renders with available reasons. | Page model for cancellation with reason options. |
| Select a cancellation reason. | The selection updates. | Update set with selected reason state. |
| Enter free-text reason. | The free-text value updates. | Update set with free-text reason value. |
| Confirm cancellation with valid input. | The appointment transitions to canceled and becomes read-only. | Update set with appointment state canceled and navigation back to details. |
| Pending request reaches inactivity timeout. | The item becomes read-only in appointment details. | Appointment state expired with actions disabled. |
| Cancellation request fails. | The screen remains open and an error appears. | Error state with no navigation instruction. |
Endpoint Resources
Cancel Appointment
PUT
v3/appointments/{appointment-id}/cancel
Returns the cancellation popup for the selected appointment.
Looking for Alternative
PUT
v3/appointments/{appointment-id}/cancel/looking-for-alternative
Shows an info popup that the platform continues looking for an alternative video visit.
Update Reason
PATCH
v3/appointments/{appointment-id}/cancel/change-reason
Updates the selected cancellation reason and refreshes the popup content.
Cancel Appointment
POST
v3/appointments/{appointment-id}/cancel
Cancels the appointment with the provided reason, date, and comments.
