--- title: "Book an Appointment" description: "Create an appointment for a patient using a timeslot found in the availability flow." canonical_url: "http://localhost/api/quickstart/book-appointment" --- # Book an Appointment > Create an appointment for a patient using a timeslot found in the availability flow. Learn how to create appointments for patients using available timeslots. This guide shows you how to book appointments once you've found available times. ## Flow Overview ![Book Appointment Flow](http://localhost/images/quickstart/book-appointment.png) ## Understanding Appointments - **Appointment**: A scheduled meeting between a patient and a healthcare resource - **Patient identifier (patient_id)**: Can be internal EHR ID or a typed identifier like `se_personal_number:*` (see [Patient ID guide](http://localhost/api/guides/patient-id)) - **Timeslot**: Must be available before booking ## Code Example ### Shared setup #### 1. Prepare the appointment payload #### 2. Create the appointment #### 3. Read key values from the response ## Key Insights ### Appointment Status Appointments can have different statuses: - **booked** - Successfully scheduled (most common) - **awaiting_confirmation** - Requires additional confirmation (some EHRs) - **completed** - Appointment has occurred - **cancelled** - Appointment was cancelled If you receive `awaiting_confirmation`, you may need to provide additional confirmation data. See the [Appointment Confirmation guide](http://localhost/api/guides/appointments/confirm-appointments) for details. ## Using `patient_id` formats `patient_id` can be provided in multiple formats: For more details on patient ID formats, see the [Patient ID Guide](http://localhost/api/guides/patient-id). ## Next steps Document the consultation on the patient's record. Reschedule or modify booked appointments. ## API Reference For detailed API documentation, see: - [Appointments API](https://api.leyr.io/docs#tag/Appointments) - [Patient ID Guide](http://localhost/api/guides/patient-id) ## Sitemap See the full [sitemap](http://localhost/sitemap.md) for all pages.