# Appointment

object type

An Appointment — a booking of 1..8 SchedulableResources at an LF for a time window: a service-type product sale (purpose service — variantId REQUIRED, the styleType walk gates it) OR an order pickup (purpose pickup — orderId REQUIRED, the order being collected). The ratified lifecycle VERBATIM: confirm reserves capacity (the RESBOOK calendar rows; the gate is CAPACITY-ONLY — CONFLICT/DOUBLE_BOOKED unless the appointment.overbook_allowed policy admits); no_show fires from the scheduler ONLY (noShowAt = startAt + the appointment.no_show_window_minutes policy, stamped at confirm — NO caller op); rescheduled = a DOOMED terminal superseded by the linked successor (born requested — ITS confirm re-runs the capacity gate); completed may LINK an order for billing (the complete-time orderId — auto-minting a line is a named growth). durationMinutes ≤ 1440 (24h — the overlap-lookback bound). The create-time gates: appointment.lead_time_minutes + appointment.max_advance_days.

## Fields

| Field | Type | Notes |
| --- | --- | --- |
| `id` | [ID](/types/#scalars) `ID!` | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
| `sysId` | [String](/types/#scalars) `String!` | The group-scoped human-facing system id (AP-…). |
| `type` | [String](/types/#scalars) `String!` | The kind of record — always `Appointment` here. |
| `caption` | [String](/types/#scalars) `String!` | The record’s display name — what people see it called. |
| `status` | [String](/types/#scalars) `String!` | The FSM state: requested \| confirmed \| in_progress \| completed \| no_show \| cancelled \| rescheduled. |
| `parentId` | [ID](/types/#scalars) `ID!` | The parent LogicalFacility; rootId = the org group; parentId!== rootId always. |
| `rootId` | [ID](/types/#scalars) `ID!` | The org-group family root. |
| `createdAt` | [String](/types/#scalars) `String!` | When the record was created, as a UTC timestamp. |
| `updatedAt` | [String](/types/#scalars) `String!` | When the record last changed, as a UTC timestamp. |
| `revisionNum` | [Int](/types/#scalars) `Int!` | How many times this record has been edited; the first save is 0. |
| `revision` | [ID](/types/#scalars) `ID!` | The OCC revision token — supply it on every mutation of this record; rotates on every write. |
| `refCaptions` | [RefCaption](/types/RefCaption/) `[RefCaption!]!` | The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption. |
| `organizationId` | [ID](/types/#scalars) `ID!` | The LF’s Organization — SERVER-stamped at create (the weld; the policy chain’s key). |
| `purpose` | [AppointmentPurpose](/types/AppointmentPurpose/) `AppointmentPurpose!` | The booking purpose (service \| pickup) — IMMUTABLE at birth (re-purpose = cancel + rebook). |
| `variantId` | [ID](/types/#scalars) | The service-type product variant sold: REQUIRED on service, FORBIDDEN on pickup. |
| `orderId` | [ID](/types/#scalars) | The linked Order: REQUIRED on pickup (the order being collected); optional on service (sold-together at create/update, or book-then-bill at complete). |
| `resourceIds` | [ID](/types/#scalars) `[ID!]!` | The booked SchedulableResources (1..8, distinct; each in-tenant + ACTIVE + at the SAME LF as the parent). |
| `startAt` | [String](/types/#scalars) `String!` | The window start — a UTC ISO-8601 instant (the estate carries no timezone; working hours are advisory). |
| `durationMinutes` | [Int](/types/#scalars) `Int!` | The window length in minutes (1..1440 — the 24h cap IS the overlap-query lookback bound). |
| `customer` | [OrderCustomer](/types/OrderCustomer/) | The polymorphic customer capture (the Order block VERBATIM — inline fields + the corporateCustomerId/consumerId ref arms); optional (a pickup’s customer is the order’s). |
| `noShowAt` | [String](/types/#scalars) | SYSTEM-stamped at confirm = startAt + the resolved appointment.no_show_window_minutes — the scheduler marks no_show at this instant if the appointment is still confirmed. |
| `successorAppointmentId` | [ID](/types/#scalars) | SYSTEM-stamped by reschedule on the superseded terminal — the linked successor (the ratified pair). |
| `predecessorAppointmentId` | [ID](/types/#scalars) | SYSTEM-stamped on a reschedule-born successor — the appointment it supersedes. |

## Used by

- [appointment](/reference/appointment/appointment/)
- [cancelAppointment](/reference/appointment/cancelAppointment/)
- [completeAppointment](/reference/selling/completeAppointment/)
- [confirmAppointment](/reference/appointment/confirmAppointment/)
- [createAppointment](/reference/appointment/createAppointment/)
- [startAppointment](/reference/appointment/startAppointment/)
- [updateAppointment](/reference/appointment/updateAppointment/)
