Documentation Index Fetch the complete documentation index at: https://mintlify.com/DUVAN100/saludya-api/llms.txt
Use this file to discover all available pages before exploring further.
Path Parameters
Unique identifier of the doctor to delete (e.g., “doc_8x9y2z3a4b5c6d7e”)
Query Parameters
Force deletion even if the doctor has associated schedules or appointments. Warning: Setting this to true will also delete all related schedules and cancel all future appointments. Use with caution.
Doctor ID to reassign future appointments to. If provided, appointments will be transferred instead of cancelled.
Response
Indicates whether the deletion was successful
ISO 8601 timestamp of when the deletion occurred
Number of appointments reassigned to another doctor (only present when reassign_to is used)
Number of appointments that were cancelled (only present when force=true)
cURL - Simple Delete
Force Delete
Delete with Reassignment
curl -X DELETE "https://api.saludya.com/api/doctors/doc_8x9y2z3a4b5c6d7e" \
-H "Authorization: Bearer YOUR_API_KEY"
Success Response - Simple Delete
Success Response - Force Delete
Success Response - With Reassignment
Error Response (404)
Error Response (409)
Error Response (400)
Error Response (401)
{
"success" : true ,
"message" : "Doctor successfully deleted" ,
"deleted_id" : "doc_8x9y2z3a4b5c6d7e" ,
"deleted_at" : "2024-03-06T17:30:00Z"
}
Deletion Behavior
Default Deletion
By default, the API will not allow deletion if:
The doctor has any upcoming appointments
The doctor has active schedules
The doctor has any associated records
Force Deletion (force=true)
When force deletion is enabled:
All associated schedules are deleted
All future appointments are cancelled
Past appointment records are preserved for historical purposes
Patients with cancelled appointments should be notified
Reassignment (reassign_to)
When reassigning appointments:
Only future appointments are reassigned
The target doctor must have the same or compatible specialty
Appointments are reassigned to available time slots
If no compatible slots exist, the operation fails
Patients should be notified of the doctor change
Important Warnings
Permanent Action : Deleting a doctor is a permanent action and cannot be undone. Make sure you have backed up any necessary data before proceeding.
Patient Impact : Deleting a doctor with active appointments will affect patients. Always use the reassign_to parameter when possible to minimize disruption.
Compliance : Ensure deletion complies with data retention policies and medical record regulations in your jurisdiction.
Best Practices
Check for appointments first - Use Get Doctor with include=appointments to see what will be affected
Prefer reassignment - Use reassign_to instead of cancelling appointments when possible
Archive instead of delete - Consider marking the doctor as unavailable using Update Doctor instead of deletion
Notify patients - Always notify affected patients when appointments are cancelled or reassigned