Get Cancellation Reasons¶
Retrieve a list of available appointment cancellation reasons with their associated fees.
Endpoint¶
Request¶
This endpoint does not require any parameters.
Example Request¶
curl -X GET \
https://api.example.com/apis/v1/appointment/appointment-cancellation \
-H 'Authorization: Bearer YOUR_TOKEN'
Response¶
Success Response¶
Status Code: 200 OK
{
"code": 2000,
"data": [
{
"id": 1,
"cancellation_fee": 0.0,
"reason_key": "CANCELLED_DUE_TO_WEATHER",
"reason_label": "Cancelled Due to Weather",
"status": null
},
{
"id": 2,
"cancellation_fee": 25.0,
"reason_key": "PATIENT_REQUEST",
"reason_label": "Patient Request",
"status": null
},
{
"id": 3,
"cancellation_fee": 50.0,
"reason_key": "NO_SHOW",
"reason_label": "No Show",
"status": null
},
{
"id": 4,
"cancellation_fee": 0.0,
"reason_key": "DOCTOR_UNAVAILABLE",
"reason_label": "Doctor Unavailable",
"status": null
},
{
"id": 5,
"cancellation_fee": 0.0,
"reason_key": "EMERGENCY",
"reason_label": "Emergency",
"status": null
}
]
}
Response Fields¶
| Field | Type | Description |
|---|---|---|
code |
number | Response status code (2000 for success) |
data |
array | Array of cancellation reason objects |
Cancellation Reason Object¶
| Field | Type | Description |
|---|---|---|
id |
number | Unique identifier for the cancellation reason |
cancellation_fee |
number | Fee amount charged for this cancellation reason |
reason_key |
string | Unique key for the cancellation reason (used in cancel API) |
reason_label |
string | Human-readable label for the cancellation reason |
status |
string/null | Status of the cancellation reason (null = active) |
Error Response¶
Status Code: 401 Unauthorized
Usage Flow¶
- Retrieve Cancellation Reasons: Call this endpoint to get available reasons
- Present Options: Display the reasons to users (admin/staff)
- Select Reason: User selects appropriate reason for cancellation
- Cancel Appointment: Use the selected
reason_key,reason_label, andcancellation_feein the Cancel Appointment API
Notes¶
- Cancellation reasons and fees are configured by clinic administrators
- The
statusfield determines if a reason is active (null/active) or inactive - Only active cancellation reasons should be presented to users
- Fees may vary based on clinic policies and reason types
- This endpoint should be called before each cancellation to ensure current data
Related Endpoints¶
- Cancel Appointment - Cancel an appointment using these reasons
- Create Appointment - Create a new appointment
- Get Categories - Get appointment categories