AlmondTill/G3N API

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

FieldTypeNotes
idID ID!The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it.
sysIdString String!The group-scoped human-facing system id (AP-…).
typeString String!The kind of record — always Appointment here.
captionString String!The record’s display name — what people see it called.
statusString String!The FSM state: requested | confirmed | in_progress | completed | no_show | cancelled | rescheduled.
parentIdID ID!The parent LogicalFacility; rootId = the org group; parentId!== rootId always.
rootIdID ID!The org-group family root.
createdAtString String!When the record was created, as a UTC timestamp.
updatedAtString String!When the record last changed, as a UTC timestamp.
revisionNumInt Int!How many times this record has been edited; the first save is 0.
revisionID ID!The OCC revision token — supply it on every mutation of this record; rotates on every write.
refCaptionsRefCaption [RefCaption!]!The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption.
organizationIdID ID!The LF’s Organization — SERVER-stamped at create (the weld; the policy chain’s key).
purposeAppointmentPurpose AppointmentPurpose!The booking purpose (service | pickup) — IMMUTABLE at birth (re-purpose = cancel + rebook).
variantIdIDThe service-type product variant sold: REQUIRED on service, FORBIDDEN on pickup.
orderIdIDThe linked Order: REQUIRED on pickup (the order being collected); optional on service (sold-together at create/update, or book-then-bill at complete).
resourceIdsID [ID!]!The booked SchedulableResources (1..8, distinct; each in-tenant + ACTIVE + at the SAME LF as the parent).
startAtString String!The window start — a UTC ISO-8601 instant (the estate carries no timezone; working hours are advisory).
durationMinutesInt Int!The window length in minutes (1..1440 — the 24h cap IS the overlap-query lookback bound).
customerOrderCustomerThe polymorphic customer capture (the Order block VERBATIM — inline fields + the corporateCustomerId/consumerId ref arms); optional (a pickup’s customer is the order’s).
noShowAtStringSYSTEM-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.
successorAppointmentIdIDSYSTEM-stamped by reschedule on the superseded terminal — the linked successor (the ratified pair).
predecessorAppointmentIdIDSYSTEM-stamped on a reschedule-born successor — the appointment it supersedes.

Used by