How to Build Online Appointment Booking Across EHRs and Practice Management Systems with Unified.to's Healthcare API
·
Your product can show open appointment slots and book, reschedule and cancel appointments in a practice's own scheduling system through one connection. Slots are available from Aidbox, AWS HealthLake, Azure Health Data Services, Canvas Medical, Cliniko, Dentally, Docplanner, DrChrono, EMIS, Gentu, Halaxy, Healthie, Labcorp, Medplum, Medtech ALEX, ModMed, Open Dental, Oracle Health, Semble, SMART on FHIR, TELUS Health CHR and Zus Health (Zus Health fetches a slot by ID and doesn't list slots), and appointments can be created on integrations including Cliniko, DrChrono, Elation Health, Healthie, Open Dental and Tebra (as of 26 October 2026).
sdk.healthcare.listHealthcareSlots and sdk.healthcare.createHealthcareAppointment use the same Slot and Appointment objects on each of them; filters and writable fields vary by system. Every request is executed directly against the practice's system, so a slot you show was open when you read it and a booking is on the practice's calendar when the request returns.
Why write bookings into the practice's own scheduling system?
Patient-acquisition marketplaces, digital front doors, telehealth platforms, referral tools and AI receptionists all end in the same action: put a patient in an actual slot on a clinician's calendar. A booking that lives only in your product, or reaches the practice as an email, is a booking someone has to re-enter, and sometimes double-book.
Each scheduling system models availability differently: some publish slots, some publish working hours you have to subtract appointments from, and each has its own rules about which fields a booking needs. Unified.to's Healthcare API returns availability as a Slot object and bookings as an Appointment object, so you build the flow once.
What are the steps to build online booking?
- Authorize the practice's system and store one connection ID
- Let the patient choose a clinician and location
- Show open slots for a date range
- Book the appointment, then reschedule or cancel it on request
- Keep your view of the calendar current
Connect once
import { UnifiedTo } from '@unified-api/typescript-sdk';
import * as errors from '@unified-api/typescript-sdk/sdk/models/errors';
const sdk = new UnifiedTo({
security: { jwt: process.env.UNIFIED_API_KEY },
});
Each practice authorizes their own system through Unified.to's authorization component, which returns a connection ID. Store one per practice. List clinicians with listHealthcarePractitioners and locations with listHealthcareLocations to build the choices (see How to Build a Provider Directory).
Show open slots
const slots = await sdk.healthcare.listHealthcareSlots({
connectionId,
practitionerId,
locationId,
startGte: '2026-11-02T00:00:00Z',
endLt: '2026-11-09T00:00:00Z',
});
const open = slots.filter((slot) => slot.status === 'FREE');
status is FREE, BUSY, BUSY_UNAVAILABLE, BUSY_TENTATIVE or ENTERED_IN_ERROR; offer only FREE slots. start_at and end_at are the slot's time, service_types the kinds of visit it can be booked for, and is_overbooked marks a slot that's already been double-booked.
Always pass a date range. Slot filters vary by integration:
| Slot filter | Integrations | As of |
|---|---|---|
| Practitioner and location | Cliniko, DrChrono, Halaxy, Medplum, ModMed, Oracle Health, Semble, TELUS Health CHR | 26 October 2026 |
| Practitioner only | Dentally, Gentu, Healthie, Open Dental | 24 October 2026 |
| Location only | Docplanner, Labcorp | 26 October 2026 |
| Slots returned without a practitioner or location | Aidbox, AWS HealthLake, Azure Health Data Services, Canvas Medical, SMART on FHIR and others | 26 October 2026 |
| Slots fetched by ID only, not listed | Zus Health | 26 October 2026 |
| A filter is required to list slots | Cliniko, Dentally, Docplanner, DrChrono, EMIS, Gentu, Labcorp, TELUS Health CHR | 26 October 2026 |
| The Supported Integrations page lists filters per integration; check it before you design the picker. |
Book the appointment
const appointment = await sdk.healthcare.createHealthcareAppointment({
connectionId,
healthcareAppointment: {
patient_id: patientId,
practitioner_ids: [slot.practitioner_id!],
location_id: slot.location_id,
slot_ids: [slot.id!],
start_at: slot.start_at,
end_at: slot.end_at,
status: 'BOOKED',
service_types: slot.service_types,
description: 'New patient visit',
},
});
Systems differ in what a booking needs. Send everything you have from the slot, and read the writable fields per integration from the capability matrix before you design your booking form.
patient_id must already exist in the practice's system. Look the patient up first, and register them if they're new (see How to Find and Register Patients).
Reschedule and cancel
Reschedule by updating the time:
await sdk.healthcare.updateHealthcareAppointment({
connectionId,
id: appointment.id!,
healthcareAppointment: { start_at: newSlot.start_at, end_at: newSlot.end_at },
});
Cancel by setting status: 'CANCELLED' with an update (and a cancellation_reason where the system keeps one), or by removing the appointment where the system supports delete. Cliniko, Dentally, Docplanner, DrChrono, Elation Health, Healthie, IntakeQ, Medtech ALEX, Semble and Tebra accept deletes (as of 24 October 2026); on the others, cancel by status.
Read the calendar
const upcoming = await sdk.healthcare.listHealthcareAppointments({
connectionId,
patientId,
startGte: new Date().toISOString(),
});
Appointment lists filter by patientId, practitionerId, locationId, status and a startGte/endLt window; which filters each system honours is in the capability matrix. Epic, Oracle Health, Jane and several others return appointments read-only, which is enough for reminders and visit preparation.
What if a practice's system doesn't publish slots?
Fall back to a request form on 501. A system that doesn't publish slots returns 501 Not Implemented for slots; fall back to a request-a-time form for those practices instead of showing an empty calendar.
try {
return renderSlots(await sdk.healthcare.listHealthcareSlots({ connectionId, startGte, endLt }));
} catch (error) {
if (error instanceof errors.UnifiedToError && error.statusCode === 501) {
return renderRequestForm();
}
throw error;
}
Expect the slot to be gone. Another patient can book between your read and your write. Treat a failed create as "slot taken" and re-read availability.
How do I know when the practice's calendar changes?
Halaxy sends native webhooks for appointment changes. On Canvas Medical, Cliniko, Dentally, DrChrono, IntakeQ, Open Dental, Semble, SMART on FHIR and TietoEVRY Lifecare, Unified.to's virtual webhooks for healthcare_appointment detect changes for you, and updatedGte returns only appointments changed since a timestamp (as of 24 October 2026). On integrations without webhooks, read on a schedule; the support matrix lists which ones have them.
→ Start your 30-day free trial → Book a demo
Frequently asked questions
Can I book on a system that doesn't return slots?
Where appointments can be created, yes: send start_at, end_at and the clinician, and the system applies its own rules. Without slots you can't show availability, so confirm the time with the practice's own response.
Does Unified.to hold the booking?
No. The appointment is written to the practice's system when you make the request, and Unified.to keeps no customer records at rest; connection credentials and operational metadata are encrypted at rest. A HIPAA BAA is available on Scale.