# Appointments

The appointment workflow: create, list, read, reschedule, cancel, and change appointment status. The appointment id is also the public key for visit/payment operations because appointments without a client can still be paid.

 - [POST /locations/{location_id}/appointments](https://developer.alteg.io/en/b2b-v3/openapi/appointments/createappointment.md): Creates an appointment for a client with a Team Member at a chosen start time. - **A client is optional.** Pass `client_id` of an existing client, an inline `client` object resolved attach-only by nor
 - [GET /locations/{location_id}/appointments](https://developer.alteg.io/en/b2b-v3/openapi/appointments/listappointments.md): Returns the appointments of the Location as a cursor-paginated list, newest window first by start time with a stable tie-breaker. Client contact data inside `expand[]=client` uses redacted contact fie
 - [GET /locations/{location_id}/appointments/{appointment_id}](https://developer.alteg.io/en/b2b-v3/openapi/appointments/getappointment.md): Returns a single appointment. `visit_id` links to the billing visit (it is `null` only on appointments created without a client). Re-read the appointment to obtain a fresh `visit_id` — visit grouping
 - [PATCH /locations/{location_id}/appointments/{appointment_id}](https://developer.alteg.io/en/b2b-v3/openapi/appointments/updateappointment.md): Edits or reschedules an appointment with a merge-patch body: start time, Team Member, services, duration, comment. The appointment status is **not** editable here — use the `status` command. Cancellat
 - [POST /locations/{location_id}/appointments/{appointment_id}/cancel](https://developer.alteg.io/en/b2b-v3/openapi/appointments/cancelappointment.md): Cancels an appointment as a command: the response is the appointment with `status: "cancelled"` and `cancelled_at` set. Optionally stores a `reason` and whether to notify the client. Requires `Idempot
 - [POST /locations/{location_id}/appointments/{appointment_id}/status](https://developer.alteg.io/en/b2b-v3/openapi/appointments/setappointmentstatus.md): Moves an appointment through its status lifecycle: `waiting` → `confirmed` → `arrived` / `no_show`. Marking a past visit as `arrived` finalizes it when nothing is left to pay (a fully paid or free vis
