Placemat

Docs · Reference

HTTP contract

Every product route, who may call it and what it returns.

All private GETs require a native active owner/admin/member session (or read-only/preparation agent key). All private POSTs require exact Origin and owner/admin or an explicit product host capability, with owner-only keys, erase, backup/restore and move-in. Agents may only read state and prepare proposals; approval always needs a native person session. JSON errors are {error:message}; POST success {result:...}.

Company agents use one CORE door at /mcp, /agents, /api/rer/agent-policy and /docs/agents, before application redirects. The native tool registry supports operations reads and proposal preparation; docs/agents.md records its limits. Signed Business policy, durable native sponsor mapping and the person's current native grants govern each call. Preparation keys keep their existing read/preparation scope. A person must still approve and execute a restaurant proposal. No company agent can send, change grants or move money through this registry.

Agent-created deferred work requires a consent-bound continuation through the shared door. It must retain the original sponsor, agent, scope and consent and recheck Business/local Pause and current sponsor, agent and consent revocation before the next effect. A person/agent pair alone cannot authorize that work.

  • GET /api/state: {state, guests, actor, version, names}; names maps each person or preparation key that prepared or approved something to a readable name; guest rows are {id, name, email, phone, notes, history?}. State types in src/placemat/model.ts.
  • POST /api/commands: {command, payload}. Commands: venue.update {name,timezone}; table.save {id?,label,seats,x,y}; service.save {id?,name,startAt,endAt,turnMinutes,coverLimit}; proposal.prepare {kind,plan,reason}. Plans: service.publish {serviceId}; reminders {serviceId}; table.assign {bookingId,tableIds}. proposal.approve / proposal.decline {proposalId}; booking.walkin {serviceId,name,email?,phone?,partySize,startAt,tableIds?}; booking.status {bookingId,status}; waitlist.add {serviceId,name,email?,phone?,partySize}; waitlist.seat {waitlistId,startAt,tableIds?}; guest.update {guestId,notes}; guest.erase {guestId,confirm:"ERASE"}.
  • GET /api/public/services: published service objects plus current availability (no guest data).
  • POST /api/public/book: {serviceId,name,email,phone?,partySize,startAt}; auto-assigns available table or a combination; 409 when full. Response only booking id and confirmation, no other guest data.
  • GET /api/reminders.csv person owner/admin: approved reminders exported for venue's own sender. No provider calls.
  • GET /api/calendar/:bookingId private: calendar download.
  • POST /api/agent-keys {name}: owner-only one-time secret. DELETE /api/agent-keys/:id: revoke.
  • GET /api/business-export/<kind>.csv: owner only, CSV attachment from one consistent current snapshot. Settings lists supported kinds; field definitions and exclusions describe every column. CSV reads never mark a reminder delivered or change records.
  • GET /api/backup; POST /api/restore {archive,confirm:"RESTORE"}: owner, empty product destination, integrity and erasure fences. A refusal's error explains the cause and next step in plain language.
  • Move-in endpoints are documented by the importer author in docs/MOVE-IN.md. UI sends CSV text; importer returns dry-run plan then explicit apply, journal and undo.

/app floor, operations, guests, approvals and move-in screens share one page with navigation anchors; /book is the guest page. Scripts must show server errors and wait for success before updating the screen. Datetimes are ISO UTC; UI labels times in the venue timezone and converts local input via Intl (reject ambiguous/nonexistent times). First setup is empty, never demo data.

REPORT-001 reservation reports

A signed-in owner/admin reads GET /api/reports/reservations or downloads the identical row selection at GET /api/reports/reservations.csv. Members and preparation keys cannot export reports. Query filters combine: venue (current venue name), dateFrom / dateTo (inclusive local service-start dates), serviceId (shift), area, source, status, partyMin / partyMax (inclusive 1–500, the largest supported party; omitted means every size), and period (all, past, current, future, based on the service interval). Omit a filter for all values. Invalid dates, enums and reversed bounds return 400. Unknown venue, area or shift yields no rows.

Booked covers include every matching reservation, including cancellations and no-shows; attended covers are seated/completed reservations. Cancelled/no-show/attended rates divide their covers by all booked covers; a zero denominator is reported as null. Each total includes its booking IDs; CSV contains those same reservation rows, with no guest contacts or notes. A combined-table booking contributes its covers once even when it includes multiple areas. Tables without an area belong to Dining room. Services and booking instants are stored in UTC and rendered in the venue IANA timezone; service dates follow the service start even across midnight or daylight-saving changes.

GET /api/guests?search=... uses the same native session or preparation-key read authority as /api/state. It omits erased guests and matches case/accent-normalized name/email or phone digits, ignoring US punctuation and an optional leading 1; phone suffix lookup is supported. This search does not merge identities: booking still reuses exact normalized email only.

An owner/admin person submits guest.profile to /api/commands with guestId and any of tags (up to 20 unique strings), vipLevel (none, regular, vip), seatingPreference, or notes. Unspecified fields remain unchanged. Each changed fact keeps the staff actor/time and explicit source; note changes retain dated history. The existing guest.update command remains a note-edit door. No public booking input writes private profile facts. The guest profile shows current bookings and imported visits together; flags and seating preferences also appear beside arrivals in the booking list.

Guest-supplied contacts, staff-observed fields and Tablein-shaped imports have separate provenance. An import lacking an original date says date not recorded; legacy records lacking provenance say source not recorded. No allergy, access need, diagnosis or consent is inferred. Current owner/admin staff edit and existing member/preparation-key readers see the same fields they may already read as guest notes, as ct approved on 19 October. Restricted facts and finer roles introduced by GUEST-003, ROLE-003, ROLE-004 and DATA-004 must enforce their field scopes in every profile/search/arrival/backup door before shipping. Owner erasure removes the profile, note history and provenance with the guest's other personal values.

SERVICE-004 channel rules

service.save accepts bookingRules with online, walk-in and waitlist objects. Each has minParty, maxParty, horizonDays (inclusive local calendar days), leadMinutes (elapsed; zero disables the staff-seating lead check, while public bookings remain future-only), sameDayCutoff (inclusive venue HH:MM), slotMinutes, inquiryAbove, and blockedStarts (offset instants). The public services door filters these rules, and public booking checks them again. Slots align to service start. Staff booking.walkin and waitlist.seat may pass overrideReason for party/horizon/lead rules as owner/admin; the resulting booking keeps the exact violations, actor, timestamp and reason with a booking.rule-override audit link. An override never bypasses table fit or clashes. Oversized inquiries are directed to contact the venue; this does not submit or confirm an inquiry.

SERVICE-006 turns and reset

service.save.turnPolicy has cleanupMinutes, optional offset lastSeatingAt, partyTurns: [{minSize, maxSize, minutes}], tableTurns: {tableId:minutes} and areaTurns: {area:minutes}. Party ranges do not overlap. Table overrides area, then party range, then service duration; a combination uses the longest constituent turn. Confirmations separate guest endAt from table cleanupEndAt. Full turn and cleanup must fit service hours and last seating is inclusive. A completed booking with a reset still protects that original reset interval.

To change future rules, prepare service.turns through proposal.prepare with {serviceId, turnPolicy}. The exact proposal includes per-reservation current/proposed times and whether the new policy would exclude it; existing bookings are explicitly preserved. A person approves through proposal.approve; any intervening service/floor/booking edit requires renewed review. Experience-specific rules are owed by EXP-001/002 before those capabilities ship.

WAIT-006 accountable queue

waitlist.add returns queued with intake time, actor history and an owner. Optional quoteMin, quoteMax, basis record a quoted range; a missing phone creates an owned no-contact follow-up with optional contactReason. Current owner/admin staff use these additional commands:

  • waitlist.status {waitlistId, status, reason} records offered, accepted, arrived, declined, expired or abandoned transitions; only waitlist.seat creates a capacity-checked booking. Offers/replies are staff observations, not provider sends or inventory holds.
  • waitlist.quote {waitlistId, quoteMin, quoteMax, basis} retains quote history.
  • waitlist.priority {waitlistId, priority, reason} records a higher-first numeric priority and current acting owner.
  • waitlist.followup {waitlistId, followUpId, outcome} completes an owned follow-up with actor and time, including after closure.
  • service.close {serviceId, reason} resolves every remaining queue entry, preserves seated history and disables new public bookings, walk-ins and queue intake for that service. Offered/accepted become expired; other active entries become abandoned, with assigned follow-up. Existing reservations remain.

Actual wait is intake-to-seat or terminal disposition in elapsed minutes; UI rounds to a tenth, and missing legacy observations are labelled not recorded. Legacy waiting/cancelled rows display as queued/declined without inventing dates. Erasure removes linked operational free text and copied service-close instructions while retaining anonymous timings and accountability.

SERVICE-002 recurring schedules

Owner/admin commands use /api/commands. schedule.save accepts {id?, name, shift, seasonStart, seasonEnd, weekdays, startTime, endTime, turnMinutes, coverLimit, startOffset?, endOffset?, exceptions}. Shift is breakfast/lunch/dinner; weekdays use Sunday=0. Seasons are inclusive local dates. Exceptions are {date, closed:true} or {date, closed:false, startTime, endTime, turnMinutes?, coverLimit?, startOffset?, endOffset?} and replace the weekly day. End at or before start is next-day. DST gaps refuse; repeated times need the actual selected offset.

schedule.preview accepts {fromDate, toDate, reason, scheduleIds?, renewServiceIds?} for an inclusive batch of up to 31 dates. Success returns a pending schedule.publish proposal containing candidates, physical seats/service covers, conflicts, changed services requiring renewed approval and an exact snapshot. Preview successive batches for longer seasons. Approve using proposal.approve {proposalId} or schedule.publish {proposalId}. Any intervening schedule/venue/table/service/booking edit invalidates publication. Overlaps refuse publication. Unchanged occurrences are never duplicated. Changed unbooked services renew/close only when explicitly selected in a fresh preview; booked and historical services remain unchanged, with affected-booking handling owed by SERVICE-003. The staff page exposes the editor, preview, explicit renewal selection and approval.

FLOOR-006 service observations and handover

booking.stage {bookingId, stage, reason?} records a staff-observed service or floor step. Owner/admin staff and owner-granted FLOOR-009 hosts record service observations. Operational stages are confirmed, reconfirmed, arrived, partially-arrived, seated, ordering, check-open, paid, clearing, completed, late, cancelled and no-show; course/floor stages are reserved, seated, mains, dessert, check-dropped, needs-bussing and ready. GET /api/state adds serviceStages with current labels, elapsed whole-minute timers, actor/source and permitted next steps, and retains append-only state.serviceEvents. The floor and shift handover expose these same observations. Timers advance without replacing open forms. Legacy missing observations say not recorded.

Paid is an explicitly staff-recorded observation, never a claimed processor payment. Paid/completed leave a dirty table unavailable to new staff seating until staff ready. Future public reservations continue to fit the promised turn/reset; ready never shortens it. booking.status remains the existing guarded booking-status door and writes the same observation history. A latest-event correction uses {bookingId, correctsEventId, reason} without a stage: it appends a restoration of the original prior state, retains the original and refuses physical clashes. Guest erasure clears linked observation free text while preserving anonymous status accountability. POS-007 inherits every observation and dirty-table rule before connected signals ship.

ROLE-003 server sign-in

The owner grants/revokes {operatorId, enabled} through team.server; the target must be an active native member without a host or shift-lead grant, and revoking removes every shift link. A manager links that person to one shift server with server.save {…, operatorId} (empty clears; one link per person per shift). A signed-in server reaches only GET /preshift, /api/preshift, /api/preshift.pdf, /kitchen, /api/kitchen and /api/floor-version; /app redirects to /preshift, and every other door answers 403. The sheet and kitchen view list only shifts the server is linked to, their own sections' tables and parties (guest name, level, occasion, unverified dietary/allergy/access requests; kitchen view with no guest identity), with no contact, guest notes, tags, payments, shift notes, other sections, pacing or dish totals. Read-only members keep their existing read doors and never mutate; guest exports, backups, reminders and report CSVs stay manager/owner-only for hosts, servers and members.

ROLE-001 venue groups

Each venue is its own installation. The owner of the home venue sends POST /api/group/invite {label} and receives a one-use gi_… code once (24 hours; only its hash is stored). The owner of the joining venue sends POST /api/group/join {homeOrigin, code, ceiling}; ceiling lists the most any group admin may read there (reports.read, preshift.read). The joining venue calls the home venue's POST /api/group/join-accept, which claims the code exactly once and returns a link secret that only the joining venue keeps. POST /api/group/leave and POST /api/group/link/revoke {linkId} end a connection and drop every grant that reached it.

POST /api/group/admin {operatorId, venues: {home|<linkId>: [rights]}} replaces one native member's explicit per-venue rights (never above a venue's ceiling); POST /api/group/admin/revoke {operatorId} removes them. GET /api/group shows the owner every link and grant, and a group admin only their own rights. A group admin exchanges their signed-in session for a short-lived read token with POST /api/group/token (shown once, expires in 12 hours). GET /api/group/reports/reservations and GET /api/group/preshift?date= with Authorization: Bearer gt_… return that venue's reservation report or host pre-shift projection when the token holds the right there. A member venue asks its home venue on every call, so revocation stops access at once; if the home cannot be reached the answer is 403. Group tokens are read-only: they cannot reach any other door, write, export, refund, erase, change people or providers, and the venue's own owner and managers keep every grant, export, erasure and provider change as personal authority. Every owner decision is recorded in the audit history, with before/after rights visible only to the owner.

FLOOR-009 direct assignments

The owner grants/revokes {operatorId, enabled} through team.host; the target must be an active native member. Native account roles stay unchanged. A granted host can record booking.stage / booking.status and directly change assignments, but cannot approve proposals, change venue settings or use owner exports. Current state returns the effective actor role and hostIds.

Each direct command requires numeric version equal to GET /api/state.version and accepts an optional reason:

  • booking.move {bookingId, tableIds, version, reason?} moves one active party.
  • booking.swap {bookingId, otherBookingId, version, reason?} atomically swaps both parties, validating the final floor.
  • booking.lock {bookingId, locked, version, reason?} changes the assignment lock. Unlock explicitly before a move or swap.

The server checks live physical occupancy, promised turns/reset, ongoing seated parties, seats, distinct tables in exact manager-approved adjacent combinations and exact required access tags. table.save.accessTags and booking HTTP requiredAccessTags are arrays of up to 20 exact strings; every chosen table must supply every required tag. FLOOR-002/003 and GUEST-003 carry richer attributes and explicit join definitions before shipping. Every action writes exactly one audit row with actor, timestamp, subject, reason and before/after arrays of {bookingId, tableIds, locked}; swaps include both parties. Locked assignments refuse prepared moves at prepare and approve, and new booking allocation never mutates an existing assignment. Only preparation keys prepare table.assign; people use the direct commands and managers decide agent proposals. Guest erasure clears linked reasons and required access tags.

FLOOR-005 timeline and overrun

GET /api/timeline requires an existing native session or preparation key. Parameters are venue-local service-start date (YYYY-MM-DD), optional serviceId, search, source (online, walk-in, waitlist), status (booked, seated, completed, cancelled, no-show), area, serverId, zoom (minutes per time division), and nextMinutes (inclusive elapsed arrival window from now). The response has rows with original reservation times, expected departure/reset, corrected staff-observed arrival/seating/departure/ready, late/overdue minutes, collision ids and retained service/assignment/turn histories. Header totals carry the exact displayed booking ids for drilldown. Average actual turn uses observed corrected seating-to-completion among displayed parties completed today in the venue timezone; absent actual observations stay unknown. FLOOR-004 supplies real server assignments/filtering before sections ship.

booking.extend {bookingId, expectedEndAt, reason} is a direct host/manager staff observation for a seated party. Expected departure is an offset instant later than now and the current forecast; a reason is required. It appends one audit row and changes no confirmed start/end/reset or assignment. The original reset duration follows the extension for occupancy, and collisions remain visible until a host separately moves a party under FLOOR-009. A still-seated party remains occupied after its forecast passes. No automatic move or connected POS verification is claimed.

WAIT-002 remote and walk-up joining

GET /api/public/queue/services lists open published services, their areas and honest paused state, never guests or queue rows. /queue is the standalone website/QR join page. Signed-in staff can display the service QR at /api/queue-qr?serviceId=...; it is generated locally and encodes only the public join URL.

POST /api/public/queue/join accepts {serviceId, name, email, phone?, partySize, preferredAt?, preferredArea?, requiredAccessTags?, contactConsent}. Email uses the existing exact normalized-email guest lookup; shared name/phone never merges. An active same-guest/same-service entry refuses with a generic link/host next action. Preferences are not reservations: preferred time is an offset instant within [service start, service end), area is an existing area, and exact required access tags carry into capacity-checked seating and direct assignments. Contact permission is optional, specific to the queue and never marketing consent. SERVICE-004 channel rules govern public join/update; SERVICE-006 governs actual seating.

Joining returns {entry, token} once. Save /queue#TOKEN privately: anyone holding it can manage that one party. Only a SHA-256 digest of the 32-byte random token is stored. The response entry contains party/status/preferences/queue contact permission, never guestbook contact fields, private history, other parties or its token hash. All following doors are POST with venue Origin:

  • /api/public/queue/status {token} reads only that entry.
  • /api/public/queue/update {token, partySize?, preferredAt?, preferredArea?, requiredAccessTags?, contactConsent?} updates its party; use empty strings/arrays to clear preferences. {token, leave:true} leaves the queue.
  • /api/public/queue/rotate {token} returns a replacement token once and invalidates the old link immediately.

Terminal entries remain readable but cannot be changed/rotated. Owner/admin waitlist.intake-pause {serviceId, paused} pauses only new public joining. Owner-granted hosts may use waitlist.add and waitlist.party {waitlistId, partySize, ...preferences} while paused, without plan approval; pause remains manager-only. Staff intake also returns a token once to hand to the guest, never a claimed send. Public intake/follow-up belongs to an active native owner, with guest-supplied actions honestly labeled. No table hold or delivery is claimed. Erasure invalidates the hash and removes linked preference/permission/history values under DATA-002 and its restore fences.

Public GET /api/public/search accepts venue-local arrival date (YYYY-MM-DD, default today), partySize (1–500), optional exact area, and repeated requiredAccessTags. It returns public venue/area/access choices, normalized query, results and an actionable message. Each result has serviceId, serviceName, startAt, endAt, cleanupEndAt, local arrival date and alternative (true on a later date). Results use the same live booking rules, shared capacity and full-turn/reset fit as checkout, over the inclusive requested date through seven calendar days later. Unknown areas/tags yield no matching slots; invalid dates/party sizes return 400. No guest data or table inventory is returned.

POST /api/public/book additionally accepts exact area and requiredAccessTags (array). Every allocated table must satisfy both; the booking freezes requiredArea and tags so direct/prepared moves cannot lose the promise. Confirmation returns the chosen area and tags. Guest erasure clears these guest-linked requirements under DATA-002. Search is never a hold: commit rechecks current inventory; a losing request returns 400/409, refreshes the same search and requires explicit reselection while retaining contact input. No silent substitution or false booking occurs. EXP-001 and ROLE-001 inherit experience filters and approved sister-venue alternatives before those capabilities ship.

FLOOR-003 approved physical combinations

Owner/admin people send combination.save {id?, tableIds, capacity, accessTags, setupMinutes, enabled, adjacent:true} to /api/commands. The full exact set has two or more distinct existing tables; the manager explicitly confirms adjacency. Capacity is at most the sum of their seats, approved access tags must exist on every constituent, and an exact set has one definition. Explicit adjacency can span named areas; BOOK-003 required-area searches still require every constituent match. New allocations use only a single table or one enabled exact approved set, never transitive joins or arbitrary sums. Public search returns times, never the private join snapshot.

Setup is an integer 0–120 elapsed minutes immediately before arrival and must fit within the service. A booking freezes setupStartAt and combination (id, tableIds, capacity, accessTags, setupMinutes and areas). Half-open setup/turn/reset occupancy participates in all shared-table conflicts, including overlaps between services and overruns. Disabling a join affects new assignments; existing booked/seated snapshots remain usable. Structural edits refuse until active commitments finish. Old joined commitments without a snapshot require a manager to approve their physical join and reassign explicitly before further service actions; their original occupancy remains protected.

Direct move/swap validates current enabled joins, preserves original promised arrival/end/reset, records new setup/snapshot in before/after history and refuses a clash. Lock and later service observations validate existing frozen commitments. Prepared publication/reassignment includes join configuration and refuses after it changes. New tables cannot alter a referenced join’s physical settings silently. All current booking doors enforce this; BOOK-002/005, DIST-001–004, VOICE-001 and AGENT-001 inherit before shipping.

FLOOR-002 rooms and reviewed floor lifecycle

Managers use room.save with {name, kind} (indoor, outdoor, bar) and optional id. table.save accepts shape (round, square, rectangle, bar), area (room name), exact accessTags, seats and 0–100 percentage coordinates. Existing named areas remain valid.

Prepare proposal.prepare with kind: "floor.change", reason, and plan: {tableId, changes, retire, replacements: [{bookingId, tableIds}]}. The response contains the exact snapshot, affected commitments, conflicts and approvable. Preparing never edits the floor; unsafe previews remain visible but cannot be approved. proposal.approve binds the exact snapshot and applies every fitting replacement atomically, retaining confirmed times, room, access needs and assignment history. Changed inputs require a new preview. Locked parties must first be unlocked. Retirement needs an explicit replacement for every active commitment and refuses arrived, seated or unbussed parties; retired records stay in history and cannot take new assignments.

GET /api/floor-version is authorized like /api/state and returns {version} without guest data. Open staff screens check it every three seconds. Focused or unsaved forms defer live replacement with a pending-change label; transport/auth failures show that updates are unavailable.

FLOOR-004 shift sections, servers and kitchen capacity

Managers configure a service with server.save {serviceId, id?, name, coverCap}, section.save {serviceId, id?, name, serverId, tableIds}, server.break {serviceId, serverId, onBreak, reason}, and kitchen.save {serviceId, area, coverCap}. Servers are shift roster labels, with no new account privileges. Sections have exclusive active tables; joins must stay within one section. Active mapping edits are refused until their parties are moved or finished. Existing seated parties may retain their server during a same-section move on break; new assignments and seating cannot use that server.

GET /api/sections with serviceId and partySize query parameters returns current per-server seated/expected covers with booking ids, section tables, kitchen area caps and the eligible rotation. Optional offset startAt selects the suggested arrival. Rotation checks full table fit and server/kitchen capacity, then sorts seated covers, oldest last seating and stable id. Caps measure peak concurrent booked/seated dining covers in half-open arrival-to-forecast-departure intervals; ongoing seated parties stay occupied. Expected totals include the shift's booked and seated parties. Setup/cleanup remain separate physical occupancy.

Every existing booking, seating and assignment path rechecks staffing capacity. Bookings carry section/server snapshots and append attributed servingHistory events on booking, seating and reassignment. GET /api/timeline?serverId=… filters these assignments and returns readable roster names. Owner backups preserve staffing and serving history.

SERVICE-005 / SERVICE-007 pacing and reviewed exceptions

service.save.pacing and owner/admin service.pacing {serviceId, pacing} accept {intervalMinutes, arrivalCovers, arrivalParties, concurrentCovers, areaArrivalCaps:{area:covers}}. Counts are per service: elapsed half-open intervals aligned to service start, counted booked/seated/completed arrivals and service covers (not cancelled/no-show), and overlapping booked/seated dining covers (ongoing seated remains counted past forecast). A join counts once and against every constituent area. Default new policy is 30 minutes and 500 for each numeric limit with no area caps; older absent policies add no arrival or simultaneous limit beyond existing service covers and FLOOR-004 kitchen caps. Existing commitments remain; later allocations enforce live caps.

GET /api/pacing?serviceId=ID returns the interval limits, counts, full markers and exact booking drilldowns, plus separately counted overridden reservations. The reservation report and CSV carry the corresponding filtered pacing override count. WAIT-002 queue intake remains available at caps: queued only; no table or time promised. Seating, booking and allocation enforce pacing.

The owner uses team.pacing {operatorId, enabled} for an active FLOOR-009 host. Removing host access removes the pacing grant. Owner/admin and granted hosts preview POST /api/pacing/preview {command, payload} for booking.walkin or waitlist.seat, using the same payload as the command. The no-write result contains every exceeded limit/current/projected/excess and a five-minute review HMAC bound to the native actor, command, payload, floor version and expiry. To proceed, send the unchanged command payload plus pacingReview, pacingConfirm:"yes" and pacingReason. A changed floor, payload, expired review or revoked grant requires fresh review. Public/preparation/agent channels cannot override. No review bypasses physical capacity, fit, access, joins, server caps/breaks or occupied turns. Configured FLOOR-004 concurrent kitchen-area caps join the signed area-pacing warnings; server caps remain hard. Unrelated roster edits preserve reviewed kitchen exceptions, while changing a kitchen cap itself still validates existing commitments. Blocked staff starts also require the reviewed pacing exception.

The booking keeps pacingOverride and the audit has booking.pacing-override with actor, time, reason and limit facts; timeline and reports flag it. Linked reasons follow DATA-002 erasure, including proposal snapshots. Tokens never persist. BOOK-002/005, DIST-001–DIST-004, VOICE-001 and AGENT-001 inherit these guards before new doors ship.

Service performance (REPORT-002)

An owner or manager reads GET /api/reports/performance with query serviceId=ID. The response contains report, the current floor version and publications for that service. Turn and wait distributions carry finite sample counts, missing counts, exact observation ids, mean, median and nearest-rank p90 in elapsed minutes. The service date is the venue-local service-start date. Histories retain staff observation and correction ids, actors, timestamps and before/after facts; no guest names, contacts, notes or reasons enter the report. Staff quotes are labeled staff-recorded, not delivered provider estimates.

POST /api/reports/performance {serviceId} publishes the exact generated facts as an immutable snapshot, with native actor, time and floor version. GET /api/reports/performance with query snapshot=ID reads it unchanged after corrections and returns changedSincePublication when the floor version has changed. Publish again to retain adjusted facts beside the original. These doors have the same manager-only rights as reservation reports; writes require the venue origin. Owner archives include published reports.

Expected turns retain the confirmed arrival/departure; actual turns require corrected seating and completion timestamps. Departure delay compares completion (or now for an ongoing seated party) to the confirmed departure. Quoted wait deviation is actual wait minus the nearest range bound, zero inside the range. Queue abandonment and all disposition totals open their exact queue ids. Missing timestamps and historical serving assignments remain explicit. Historical attended covers use the serving assignment at corrected seating, while current assigned expected covers are separate. Utilization unions observed physical table-seat minutes within service bounds and divides by available table-seat minutes, with ongoing observations identified; it excludes setup/cleanup and does not estimate guest distribution within joined tables. Interval pacing and override drilldowns use the shared pacing ledger.

BOUND-001 product boundary

Not in Placemat: online ordering, gift cards or the POS itself. Placemat sells no gift cards, stored-value cards or vouchers and takes no online food orders. Gift cards, online ordering and check taking stay in the restaurant’s POS or its payment provider’s own products; connected loyalty stays there too. Current payment operations stay bound to a reservation: explicit deposit requests, evidenced fee decisions and refunds; they create no transferable or general spending balance. A staff-recorded “ordering” or “paid” stage is only a service observation, never an order or processor payment. No route or command issues, transfers, tops up or redeems stored value. Booking inputs create reservations only; extra financial fields do not create a payment, order or balance.

No-show review assistance (AGENT-005)

Owner/admin managers read GET /api/reports/no-show?serviceId=ID for fact-cited review flags, raw elapsed lead minutes, attendance/reconfirmation reference ids, missing-data caveats and later attendance monitoring. This deterministic assistance assesses no profile notes or protected traits and produces no probability. A prior no-show or missing recorded reconfirmation flags a booking for human review; missing history stays unknown.

risk.decide {bookingId, kind: "contact" | "policy-review", decision: "accepted" | "declined", reason, dueAt?} records a manager’s decision. Accepted work is owned by that manager and requires a future explicit-offset due time; duplicate open work of the same kind is refused. risk.complete {decisionId, outcome} records a staff-reported completion once. Neither command sends a message, changes a policy, cancels a booking or charges a fee. Policy changes retain their existing person-approved workflow. Reports count distinct reviewed flagged bookings with later attended/no-show/pending outcomes, and identify attended cases as potential false positives without claiming causation. Guest erasure clears linked reasons/outcomes and removes the guest from assistance reads.

AGENT-004 demand-aware allocation slice

GET /api/allocation-advice?serviceId=... is available to native owner/admin people and unrevoked preparation keys. It reads actual pending queue entries in recorded priority/intake order and returns up to two single-move or two-booking swap alternatives. The search is bounded to these operations, not a claimed global optimum. Each alternative preserves the original booked arrival, departure, cleanup, area and required access; locked, arrived, seated and started assignments cannot move. Only explicit approved adjacent combinations are considered. Destination turns, full setup/reset, server sections/breaks/caps, kitchen caps and pacing are checked without overrides.

The before/after queue placements consume the same hypothetical physical ledger so separate parties cannot count the same seat twice. requestedSlotCovers counts covers feasible at each party’s first eligible requested slot; feasibleQueuedCovers counts covers feasible during remaining service time. Wait values measure elapsed minutes from calculation to the earliest feasible slot and delay from the requested instant; neither is a quote, reservation, delivery or predicted probability. The screen rounds elapsed minutes to one decimal place. current reports recorded booked and seated covers across the chosen service and the venue’s physical seat count; it is not point-in-time occupancy.

Prepare allocation.improve through proposal.prepare with {serviceId, alternativeId} and a reason. The server recomputes the selected alternative and captures its exact moves, affected commitments, conditional demand preview and complete relevant inputs. Only owner/admin people approve through proposal.approve; preparation keys cannot approve. Any change in venue, tables, approved joins, services/staffing, bookings, observations or queue invalidates approval. Passing approval validates the complete ledger before atomically changing assignments and recording before/after, reason, actor and time. It never seats demand or sends a message. proposal.decline retains the rejected review. Erasure redacts captured guest-linked access requirements and reasons as well as live records.

Protected direct inventory and shift-adjustment proposals remain outside this implemented slice, so AGENT-004 remains partial.

SERVICE-003 reviewed closures (partial)

Owner/admin people prepare proposal.prepare with kind: "service.closure", a reason, and plan: {serviceId, scope, area?, tableIds?, startAt?, endAt?}. Scope is service (the dated service's complete interval), room (active tables in the exact area), arrival (all tables, restricted arrival starts) or private (selected distinct active tables). Offset timestamps default to the service interval and must fit within it. Preview returns exact table IDs, booking IDs and input snapshot; proposal.approve refuses changed inputs. Inventory restrictions are half-open. Room, service and private restrictions protect setup through cleanup across overlapping services; arrival restrictions compare arrival instants only. Every current allocation door inherits them; existing guest commitments remain unchanged. An affected booking cannot change tables through direct, swapped or previously prepared assignment doors while the guest-accepted relocation workflow is missing.

state.serviceChanges contains the approved intervals and impacted booking follow-up tasks, owned initially by the approving manager. service.followup {changeId, taskId, status, outcome} records open or failed-contact and assigns the acting manager responsibility; actor and time are audited. The screen and command record a staff observation only: neither sends a message nor proves delivery. No closure automatically cancels, moves or refunds a booking. A personal owner or manager reviews service.relocation {changeId,taskId,serviceId,startAt,tableIds,area,reason} against live physical capacity, required access, turn, cleanup, staffing and pacing. The original booking remains unchanged. A proposed area change is shown to the guest explicitly. service.outreach {changeId,taskId,acknowledged:true} sends once to the recorded reservation email only when that booking has guest-supplied closureEmailConsent or existing recorded staff email confirmation permission. It accepts no destination, free-message or channel override; only the booking reference and private offer are sent. Provider acceptance is labelled mailbox delivery unconfirmed; opening the scoped link records guest-opened. Failed or uncertain attempts remain attributable and never retry automatically. Renewed explicit review invalidates the prior offer; five attempts per booking in 24 elapsed hours are the maximum.

/relocation reads the digest-only capability from the URL fragment, removes it from the address bar and calls POST /api/public/relocation/status, accept or decline with {token,acknowledged:true} for decisions. Capabilities cover one offer and expire at the earliest of 24 hours or either arrival; a decision consumes them. Acceptance revalidates exact current commitments and inventory atomically. Stale or unavailable offers preserve the booking. Declining and unanswered offers also preserve it.

service.cancel {changeId,taskId,reason,amountCents,refundId?,acknowledged:true} records a separate explicit cancellation decision. With captured money it requires the existing PAY-005 payment.refund result for this booking, a succeeded processor reference and exactly matching integer USD cents. Pending or mismatched refunds cannot be claimed. With no captured charge it records zero cents and the decision reason. Existing unresolved Checkout release protection remains binding. The impact queue displays accepted relocation, exact confirmed refund decisions and owned failed-contact observations separately. Guest erasure clears linked reasons, booking snapshots, permission and live capability; portable history retains accountability but strips executable capability digests. Guest erasure redacts linked reasons and outcomes in live changes and retained proposals; structured archives and the service-changes business CSV include current records.

Reviewed published hours and cover limits

A personal owner or admin prepares proposal.prepare with kind: "service.amend", a reason and plan: {serviceId, changes: {endAt?, coverLimit?}}, then reviews the returned exact before, after and active bookingIds before proposal.approve. This command is currently available through the HTTP door. Preparation keys, shared-device sessions and other staff cannot prepare or approve it. An ended or closed service refuses. The end must retain every active booking's full turn and cleanup; the cover limit must retain booked, seated and completed covers. An extension cannot overlap another published service. Active checkout holds prevent amendment until completed or released by the guest, or expired. Changed service, booking, floor or closure inputs require a new preview; approval also rechecks time and checkout holds.

Approval changes only the end and cover limit, increments the service version and records actor, time and reason. Bookings, closure intervals, seating rules and all other policies remain unchanged. Every subsequent allocation uses the amended hours and cover limit with existing physical, turn, staffing and pacing guards. No message, cancellation, relocation or refund occurs. Existing structured archives retain the amended service and reviewed proposal; guest erasure removes guest-linked proposal and amendment audit reasons. Other service settings retain their existing reviewed commands.

REPORT-007 end-of-service report

service.close commits the existing queue closure and one immutable report in the same version-guarded D1 batch, returning closeSnapshotId. Owner/admin GET /api/reports/closed?serviceId=... returns original (performance and cover rows, recovery, fees, closing actor/time), adjustments (service observations added after close, compared by stable event IDs including same-millisecond corrections), current cover rows and currentRecovery; nothing rewrites the original. Snapshots closed before recovery and fee facts existed return recovery: null and fees: null (not recorded at close), never inferred values.

recovery is {definition, covers, freedCovers, replacementParties, fromCancellations, fromNoShows, bookingIds, releaseNotRecorded, freed: [{bookingId, status, partySize, tableIds, releasedAt, recoveredCovers, replacements: [{bookingId, partySize, source, status, recoveredCovers, seatedBy: 'staff-recorded'}], notSeatedBookingIds}]}. A freed reservation is cancelled or no-show, released at the latest staff observation recording that status (releasedAt: null when none, and nothing is attributed). A replacement is another reservation of the service created at or after that release, sharing a table, with an overlapping half-open reserved interval, and seated or completed; booked parties on a freed table are listed in notSeatedBookingIds and never counted. Each replacement counts once, for the earliest-starting freed reservation it matches (then booking id); a freed reservation recovers at most its own party size. The owner/admin live GET /api/reports/performance?serviceId=... adds the same recovery computed now (null when reading a published snapshot).

fees is {recorded:true,currency:"usd",chargedCents,waivedCents,refundedCents,pendingCents,rows} for newly closed services: actual succeeded charges, explicit waivers, succeeded fee refunds and pending reservations are read inside the closing transaction. Each row identifies reservation, assessment, policy and saved outcome. Older snapshots retain their recorded-false or absent fee state; no amounts are inferred. GET /api/reports/closed.csv?serviceId=... downloads the exact original reservation population/statuses with the existing report columns and formula protection plus recoveredCovers (summing to recovery.covers; blank when not recorded at close) and recoversBookingId, plus chargedFeeCents, waivedFeeCents, refundedFeeCents and pendingFeeCents (integer USD cents; blank for historical snapshots without fee facts). GET /api/reports/closed.pdf?serviceId=... downloads the same fixed figures with denominators, every reservation and the adjustments as a text PDF (application/pdf, attachment). The manager screen prints only the report with every drilldown open. Ordinary manually published performance snapshots are distinct from the close snapshot.

BOOK-002 website widget

embed.origins {origins: string[]} replaces the exact allowlist; only an owner person may run it (admin, member, host and preparation keys get 403). Each value must be an https: origin without wildcard, credentials, path, query, fragment or loopback host (localhost, *.localhost, 127.0.0.0/8, ::1, 0.0.0.0) in every environment. Values are normalized by the URL parser (lowercase host, default port removed) and de-duplicated, at most 20; an unchanged list is 409. The audit row embed.origins keeps actor, time and before/after {origins}. state.embed.origins and the venue business CSV column embedOrigins_json carry the list.

GET /book?embed=1&origin=<origin> is the only frameable document: its CSP frame-ancestors names the list exactly and it sends no X-Frame-Options; with an empty list it sends frame-ancestors 'none' and X-Frame-Options: DENY. When origin is not listed the page is a script-free refusal. Every other response (/app, /book, /queue, /inquiry, auth, API and static files) carries X-Frame-Options: DENY and CSP frame-ancestors 'none', which the Worker entry adds when a response has no frame-ancestors. The widget posts only {type: 'placemat:height', height} to the listed origin and listens to no messages. /placemat-embed.js frames /book?embed=1 inside each [data-placemat-book] element and accepts height messages only from the Placemat origin and its own frame.

GET /api/public/search also returns policies: for each published, open service in the searched eight-day window, {serviceId, serviceName, date, minParty, maxParty, inquiryAbove, horizonDays, sameDayCutoff, leadMinutes, slotMinutes} from its online channel rule (SERVICE-004); the widget and /book show them as the booking policy.

POST /api/public/book accepts an optional embedOrigin, which must be listed (400 and no booking otherwise). Bookings record attribution {door: 'widget', origin} or {door: 'booking-page'}; the origin is what the widget reported, attribution rather than proof. Widget bookings keep the online channel's rules, turn/reset, joins, staffing and pacing; public requests never override them, and pacing review fields are ignored. The bookings business CSV adds attribution_json.

analytics.settings {ga4: {enabled, measurementId, debugMode, apiSecret?}, meta: {enabled, datasetId, testEventCode, accessToken?}} is owner-only (admin, member, host and preparation keys get 403). measurementId is G- plus 4–16 letters or digits (stored uppercase); datasetId is the Meta Pixel/dataset ID, 6–20 digits; testEventCode is blank or 4–20 letters/digits (stored uppercase). Switching a provider on needs its ID and a key, either saved or entered now. Keys are 8–200 (GA4 API secret) or 20–1000 (Meta access token) characters without whitespace; a blank key keeps the saved one, an entered key replaces it, and switching a provider off stops its events while its key stays saved. An unchanged save is 409. Keys are kept only in pm_analytics_keys, written in the same version-fenced D1 batch as the settings, and no response returns them: state.analytics holds the settings, and the owner's GET /api/state adds analytics: {keys: ['ga4'|'meta'...], results} naming which keys are saved and each provider's answer to its most recently sent event {provider, event, status, detail, at} (at is when that event was handed over for sending, so a slower answer to an earlier event never replaces it). The audit row analytics.settings keeps actor, time and before/after settings with keySaved (and keyEntered when a key was typed in that change), never a key.

analytics.remove-key {provider: 'ga4'|'meta'} is owner-only too (ct ruling, 21 October 2026; admin, member, host and preparation keys get 403; an unknown provider is 400). It deletes that provider's saved key from pm_analytics_keys in the same version-fenced batch and returns {provider, keys}; with no saved key it is 409. The provider's settings are unchanged, so one that is on without a key is left out of GET /api/public/services analytics and sends nothing, the settings say a key is needed, and a settings save that keeps it on needs a newly entered key. The audit row analytics.remove-key (subject the provider) keeps actor, time and before/after settings with keySaved false and keyRemoved: true for that provider, never a key. Restores never bring a key back.

GET /api/public/services adds analytics: the providers that are on and hold a key ([], ['ga4'], ['meta'] or ['ga4','meta']). When it is not empty, /book and the widget ask once per page visit (Accept / Decline), naming each listed provider and what is sent; the answer and the random visit ID (crypto.randomUUID(), created on Accept) exist only in that page's memory. Without Accept the page sends no analytics request and no visit ID.

POST /api/public/analytics {event: 'search'|'checkout-start', visitId, partySize, embedOrigin?} (same-origin, at most 60 a minute per network, 202 {providers}): visitId must be a version 4 UUID, partySize 1–500, and embedOrigin, when sent, a listed widget origin (400 otherwise). The page sends search after each search the guest runs and checkout-start each time the guest selects a time. POST /api/public/book accepts analytics: {visitId}; after the booking commits, the server sends the completed-booking event. A missing or malformed visit ID sends nothing and never affects the booking. The visit ID is not stored on the booking or anywhere else.

Every send runs after the guest's response (waitUntil), once, with a 10-second timeout and no retry queue, so a slow or failing provider never blocks or delays a booking. Requests, field for field (source = widget with the listed origin, or booking-page):

  • GA4 Measurement Protocol: POST https://www.google-analytics.com/mp/collect?measurement_id=<id>&api_secret=<secret> with {client_id: <visit ID>, events: [{name: 'search'|'begin_checkout'|'placemat_booking', params: {party_size, booking_source: 'widget'|'booking-page', widget_origin?}}]}; test mode adds debug_mode: true and engagement_time_msec: 1 to params so events appear in DebugView.
  • Meta Conversions API: POST https://graph.facebook.com/v26.0/<dataset ID>/events?access_token=<token> with {data: [{event_name: 'Search'|'InitiateCheckout'|'Schedule', event_time: <send time, Unix seconds>, action_source: 'website', event_source_url: <listed origin, or this installation's /book>, user_data: {client_user_agent, external_id: [<SHA-256 hex of the visit ID>]}, custom_data: {party_size, booking_source, widget_origin?}}]}, plus test_event_code when set.

No request carries guest name, email, phone, IP address, cookies, booking reference or reservation date/time, and no provider script loads on any Placemat page (CSP script-src 'self', connect-src 'self'). Results are honest labels: GA4 answers without confirming events (Sent. GA4 does not confirm events; check DebugView.), Meta reports events_received; a refusal or unreachable provider is recorded as such, and a demo installation records that nothing was sent. Keys are excluded from backups, native exports and business CSVs (pm_analytics_keys and pm_analytics_results appear in the manifest's excludedTables); after a restore the settings return without keys, so analytics is [] until the owner enters them again.

AUDIT-001 change history

GET /api/audit uses the existing native/session or preparation-key operations-read authority. It returns rows newest first and a names directory keyed by the stable actor IDs. GET /api/audit.csv uses the existing owner-only bulk export authority and returns the same filtered rows in the documented business audit CSV schema. Both reads accept exact actor, action and subject (the action subject or a changed record ID), plus inclusive from and to ISO instants with explicit UTC offset. Invalid time bounds return 400. Signed-out requests return 401; CSV requests by nonowners return 403.

New events retain detached before/after record values in changes, with kind, id, before and after; null means absent. Existing detailed assignment and analytics decision snapshots remain in before/after. Historical events without snapshots explicitly remain unknown. Source distinguishes person decisions, preparation keys and guest-supplied changes; no provider send or payment is claimed. Credential tables and private link verifiers never enter snapshots. Guest erasure redacts linked snapshot values while preserving action accountability. The existing version-fenced save commits changes and history together; refused writes produce neither.

FLOOR-012 pre-shift sheet

GET /preshift?date=YYYY-MM-DD opens the live HTML sheet with date selection, browser print and PDF download. GET /api/preshift?date=YYYY-MM-DD returns the same server-filtered projection; GET /api/preshift.pdf?date=YYYY-MM-DD generates an attachment on demand. All require an active native owner/admin or owner-granted host; signed out is 401, plain members and preparation keys are 403. Invalid dates are 400; omitted date means today in the venue timezone. Every service starting on that venue-local date is included, with its status and current bookings except canceled/no-show parties. Empty dates show no services.

The manager projection includes contacts, guest notes and tags. The host projection excludes those values before rendering, printing or PDF generation. Both show guest-supplied requests as unverified, with no allergy-safety claim. Erased guests have only name “Erased guest”, arrival, party size and table labels. Generated time is a fresh ISO instant; displayed arrivals use venue-local time. No sheet/PDF is stored and all responses use Cache-Control: no-store. Payment, kitchen-note, acknowledged-needs, counter-seat and future role duties remain with the named receivers in CONTRACT.md.

FLOOR-013 service notes and kitchen

GET /kitchen?serviceId=ID and GET /api/kitchen?serviceId=ID require a native owner/admin/member or granted-host session. Preparation keys and signed-out requests are refused. Both use the same projection: venue/service/date, pacing and interval covers, large parties, per-item guest-supplied and manager-entered quantities, kitchen note history, and unverified allergy/dietary/access requests by table. Guest identity/contact fields and shift notes are absent. The page tracks the live floor version and offers explicit refresh.

Manager commands through POST /api/commands: service.note (date, kind shift/kitchen, text) appends an actor/time revision; service.preorder-item (serviceId, name) publishes an immutable named item; service.preorder-active (serviceId, itemId, boolean active) withdraws/republishes it; service.preorder-count (serviceId, itemId, integer quantity) records a separate manager count. Existing origin checks and version fencing apply. POST /api/public/book accepts preorders: [{itemId, quantity}] from that service’s currently published list; the server preserves the authoritative item name and returns recorded quantities in the confirmation. New request quantities are integers 1–50; a manager count is 0–500. No money, estimated portion or food-safety outcome is implied.

Service notes/menus/counts/booking quantities are included in the owner’s portable CSV and archive doors. Plain member/preparation-key state and audit readers never receive restricted shift-note snapshots.

FLOOR-007 busy-service search slice

The existing private /api/timeline and staff timeline combine date, service, source, booking status, room, server and search. Search reuses GUEST-002 case/accent-normalized names/emails and US phone suffix matching (punctuation and an optional leading 1 ignored); booking IDs, service names and individual table labels match case-insensitive substrings. Invalid or repeated source/status values return 400. The date remains the venue-local service-start date, including services crossing midnight. Rows add only the existing vipLevel fact; guest-supplied requests and guaranteed table access/area stay separate, and erased identities never match old contact/name values. The existing native-session/preparation-key read authority is unchanged. Search reads do not modify bookings, permissions or requests. The UI labels current VIP/regular facts and unverified allergy/accommodation requests without certifying food safety. FLOOR-007 remains partial for request resolution, owned/due callbacks and unpaid PAY-010 exceptions/deadlines.

SETUP-001 restaurant setup

Owner GET /api/onboarding returns editable initial channel rules. venue.onboard through /api/commands takes name, legalName, address, phone, email, optional HTTPS website, optional PNG/JPEG/WebP data URL logo (200 KB), currency: USD, timezone, bookingRules, current version (0 initially), and explicit acknowledge: true. It records an owner/version/instant acknowledgment of the exact rules. New dated and recurring services inherit the saved rules; existing services retain theirs. The existing venue.update door preserves restaurant setup. Empty sameDayCutoff disables a channel cutoff.

Owner POST /api/onboarding/preview accepts service settings and optional partySize; it uses the real floor and capacity/search engine against a transient service, returns available times and policy disclosure, and writes no service, guest, proposal or booking. service.save and this preview accept venue-local YYYY-MM-DDTHH:mm plus startOffset/endOffset when repeated, or existing unambiguous offset instants. DST gaps refuse with the next valid local time; repeated hours refuse until a valid offset is selected.

GUEST-004 duplicate review and merge

GET /api/guests?review=<guestId> uses existing guest-read authority and returns {review: {selected,candidates,households,notice}}. Candidates match exact trimmed/lowercased email, or a full US phone normalized to +1 plus accent/case-normalized exact name. A shared phone with another name is a household, never a candidate. Name alone, phone suffixes and email dot/plus rewrites do not match. Conflicts retain both values. Profiles include imported visits, linked bookings and per-entry queue contact consent; marketing permission and spend are not recorded. Unknown, erased and absorbed selected profiles return 404. Reads never mutate identity.

Native owner/admin only: GET /api/guests/merge-preview?guestId=<survivor>&duplicateId=<duplicate> returns both profiles, conflicts, linked counts, original-phone permission reconciliation and a review digest. guest.merge through /api/commands accepts those two IDs, review and confirm: MERGE. Changed profiles or linked records refuse with 409. The mutation checks active manager authority and state/profile revisions atomically, retains selected fields, combines imported visits, moves current booking/queue/reminder/inquiry relationships and retains original contact provenance and reminder recipients. Absorbed identities are hidden from ordinary guest lists; booking with an absorbed email resolves the survivor. An ambiguous email still identifying separate active profiles requires manager review.

GET /api/guests/merges?guestId=<id> returns the manager-only journal. GET /api/guests/unmerge-preview?mergeId=<id> previews unchanged records and later edits/new records needing assignment. guest.unmerge accepts mergeId, review and confirm: UNMERGE, restoring only unchanged records while preserving and listing later changes. Neither mutation sends anything or grants marketing permission. Queue consent remains bound to the original contact phone; false beats true, missing consent never grants, and reversal cannot reinstate a less restrictive permission.

guest-merges.csv and structured backup cover journals, original snapshots, pending assignments and contact bindings; restore validates relationships. Owner erasure of an active merged identity includes its reviewed aliases, purges all related journal snapshots and blocks reversal. Previously unmerged profiles stay separate when fully restored; an edited profile still carrying the reviewed identity pending assignment remains in its erasure scope. Shared historical journal snapshots are purged. Reverse later merges before earlier merges; a profile with existing aliases must remain the selected survivor. Existing erasure/restore fences apply to all original identities. Member, host and preparation-key readers never receive merge journal snapshots through state or audit.

Counter seats and unassigned cover pools

Managers use inventory.create {name, kind: "counter"|"pool", capacity, turnMinutes, arrivalCovers, intervalMinutes, adjacent, accessTags?}. Each inventory has 1–40 immutable one-cover units, a distinct area and fixed turn/arrival pacing. Counter ordinals represent physical seats; pool units are anonymous capacity, never physical seat assignments. adjacent enforces consecutive counter ordinals. Settings and unit identities stay fixed for history; individual table editing, retirement and table joins cannot alter units.

Public search returns inventory definitions and unit ids, with no guest occupancy data. A pool is offered only when its area is explicitly selected; an unconstrained table search never silently promises an unassigned pool. POST /api/public/book may specify counter tableIds; omission assigns fitting available units. Every party takes exactly one seat/cover per guest from a single inventory. Ordinary turns, cleanup, overlap, version races, access and service pacing still apply. Pool units can fill fragmented free capacity. Physical seating is refused until an existing FLOOR-009 move assigns seats or a table; a seated party cannot move back into unassigned capacity. Inventory selection is the initial seating type and does not restrict a later host transfer to a different area; required access tags and confirmed times remain binding. A transfer refuses a destination whose required turn exceeds the reservation's promised duration.

Pre-shift JSON, HTML, print and PDF display the exact current seat or unassigned-cover labels. Reports count counter seats individually in physical-seat utilization and expose pool capacity separately under report.utilization.pool; pool covers never inflate physical-seat totals. Existing observation histories, corrections and immutable publications apply to counters. Archives validate inventory definitions, unit relationships and assignments before atomic restore.

Owned operational handover

An active owner-granted host or manager creates booking.handover {bookingId, kind: "request"|"callback", text, ownerId, dueAt, paymentRequestId?}. A host transfers only work they hold with booking.handover.assign {bookingId, taskId, ownerId, dueAt}; a manager transfers any open task. A target must be an active manager or owner-granted native host; dueAt is an offset instant. Every assignment retains owner/due-time history. booking.handover.complete {bookingId, taskId, outcome} is allowed to a manager or the current active assignee exactly once. Linking an unpaid deposit request verifies the booking and transfers its follow-up owner with the callback. Completion never changes guest-supplied requests, promised seating/access or payment state. Every active host sees open task metadata; free text is limited to managers and the current assignee, including nested historical snapshots. Plain members and preparation keys get no new follow-up text. Lock and switch clear it from the stand immediately. CSV/archive preserve tasks; guest erasure removes linked tasks and audit copies. This is the final ct policy; full delivered payment workflows remain PAY-010’s duty.

Shared host stands (conservative policy pending ct)

GET /hoststand is the dedicated PIN surface. A full owner session creates POST /api/hoststand/devices {label} and receives a one-use claimCode, shown once, expiring in ten minutes. POST /api/hoststand/claim {claimCode} consumes it and installs a Secure, HttpOnly, SameSite=Strict __Host-pm-device cookie for a 30-day installation-local lease. Claim, switch and lock revoke personal sessions left in that browser. PIN mode also refuses native account-administration and sign-in/setup routes, preventing parallel personal-cookie authority. Owner GET /api/hoststand/devices lists registrations and non-secret security events; POST /api/hoststand/revoke {deviceId} immediately denies that device.

An active native member with the owner’s host grant sets or resets POST /api/hoststand/pin {pin} from a full personal session. PINs have 6–12 digits; common, repeated and sequential patterns are refused. A versioned Worker-secret pepper HMAC-SHA256-keys the PIN before PBKDF2-SHA256 at workerd’s maximum 100000 iterations, with a random per-PIN salt. Salt, digest, pepper version and work factor are stored; a successful unlock upgrades an older keyed record. No unpeppered credential can unlock. See docs/host-stand-security.md for managed HOST_PIN_PEPPER_V1 provisioning and explicit key-ring rotation. GET /api/hoststand/status includes the active enrolled roster; staff tap their name and call POST /api/hoststand/unlock {operatorId,pin}. Switching locks the previous person before verification. Ten consecutive person failures disable the PIN across stands until a full-session reset, with security events readable by full managers at GET /api/hoststand/security-events. Device rate windows separately bound unknown-person attempts and verification work. PIN replacement locks active stands. Suspension/account-version and host-grant changes fence PIN use, including after reactivation until a fresh PIN is set.

GET /api/hoststand/status never extends activity. GET /api/hoststand/floor projects current bookings, active assignment choices, queue parties, permitted steps, follow-up metadata/current-assignee text and payment deadline alerts. It excludes restricted profiles, guest contact and credential data. The server enforces a two-minute idle lock; lock/switch clear the client screen and reject late responses from the previous person. POST /api/hoststand/commands {generation,command,payload} carries current FLOOR-009 operations, WAIT-002 intake/party changes, FLOOR-007 follow-up, phone booking create/change and payment link/status actions; walk-in/waitlist seating and pacing review retain the live SERVICE-007 grant. POST /api/hoststand/pacing-preview {generation,command,payload} uses the existing exact reviewed warning/signature. Phone changes carry the current floor version and never move a locked assignment. Old generations refuse; the business write transaction fences person, PIN, host grant, device, lease and generation. Audit retains native person and device ids. Refunds, waivers, payment settings, exports, restricted notes and administration refuse, with no personal-session fallback. POST /api/hoststand/renew {deviceId,days} is owner-only and permits one to thirty days from renewal; a warning appears from day 23. Refreshing the device cookie never renews server authorization. Device/PIN credentials and security tables remain installation-local and excluded from business archives; future shared-browser step-up belongs to SEC-001.

Manager and seating-lead delegation (policy pending ct)

The owner grants or revokes team.lead {operatorId,enabled} to an active native member, separately from a host grant. Leads can move/swap/lock assignments, record operational stages/turn extensions and review walk-in/waitlist seating exceptions. Existing exact signed pacing review and human reasons remain mandatory; table fit, access, overlap and physical occupancy never become overridable. Leads cannot configure the venue/providers/owners, approve proposals, export guests or mutate finances. Native roles remain unchanged; revocation takes effect on the next request.

team.reports {operatorId,serviceIds} gives a manager or lead explicit service scopes; an empty list denies reports. Existing unscoped managers retain their prior venue-wide reports; new leads get none by default. Scoped requests must select an allowed service. Every report route checks it, including CSV/PDF and the actual service of immutable snapshot ids. Leads can read reservation/performance JSON only, without report publication, exports, guest recovery text or financial closure facts. Reports in the UI show only granted service choices. Other existing operational reads retain their established native permissions.

Owner team.manager-limit {operatorId,refundLimitCents} sets integer USD cents ($100 = 10000) with before/after audit history. No recorded manager limit means no refund authority; owners are uncapped within the charge balance. The limit caps all pending and succeeded refunds that person submits across one booking’s charges. Full owner payment.charge-sync {bookingId,chargeId} retrieves and verifies an actual captured USD Stripe charge with matching placemat_booking_id metadata. Full owner/manager payment.refund {bookingId,chargeId,amountCents,requestId,reason} atomically reserves the charge balance and live cumulative authority before any processor call; an excess or absent limit refuses first. A stable request id reconciles an uncertain result without a new refund; pending reservations remain held. Money history joins filtered audit/CSV and erasure. PAY-005 documents the signed-event, explicit-notice, fee-report and controlled sandbox proofs, with its remaining delivery/custody gaps. ROLE-001/ROLE-004 retain future venue/group/provider boundaries. The lead/report delegation matrix is approved by ct; leads cannot execute financial operations.

Booking-bound deposit requests

Full managers create payment.request {bookingId,amountCents,dueAt,followupOwnerId,reason}. The USD amount and deadline are immutable in this foundation. Hosts or managers explicitly issue payment.link {requestId} against the saved request and copy/share the returned Stripe-hosted URL; issuing it never records message delivery. A PIN host has the same link authority, without amount/settings/waiver/refund authority. payment.sync {requestId} retrieves matching server-side Stripe data; only verified paid state establishes payment. The floor, timeline, reservation follow-up and pre-shift sheet show unpaid deadlines; callback completion never marks money paid. Requests and refund records have documented CSV/archive coverage, with hosted guest URLs redacted and provider references retained. Worker STRIPE_SECRET_KEY stays outside business data. PAY-005/PAY-010 remain partial for their original provider delivery, policy automation, reconciliation and sandbox acceptance.

Private reservation management

booking.management.send on POST /api/commands requires a full owner session and {bookingId, acknowledged:true}. It emails the recorded reservation contact through the configured production sender and returns provider acceptance metadata, never the bearer. Reissue revokes the previous link. A failed or uncertain submission revokes the issued capability; no automatic retry occurs. Demo and local-auth modes refuse outbound sends.

GET /manage-booking opens the existing guest booking shell. Its email link carries a fragment capability, removed from page history at startup. Same-origin JSON posts to /api/public/booking-management/status, /preview and /commit carry token in the body. Status returns only that reservation and contact. Preview accepts action: change|reconfirm|cancel; changes may include an offset startAt, integer partySize, and reservation-only contact: {name,email,phone}. Its response includes the exact preview id and fee/refund consequences. Commit accepts only {token,previewId,acknowledged:true} and rotates the token atomically with the confirmed mutation. Failed availability preserves the original booking.

Tokens expire within 24 hours and no later than service start. Rotation preserves expiry. Altered, foreign, expired, replayed or externally changed reservation links return a generic 404; concurrent inventory/authority changes refuse with 409. Public requests are origin-checked and rate-limited. Token records are excluded from archives and erased with the guest; reservation contact data follows business CSV/archive validation and erasure. Current financially implicated reservations require manager review; no fee/refund action is invented or automatically submitted. These custody defaults await ct approval, and BOOK-004 remains PARTIAL.

Refund outcome reconciliation

POST /api/payments/refund-events is a provider door, without a cookie or browser Origin. The unread request bytes require a current Stripe-Signature authenticated by the installation's STRIPE_WEBHOOK_SECRET. New matched events retrieve the current refund with STRIPE_SECRET_KEY; mismatched money/booking/processor references refuse. Accepted event IDs deduplicate atomically, and stale notifications never overwrite current Stripe state. Failures assign the original submitter an owned follow-up. Missing configuration fails closed. No webhook creates a processor refund or sends mail.

A personal owner explicitly calls payment.refund-notice with refundId, the reviewed outcome, the reviewed expectedContactEmail and acknowledged: true. It sends one transactional email for that refund/outcome to the reservation's recorded contact. A changed outcome or contact, erased contact, manager/host/agent identity, destination/channel override or missing acknowledgment refuses before sending. The email address is read from the current reservation contact; the reviewed address is a comparison, never a destination override. The immutable notice names the refund amount, actual saved outcome and remaining refundable balance after pending/succeeded refunds. Duplicate requests return the saved attempt, including an uncertain attempt; they never resend. The page reports provider acceptance and leaves actual mailbox delivery unconfirmed. Every one-attempt notice atomically creates one sender-owned callback due immediately to confirm receipt or contact the guest and record the human outcome. Provider acceptance and bounced/unconfirmed mail retain this task until a person records completion through the existing handover door; duplicate sends never recreate or reopen it. SMS (MSG-002), manager-run and automatic notices and delivery-status webhook ingestion remain named PAY-005 gaps; DATA-004 governs retained refund records.

Versioned cancellation and no-show fees (PAY-004; default adopted pending ct)

Full personal owners use POST /api/payments/fee-policy, /fee-consent, /fee-preview, /fees (all under /api/payments/) or payment.fee-policy, payment.fee-consent, payment.fee-preview, payment.fee commands. Policy payload names local cutoff calendar days/time/optional repeated-hour offset, no-show grace, fixed/per-person cancellation and no-show integer-cent amounts, exemptions and terms. Versions never alter an existing reservation’s agreement. Consent explicitly attests the exact version/text, agreement instant/evidence and a successful off-session SetupIntent matching booking and policy metadata. Card/customer execution credentials never appear in state, audit, CSV or archive. Consent must precede arrival and the violation, with unchanged booking terms.

Preview never takes money. Actual charge/waiver decisions require a fresh owner-bound preview of a recorded cancellation/no-show, a stable request id, reason and evidence. Hypothetical previews are never actionable. Charge execution reserves one decision per violation before Stripe; timeouts hold that decision and a person may reconcile the same request, never a scheduled retry. An owner may record a dispute using action: dispute, assessmentId, reason and evidence; this does not charge or refund. Existing PAY-005 refund authority applies to a synchronized fee charge. Closed reports keep their original fee facts through later refunds. BOOK-004 financial bookings stay in manager review while the named clauses remain partial.

Checkout holds and interruption recovery

POST /api/public/booking-holds takes {requestId, token, booking, ttlSeconds}. The request ID is a stable 16–128 character identity; token is a fresh 32-byte hexadecimal capability generated in the guest tab. A hold reserves exact current service, turn/reset, tables, fit, access and all physical/server/pacing capacity for 5–300 seconds (the page chooses five minutes). Only a digest of the bearer and salted canonical payload hash are stored. Each public call checks venue origin and its request budget. Repeating the same identity never extends expiry or changes its payload. POST /api/public/booking-holds/status and /abandon take {requestId,token}; foreign/altered capabilities return 404. Expired or abandoned holds cannot confirm or renew.

POST /api/public/book accepts the original booking plus checkout:{requestId,token}. It atomically consumes the live exact hold with its single booking and guest writes, and retains the non-contact confirmation for replay. Repeating the exact request returns the same result; a lost response can be recovered through status. Recovery stops after guest erasure. Legacy immediate booking remains available and respects every active hold. Every current staff, public, waitlist, direct/prepared move, server, counter and pool allocator shares these allocations. Holds are not guest bookings and never enter business archives, booking counts or restricted guest sheets. Future experience checkout (EXP-002) inherits the same shared allocation, expiry and idempotent recovery obligations before it ships.

Closing pending deposit collection

A full personal owner/admin calls payment.close with {requestId} to review the saved Stripe Checkout, explicitly expire an open unpaid session with a stable processor key, and retrieve the authoritative terminal state. The expire response or local deadline alone cannot release a reservation. Open, processing and unknown attempts retain capacity with an explicit manager next action. Unknown session creation is recovered through the same saved payment.link request, never a new processor key. Once Stripe confirms expired-unpaid, a person may cancel separately. Authoritative paid requests retain normal manager cancellation/refund policy; untouched requests with no collection attempt are safe to cancel. The release assertion and reservation state write share a transaction, so a concurrent Checkout preparation cannot lose its slot.

FLOOR-008 outage first slice (default adopted pending ct)

Only a personal native owner session may prepare or reconcile an outage draft; administrators, hosts, shared devices, members and preparation keys are refused. outage.sheet {serviceId, consent: "SAVE ANONYMOUS SHEET"} through /api/commands records consent and returns an anonymous timestamped service/table/occupancy projection with the resulting floor version. It does not create guests, bookings, services or proposals. Expiry is the earlier of 12 hours from generation or one hour after service end. Guest names, IDs, contacts, notes and requests are absent. Live reservation-book counts retain their existing page-memory baseline.

POST /api/outage/review accepts {actionId, serviceId, partySize, startAt, capturedAt, tableIds, requiredAccessTags?}. Timestamps include explicit offsets, and actionId is a locally generated UUID. Review does not write. It returns the original conflict, exact fitting alternatives and five-minute actor/action/floor-bound signatures. Every alternative retains access requirements and passes live published-service, turn/reset, combination, occupancy, hold, pacing and staffing checks. This slice offers no pacing or rule override.

booking.outage {...alternative.payload, version, review, confirm: "SEAT REVIEWED WALK-IN"} through /api/commands rechecks authority, signature, floor version and live fit, then atomically seats an anonymous Walk-in using the normal seating path. The audit records the pending UUID, actor, booking and commit instant. Replaying that actor's already applied UUID returns {id, replayed:true} without a second write, even after guest erasure. Conflicts leave the pending draft untouched and require a fresh review. Capture time is a device observation, never a backdated seating event. Nothing is automatically sent, booked or charged on reconnect.

The existing operations screen keeps an anonymous sheet and up to 30 pending walk-ins as AES-256-GCM ciphertext in localStorage, deriving its in-memory nonextractable key from a private 16-character-minimum passphrase with PBKDF2-SHA256/310,000 iterations and a random salt; every save uses a fresh IV. Only ciphertext, format, salt, IV and expiry are stored. Web Locks and compare-before-write prevent two tabs silently overwriting a draft. Unlock checks owner and origin. Five idle minutes lock the view; expiry refuses access and deletes the ciphertext on the next running-page check/unlock. Explicit discard/delete affects local drafts only. Browser closure cannot run deletion code; this is logical expiry, not a promise of timed disk erasure. The tab must remain open during an outage; offline reload and richer sheets/host access/pending reservations remain outside this partial slice.

Reviewed direct inventory release deadlines

proposal.prepare with kind inventory.protect accepts plan.releaseAt as an optional timestamp with an explicit UTC offset. The deadline must be later than preparation and approval and no later than the protected interval end. The existing manager approval reviews the exact deadline with its tables, interval and reason; stale plans still refuse. Omission keeps the original interval-end release. At or after the deadline, staff allocation can use the interval without a scheduled job or release command. Every allocation still checks physical occupancy, checkout holds, turns, access, staffing and pacing. Release never cancels a reservation, shortens its turn or changes its source. The saved protection and deadline remain in history and business archives. The allocation page displays the deadline in venue time and labels an elapsed deadline when refreshed.

Versioned integration reads and explicit event delivery (API-002 partial)

Default ADOPTED pending ct: a personal native owner alone grants, revokes and operates integration credentials. An explicit grant exposes anonymous reservation facts and guest IDs only. Guest names, contact details, notes, profiles, requests and guest-to-reservation links are denied. There are no integration writes to reservations or guests, no automatic outbound delivery and no automatic retry. This is a first slice; the full original API-002 requirements remain open.

Owner POST /api/integration-keys takes {name, scopes, expiresAt, acknowledged:true}. Choose one or more of availability:read, reservations:read, guests:read and events:read. Expiry is a future offset timestamp within 90 days. The random 32-byte key appears once in the response; only its SHA-256 digest is stored. A lost issue response requires inspecting the owner key list, revoking that key, and explicitly issuing another. Owner GET /api/integration-keys lists non-secret metadata and attributed lifecycle events. POST /api/integration-keys/{id}/revoke with an empty JSON object is idempotent. Owner mutation requests require the venue Origin. Credentials require their issuing owner to remain active and retain the owner role. Preparation credentials and native cookies cannot substitute for scoped integration keys.

Clients send Authorization: Bearer <key> to these GET routes:

  • /api/v1/availability accepts the same date, party size, area and required access queries as /api/public/search, returning current shared availability without holding inventory.
  • /api/v1/reservations returns only id, serviceId, partySize, startAt, endAt, status and source.
  • /api/v1/guests returns only guest id; erased and merged-away guests are omitted. Asking for a forbidden field in fields returns 403. The parameter validates access and does not expand the fixed projection.
  • /api/v1/events returns anonymous, immutable reservation event envelopes in sequence order. Events begin when this migration is installed; restoring a business archive does not replay historical integration deliveries.

Responses identify version 1 in JSON and X-Placemat-API-Version. Unknown versions return 404; unsupported writes return 405. The three collections accept limit from 1 to 100 (default 50) and an opaque cursor; nextCursor:null ends traversal. Guest and reservation pages use ascending ID order; events use append order. Cursors are signed and bound to the credential and collection. These are live keyset reads, not frozen snapshots: concurrent insertion before a returned ID is found in a fresh traversal. Revocation and expiry are checked on every page, including cursor continuation. Each key has a separate budget of 60 requests per UTC minute; excess requests return 429 and Retry-After. Denied scopes and invalid page requests consume that budget too.

Owner POST /api/integration-subscriptions takes {keyId, url, types, acknowledged:true}. The selected key must grant events:read. Types are reservation.created, reservation.changed and reservation.cancelled. The endpoint must use an HTTPS hostname on port 443 without user credentials or a fragment; literal network addresses and local hostnames are refused. A fresh signing secret is shown once and stored encrypted with the installation secret. A changed destination or lost signing secret requires revoking the subscription and registering a replacement. POST /api/integration-subscriptions/{id}/revoke takes {acknowledged:true}. Key revocation also denies new deliveries.

Current reservation creation, material changes to the projected reservation fields, and cancellation append events atomically with the domain write. The envelope contains {id,type,schemaVersion:1,createdAt,reservation} with the anonymous reservation projection above. Unrelated operational notes and guest contact changes do not produce a reservation event. Event and delivery tables, credentials and signing secrets remain installation-local and outside business archives.

An owner explicitly calls POST /api/integration-subscriptions/{id}/deliver with {eventId,requestId,acknowledged:true}. The stable request ID contains 16–128 letters, digits or hyphens. Its first attempt is recorded before sending. Repeating it returns that saved attempt and never sends again; changing its event returns 409. A failed or uncertain delivery is replayed only with a new explicit request ID, keeping the original event ID and exact payload. A pending attempt means delivery is not yet known; an interrupted process can leave it pending and the owner must inspect the subscriber before explicitly replaying. No in-flight send can be recalled by later revocation.

The POST carries X-Placemat-Event-Id, X-Placemat-Schema-Version: 1 and X-Placemat-Signature: t=<unix-seconds>,v1=<hex-hmac>. Verify HMAC-SHA256 with the once-shown signing secret over the timestamp, a literal period, and the exact raw request body. Use a constant-time comparison, a five-minute timestamp tolerance and durable event-ID deduplication before acknowledging success. Redirects are never followed. A five-second transport deadline yields uncertain; non-2xx responses yield failed; 2xx means the subscriber accepted the request, not that its downstream workflow completed. Owner GET /api/integration-subscriptions lists subscriptions and every attempt with its status and response code. Unsupported stored event schemas refuse before delivery rather than silently changing their meaning.

Personal-owner GET /api/integration-subscriptions/schema reports each event ID, stored schema version and compatibility status, with recovery guidance for unsupported or invalid records. It never returns raw invalid payloads. Event collection reads and new delivery attempts validate the exact documented anonymous envelope, its stored identity, type and creation time, and the compact JSON encoding emitted by this edition. Duplicate JSON keys refuse so hidden raw fields cannot pass validation and then be sent. Unknown schemas, mismatched metadata, missing facts and extra fields refuse with 409 before returning events or recording a new delivery attempt. A failed page returns no partial collection or continuation cursor. The application does not skip incompatible events, infer missing facts, strip unknown fields or rewrite stored envelopes. A future schema requires an application release that explicitly supports it; malformed records require the exact original installation event record from a trusted source. Existing request IDs still return their saved delivery outcome without sending again. Once storage is compatible, reads resume and a new explicit owner delivery can proceed with the unchanged original payload bytes and event ID. Compatibility recovery itself sends nothing. No earlier event schema exists in this edition, so this slice adds validation and visibility rather than inventing an upgrade or an owner repair command; tested schema upgrades remain open.

Custom websites and concierge tools can use the scoped read routes. Zapier and Make can use HTTP requests for polling and their webhook receivers for explicitly delivered events, with signature verification and event-ID deduplication in their receiver workflow. Crank remains a separate workflow product and can consume the same documented HTTP boundary. These are protocol recipes, not verified named-product adapters. Versioned reservation mutations with idempotency, automatic subscription execution, richer permission grants, tested schema upgrades and named automation adapter journeys remain API-002 gaps; no partner account or live-adapter proof is claimed.

Owner privacy requests

A personal native owner session opens /privacy from venue Settings. Every /api/privacy door refuses other roles and preparation keys; mutations require the exact venue Origin. GET /api/privacy returns current retention settings, request metadata and processor follow-up. It retains no downloaded guest-export copy.

  • POST /api/privacy/access with guestId creates an audited access request and returns that guest's current profile, own reservations and declared-need history, own messages and queue history, booking contacts and minimal financial references. Other guests and execution credentials are absent.
  • POST /api/privacy/correction takes guestId, bookingId, the access export's revision, field, value, reason and guestConfirmed:true. It uses the existing needs correction path, retaining the original declaration and dated author history. Changed revisions refuse.
  • POST /api/privacy/policy takes the current version (zero when absent) and rules for guestNotes, messageContent, imports and financialEvidence, each with integer days and a documented ground. Personal-content periods may be zero for explicit immediate disposal; financial review is at least one day. No legal period is inferred or prescribed.
  • POST /api/privacy/erase-preview takes guestId and returns the reviewed subject and a signed, five-minute review bound to that owner, subject, guest revision, floor revision and retention policy revision. It changes no records.
  • POST /api/privacy/erase takes that exact guestId, review and confirm:"ERASE". Missing, mismatched, expired or stale reviews return a clear conflict before erasure; the revisions are fenced in the atomic erasure transaction. Recorded retention grounds are required. Existing atomic identity erasure also records the completed request and known processor follow-up. Financial references remain under the recorded ground; old backup restoration stays fenced. No provider request is sent.
  • POST /api/privacy/processors adds a provider record identifier to a deletion request, or records a submitted, confirmed or retained outcome with its receipt or ground. A finished provider decision cannot be overwritten. This is an owner's record of external action, not a delivery claim.
  • POST /api/privacy/retention-preview returns eligibility and an exact review fingerprint. POST /api/privacy/retention-run requires that fingerprint, selected guestIds and confirm:"ERASE". Active service work is excluded. The first slice erases whole selected identities only after all personal-content periods have elapsed; it does not separately purge each category or automatically delete retained finance. Each completed identity has its own durable request if a later identity refuses.

The personal-owner, explicit-action, whole-identity retention default awaits ct approval. Independent category expiry, financial-evidence disposal, complete external processor census and the full restricted-purpose matrix remain DATA-004 obligations. None is removed from the contract.

Operating cost planning

Personal owners open /costs from Settings. GET /api/costs?month=YYYY-MM returns real approved and exported reminder counts, paid deposits, saved forecasts, budget alerts and entered invoice reconciliations. Exports do not imply delivered messages.

POST /api/costs/preview records reminder count, SMS segments, promoted covers, domestic-card count and gross cents, plus optional dated quotes for carrier fees, per-cover distribution, promotion and hosting. Published prices are dated sources; absent quotes remain visibly unknown. POST /api/costs/budget sets integer USD cents for the month. POST /api/costs/invoice records the preview, unique invoice reference, evidence, provider, usage category and units, provider cost cents, processor fee cents and explicit acknowledgment. Observed paid-deposit units are compared where applicable; disconnected provider usage is unknown. Saved forecasts and invoices restore only after relationship and money validation.

Forecasts never enable a channel or spend money. Entered statements are not provider-verified billing. Actual usage and bill reconciliation across the named providers remains COST-001's Gap until authentic billing inputs or authorized provider access are available.

Versioned native-owner reservation actions

POST /api/v1/owner-reservations is a native personal-owner session door, requiring the exact venue Origin. It never accepts an integration bearer key, a preparation key, a manager session or a shared-device session. Send a stable UUID requestId, action (create, change, cancel) and payload.

Create uses the existing booking.phone fields: service, start time, party size and guest identity, with optional returning guestId, declared requests, intake source, area and access constraints. Change uses bookingId, startAt, partySize and the current floor version. Cancel uses bookingId, optional status:"cancelled" and the recorded reason. Capacity, service, payment-release and role guards remain the existing commands' guards. Reviewed pacing and rule exceptions remain in the venue workflows.

The anonymous response contains reservation ID, service ID, party size, interval, status and source. Its receipt commits in the same transaction as the mutation and event. A repeated identical owner request returns that original snapshot with replayed:true, including after later changes; reusing the ID for another action refuses. Concurrent identical requests create one reservation and one event. Failed mutations leave no receipt and may be explicitly corrected by the owner. Normalized input is stored only as a keyed digest; native replay custody is excluded from business archives and receipts are never silently expired and reexecuted. Native owner sessions remain required on replay. This does not grant integrations reservation-write authority.

Finite recorded fee authority (PAY-003 foundation): POST /api/payments/fee-expiry and POST /api/payments/fee-recollection take a bookingId; their native command equivalents are payment.fee-expiry and payment.fee-recollection. Only an active personal owner may use them. New recorded fee consent defaults to service end, or accepts an earlier future expiresAt; existing unbounded agreements expire on upgrade. Ending authority never extends it. Renewed collection records one owner-held request without sending a message or collecting a card. Expired authority denies new charge attempts, including saved pending decisions without a processor reference; known processor references can still be reconciled by read. The owner sheet reports expiry and the required human action. Other sheet audiences receive none of these agreement details. An owner-attested saved setup holds no funds and establishes no guarantee protection. Guest-captured setup and supported manual authorizations use the separate scoped collection doors below.

Stripe merchant and guest card collection

A full personal owner opens Stripe merchant connection under Settings. The restaurant configures its own Stripe credential privately, completes onboarding in Stripe and explicitly reviews provider costs before connecting. Placemat charges no fee. No key is accepted in a product payload. All collection amounts use USD; the merchant country must support USD presentment, independently of its settlement currency.

  • GET /api/payments/merchant returns the current capability snapshot, provider cost disclosure and redacted collection records. POST /api/payments/merchant/connect accepts acceptCosts: true and the exact reviewedCosts string from that read. It verifies the configured merchant and supported currency. POST /api/payments/merchant/disconnect blocks new collection and new charge attempts while retaining existing obligations. Refund reconciliation remains separate.
  • POST /api/payments/merchant/collect accepts bookingId and a stable requestId. Its Stripe-hosted setup link is returned only to the requesting owner and is never a paid state. POST /api/payments/merchant/sync accepts requestId and verifies Checkout and SetupIntent server-side. Product reads expose no payment-method, customer or setup credential, hosted link or card fields.
  • POST /api/payments/guarantees/issue accepts bookingId and policyId, collectionMode (setup by default or authorization), and for authorization an integer authorizationCents no larger than the agreed maximum fee. Optional expiresAt can only shorten the dated service-end deadline. The guest reviews and accepts the exact temporary-authorization amount and fee terms before Stripe collection. The owner copies its once-returned guestUrl; no outbound message is sent. A 32-byte random private link is stored only as a digest, expires at the earlier of arrival or 24 hours, and grants only that reservation's collection journey. A replacement invalidates the prior link. POST /api/payments/guarantees/end accepts the guarantee id, ends authority immediately and records owner-held recollection without sending. For a manual authorization it explicitly expires an open Checkout or cancels the verified uncaptured provider operation. An uncertain release remains unprotected with its last verified held amount and an explicit release follow-up; another hold cannot be created while that amount remains unreleased.
  • The existing guest reservation page opens the private link fragment. POST /api/public/card-guarantee/status accepts its token and returns only exact fee terms, acceptance time, expiry, agreed maximum, held amount and current collection state. POST /api/public/card-guarantee/accept additionally requires accept: true and the exact reviewedText before redirecting to Stripe. POST /api/public/card-guarantee/sync verifies the provider outcome; no browser-provided payment state is trusted. These doors enforce the venue origin and a per-minute limit. A changed or erased reservation loses access.
  • GET /api/payments/guarantees exposes full agreement history only to the personal owner. The existing fee command can explicitly charge an actual recorded violation under a current guest-captured agreement. Expired or unconfirmed authority refuses a new attempt. Manual authorizations require a fresh provider read proving the original amount, card authorization and capture deadline before one explicit permitted capture. The fee decision reserves that original provider reference before submitting; a lost answer is reconciled by observation, including after expiry, without another capture or replacement charge. No automatic charge, retry or send is introduced. Other fee policies, manager delegation and refunds retain their existing obligations.

The live pre-shift sheet, print and on-demand PDF use one projection. Under the adopted personal-owner default, only that owner sees the latest guarantee's expiry, actual held amount and separate maximum fee. A tokenized setup holds USD 0.00; a manual authorization shows only server-verified held USD cents with its provider deadline. After expiry it is unprotected even if release is unconfirmed; the last verified amount is labelled accordingly. One server-side projection feeds all three sheet forms, with no card credentials. A reviewed service amendment permanently shortens existing authority when service end is shortened; later extension does not restore it. These collection and authorization defaults remain pending ct, so PAY-001 and PAY-003 stay partial. BOOK-004 continues to refuse zero-money guest changes for reservations with any recorded card guarantee.

Scheduled group reports

GET /api/report-export.csv uses the same native manager and service-scope gates and filters as the reservation CSV. kind=reservations covers the selected population; kind=visits includes seated and completed bookings only. Both contain operational booking fields, with no guest contact, notes or credentials. Guest personal records retain the existing owner business-export permission; finance retains its existing restricted finance door.

A personal venue-wide owner or admin uses GET /api/report-schedules for private schedules and attempts. POST /api/report-schedules requires recipientId, a distinct venueIds array, future UTC nextAt, and explicit acknowledged: true. Each schedule approves exactly one active native group manager already granted reports.read at every selected venue. It repeats every seven days at the approved UTC time. The seven complete local service dates preceding the due date in the scheduling venue timezone are compared using those same date labels in each venue's own timezone. The hourly runtime cron claims each due period durably; missed periods are coalesced without a catch-up email flood.

POST /api/report-schedules/stop takes scheduleId. POST /api/report-schedules/resend takes scheduleId, deliveryId, and explicit acknowledged: true; the owner must acknowledge that the previous message may already have arrived. Provider acceptance is distinguished from mailbox delivery. Uncertain sends remain delivery unconfirmed, with no automatic resend. Schedule owners, recipient identity and all venue grants are checked on every attempt. A refusal is audited and sends nothing.

Emails contain only /api/report-deliveries/<attempt-id>.csv, with no bearer credential or report attachment. That door requires the exact approved native identity and rechecks current schedule and group authority. Other identities and signed-out opens disclose no report and are audited. Reports are regenerated rather than retained. GET /api/group-comparison accepts dateFrom, dateTo and repeated venueId values, with optional format=csv. It uses temporary ROLE-001 tokens, including member-to-home introspection on each member call, refuses partial results on any denial or outage, and returns cover totals with each venue's timezone. Ct approved this PARTIAL slice on 25 October 2026 at 20:08Z; the complete REPORT-005 target remains binding.

Explicit deposit scope and money reconciliation

The existing payment.request command accepts perGuestCents instead of an explicit total. The server multiplies it by the current booking party size and stores both the original count and rate immutably. Supplying a conflicting amountCents is refused. A changed party size prevents issuing another collection through that original scope. Hosted Checkout states the original rate and count, reservation-only use and manager review at seating. This does not promise automatic policy selection, a hold release or POS credit.

POST /api/payments/ledger-events accepts Stripe-signed charge.succeeded, refund.created and refund.updated notifications. Only successful captured USD charges and succeeded refunds become immutable economic facts. Signature verification covers the original bytes with a five-minute timestamp tolerance. Repeated event IDs and repeated economic references cannot duplicate money; changed facts are refused. A refund may precede its charge and resolves when the charge arrives. Other currencies and unsupported facts are refused or explicitly ignored. There is no provider write. Configure the private Stripe webhook signing secret separately; no secret enters an archive or response. This ledger notification door is distinct from the existing refund execution callback door.

A personal owner opens GET /api/payments/ledger. POST /api/payments/ledger/payout with payoutId retrieves the paid USD payout and its complete paginated balance transactions. Gross, fees and net must reconcile exactly; incomplete or inconsistent retrieval records nothing. The review limit is 2,000 transactions. Payout snapshots cannot be changed. Repeating a matching import is safe.

POST /api/payments/ledger/adjustment accepts payoutId, transactionId, an existing bookingId and an optional reason. The owner explicitly attributes an unmatched item by atomically appending one actor-stamped adjustment and its payment.ledger-attribution AUDIT-001 event. The event records the original and attributed settlement views, actor, instant, personal source and reason when supplied. A concurrent or repeated attribution refuses with 409 and appends neither a second adjustment nor an audit event. It changes no historical amount or reference, and refuses an already attributed item. This is manual attribution, not provider confirmation of an absent booking reference. Managers, finance identities, shared devices, members and agents cannot use these doors under the ct-approved 25 October owner-only interim authority. No automatic charge, refund, send or deletion occurs. Transfer, dispute and reversal lifecycles remain unimplemented.

Each settlement item exposes the original provider source, amount, fee and net, its separately identifiable human adjustmentId and derived bookingId, and the original signedFact when present. The signed fact retains its source and charge references, original booking reference, currency, recorded instant and signed amountCents (refunds negative). differenceCents is provider gross minus that signed amount; it stays unchanged after attribution. With no signed fact, both signedFact and differenceCents are null, never a zero difference inferred from attribution. Payout discrepancies lists transactions with a nonzero known difference, unverified lists absent signed facts, and unmatched lists absent booking attribution. Empty unmatched proves only attribution. Payout gross, fees and net, original economic history and these independent reconciliation fields remain inspectable through GET and the money-payouts business CSV and are recomputed from immutable facts after archive restore. The shared state and change-history APIs omit these owner-only settlement audit events for non-owners. Settings change history keeps the complete financial context visible in both columns for money-attribution decisions, including unchanged provider and signed amounts and their difference. Financial references survive guest erasure; linked audit snapshots and reasons are redacted. A reason cannot be added for an already erased guest. These records confer no provider-write authority.

Payment rider coverage at the approved 25 October slice

PAY-002 original scope: tests/api/checkout-payment-journeys.mjs, “Per-person deposits retain the original guest scope, reject conflicting totals and disclose exact hosted terms”, asserts four original guests, USD 25.00 per guest (2500 cents), USD 100.00 total (10000 cents), conflicting-total refusal and restored scope. Later policy edits and changed-party link refusal are implemented guards in src/placemat/payment-links.ts; their rider-specific assertions remain unproved.

PAY-002 authority: existing personal manager creation and closure and PAY-010 host link issuance are separate guards. The Checkout recovery journey explicitly closes as a native admin manager. A complete owner, manager, host, PIN host and revoked-authority matrix for these riders remains unproved. No host request-setting, waiver, refund or ledger authority is granted by the deposit slice.

PAY-002 disclosure: the per-person journey checks the hosted amount and booking-bound summary. Full pre-checkout terms, guest agreement under BOOK-004 and applicable PAY-003 or PAY-004, MSG-008 channel permission, delivery and receipt remain unproved. Copying a link proves none of those outcomes.

PAY-002 authenticated observation: the per-person journey repeats paid-state synchronization against the controlled Stripe edge without a second Checkout or booking. It establishes neither live collection nor bank settlement. Safe close: “Unconfirmed Checkout collection retains the reservation until stable recovery and an authoritative expired-unpaid observation” and “Checkout preparation fences cancellation before its provider call; processing stays protected and confirmed paid or never-attempted requests permit explicit cancellation” assert unresolved reservation preservation, authoritative closure and separate explicit cancellation. These journeys do not prove the full original failed-payment capacity-release, refund, seating or sheet acceptance.

PAY-006 attribution: tests/api/money-ledger-journeys.mjs, “Signed money facts reconcile refund-before-charge and duplicate callbacks, payout fees and appended unmatched attribution without editing history”, imports gross USD 97.00 (9700 cents), fees USD 3.00 (300 cents) and net USD 94.00 (9400 cents) with one unattributed USD 2.00 (200 cents) settlement item. The adjustment adds a separate human attribution; assertions retain every source money item, original provider settlement item, and gross, fee and net total, while exposing the booking link, adjustment reference, actor and recorded instant. The response preserves provider source, amount, fee and net alongside the adjustment reference and actor and time record. Controlled native Stripe-edge cases cover both an absent signed fact and a conflicting USD 5.00 (500 cents) signed charge against that USD 2.00 provider item: the remaining difference is negative USD 3.00 (-300 cents) before and after explicit owner attribution. The same journey checks GET, parsed CSV, exact before-and-after audit with reason, concurrent and replay refusal, non-owner denial, revoked-session denial, redacted erasure and empty-destination archive restores before and after erasure. The conflicting signed fact names a different existing booking from the human attribution; both booking references remain distinguishable. The intact restore retains the audit reason and exact before and after, every financial CSV agrees with the source installation, and signed callback replay appends no receipt or adjustment. Attribution and erasure preserve the original signed-event receipt history. An empty unmatched list is not reconciliation of conflicting economic facts. This is native fixture proof, not a live provider receipt. Actual Stripe payout proof, scoped finance authority and unimplemented lifecycles remain the PAY-006 gaps.

Owner-held dispute and accounting operations

docs/payment-operations.md documents the personal-owner doors for verified dispute import, frozen booking evidence, exact response approval and one explicit QuickBooks sandbox principal handoff. Every mutation checks native owner authority and same-origin transport. The send reserves an owned callback before its network request; rejected and uncertain results remain attributable and cannot automatically retry. Portable history grants no execution authority. PAY-009 remains PARTIAL pending ct custody approval and its named remaining scope.

Experience catalog and reservations

Personal owners and managers use experience.save for a complete draft, then experience.publish {id,version,confirm:true} after reviewing it. experience.withdraw uses the same exact revision and explicit confirmation. Draft fields are name, image (an optional bounded PNG, JPEG or WebP data URL), menu, kind (free, deposit, prepaid), integer amountCents, currency:USD, serviceIds, areas, ticketClasses (name and guest-cover quantity limit), cancellationRules, turnMinutes, cleanupMinutes and a lastSeatingAt map keyed by dated service ID. Updates retain known ticket class IDs. Publication validates physical dining areas and every full applicable turn and reset. Read-only roles, preparation keys and shared-device sessions cannot mutate the catalog.

Both public read doors include the intentionally public experiences projection: descriptive content, terms, dates, areas, classes and bookingAvailable. Only free entries book online; priced listings create neither a reservation nor a payment. No guest or staff identity enters the public catalog. The existing search accepts experienceId and ticketClassId and returns matching experienceVersion with each result. Search and commit both enforce date, area and every required access tag. Booking and hold creation carry the selected three identifiers and acknowledgedExperienceTerms:true; changed terms or availability refuse with an explicit reselection path.

Experience allocations stay in the same dated service and physical ledger as ordinary reservations. Class quantities count guest covers per dated service, including live holds. Committing the real reservation consumes its own hold atomically. A saved experience promise cannot be replaced through another staff command; guest management and closure relocation retain its frozen terms. CSV and structured archives document catalog records, uploaded images and reservation snapshots. EXP-002 inherits this inventory and checkout protection before payment collection ships.

Optional diner accounts (DIST-005, PARTIAL)

Guest checkout at POST /api/public/book remains available without an account. The public /diner screen requests verification, opens the account and manages its favorite, preferences and individually verified reservations. This door grants no venue role and never merges guest profiles. Favorites and preferences belong only to the current restaurant installation. They are not applied to a booking or exposed in staff projections automatically.

All diner doors require a same-origin JSON POST, are uncached, and are subject to the public request limit. Supply these fields:

DoorFieldsResult
/api/public/diner/requestbookingId, email, acknowledged: trueGeneric 202 response. At most five requests per booking per UTC day can send a code to the current recorded booking email. Development and demo send nothing.
/api/public/diner/verifycode, acknowledged: trueOnce-shown device token, expiry and the one attached booking ID.
/api/public/diner/accounttokenVerified email, current venue, favorite, saved preferences, explicitly verified bookings and rebookUrl.
/api/public/diner/preferencestoken, boolean favorite, string preferences, acknowledged: trueSaves up to 500 characters for this restaurant. Empty preferences revoke the saved text; false removes the favorite.
/api/public/diner/logouttokenRevokes that device session.
/api/public/diner/forgettoken, acknowledged: trueRemoves the restaurant account, all its links, pending codes and all device sessions. Reservations stay unchanged.
/api/public/diner/management/statustoken, bookingIdOnly a booking individually verified for this account, with its current matching contact. Financial obligations require manager review.
/api/public/diner/management/previewtoken, bookingId, action and the existing BOOK-004 change fieldsSaves one exact reviewed plan for this device without changing the reservation.
/api/public/diner/management/committoken, bookingId, previewId, acknowledged: trueCommits only that device’s current preview, with live identity, capacity, state and money guards; consumes the preview.

The code is 32 random bytes, stored only as SHA-256, consumed atomically and expires in 15 minutes. A new request supersedes the earlier code for that booking. A changed or erased booking contact refuses verification. Failed or uncertain provider acceptance revokes the code; a 202 response does not claim mailbox delivery. There is no automatic retry.

Device tokens are separate random, digest-only bearers lasting 24 hours. Treat the once-shown token as a credential: never put it in a URL or log. A new device proves an explicitly selected booking again through email. Only the bookings individually verified for that email appear; another booking with the same email or phone is not attached automatically. Current contact matching is checked on reads. The API exposes no internal guest ID, staff notes, allergy records or other diners.

A favorite’s Book again action opens the existing /book page for a fresh capacity-checked guest booking. Contact and preferences are not copied automatically; the new booking needs separate verification before appearing in the account.

The /diner/manage screen reuses BOOK-004’s explicit preview and acknowledgment for time, party size, reservation contact, reconfirmation and cancellation. It grants no email-link issuance authority. Existing private booking-management links retain their own authority and financial restrictions. A changed contact email removes the old account’s access; proving the new address is required. Financially implicated reservations stay in manager review. Each device holds one reviewed reservation preview at a time; a replacement preview, changed reservation, consumed confirmation, expired session or revocation prevents reuse. Device credentials remain in tab session storage, never a URL, and all previews are excluded with sessions from archives.

Owner-only CSV kinds diner-accounts and diner-bookings contain csv_version, data_json and these complete business fields. Structured archives retain the same fields in the named tables:

CSV kind and archive tablePortable fields
diner-accounts, pm_diner_accountsid: stable account ID; email: trimmed lowercase verified email; created_at: creation instant; updated_at: latest favorite or preference update instant, initially creation; favorite: integer 0 or 1 for this restaurant; preferences: saved text of at most 500 characters, empty when revoked.
diner-bookings, pm_diner_bookingsaccount_id: account link; booking_id: reservation link; guest_id: recorded guest link; verified_at: latest successful explicit verification instant for that account and reservation. The account and booking pair is the composite key; there is no separate link ID.

The portability guide defines reconciliation, relationships and exclusions. Staged restore rejects duplicate or malformed accounts and links, missing account, reservation or non-erased guest references, a link whose guest differs from its reservation’s guest, invalid timestamps, unsupported favorite values and overlong preferences before applying staged product records. Restored links are historical records; absent sessions require fresh email proof and live current-contact checks before access.

pm_diner_challenges, pm_diner_sessions and pm_diner_mail_limits are archive exclusions and have no business CSV kind. Live pending proofs, their private booking, guest and current-contact references, code digests and expiry are excluded. Device digests, expiry and every reservation-management preview field are excluded with sessions. Raw codes and device bearers are never portable fields. Preference changes and forgetting fence older archives through the existing redaction checkpoint. Guest erasure removes linked diner accounts, verified links, pending proofs and associated device sessions; privacy access exports include linked account fields and saved preferences. Retention review includes the latest diner preference update. A new destination requires a trusted later same-source journal to recognize a forget or erasure absent from an old archive.

CT approved the booking-scoped verification and management scope with riders in both 26 October 2026 rulings. The approved controls above retain explicit current-contact proof for each attached booking, independent expiring devices, explicit confirmation of fresh device-bound previews, unchanged financial obligations requiring manager review, and no charge, refund, fee waiver or automatic message authority. Verification grants no staff role, marketing permission, review eligibility or group-sharing permission. There is no cross-installation identity or permission pooling. The complete favorite, prior-visit repeat-booking and upcoming-reservation management target across devices remains binding, with DATA-003 portability, DATA-002 erasure and AUDIT-001 accountability. DIST-006 and GUEST-006 must independently establish review eligibility and group consent under their preserved receiving duties.

DIST-005 remains PARTIAL under the 27 October 2026 CT ruling. Approval of this scope does not establish completion: every original acceptance point, both approved rider paragraphs and all DONE-RIDERS rows must pass, including direct public-door assertions and exact-candidate landing evidence, before DONE can be claimed.

Recurring native report types

The existing report-schedule door accepts reportKind: group-covers (the unchanged default), reservations, guests or finance. Local kinds select only venueIds: ["home"], with an optional existing serviceId; all filters use the service's local start date. The seven-day cadence and complete-date window are unchanged. The same native identities, current service scopes and field permissions govern the scheduled check, each explicit resend and every open of the authenticated live CSV. Exact-address approval, no report snapshot, private metadata, no automatic uncertain resend and inert restore remain binding.

Reservation recipients are native owners or managers; scoped managers must have the selected service. Guest recipients and schedule creators use existing personal owner authority. Guest rows omit erased people, private notes and requests, and preserve recorded booking contact consent and preference, including false and unknown states. An owner data report never grants permission to contact a guest or marketing permission. Finance creators are owners; recipients are owners or current separately granted finance readers under ROLE-004 and ct RL-105. Finance CSVs contain booking-bound request, charge and refund amounts and current reconciliation in integer cents, without guest contacts, private notes, free-text reasons or payment credentials. Group grants never confer guest or finance access.

GET /api/report-export.csv?kind=guests uses personal owner authority; kind=finance uses personal owner or current finance authority. Both reuse the existing local date, period and service filters. All scheduled kinds are shown under Weekly report delivery in Settings. Existing group recipients and native finance scopes are unchanged; no marketing or provider authority is created.

Booking email delivery observations

The existing personal owner or admin booking.management.send command remains the only sending door in this slice. Callback observations grant no send, reply, retry, booking mutation or private-link authority. Existing acknowledgment, recorded-contact selection, link revocation and daily limits continue to apply.

For Resend observations, the owner configures the stable runtime bindings RER_INSTALLATION_ID and MAIL_EVENT_NAMESPACE, with the private RESEND_WEBHOOK_SECRET belonging to that installation's Resend endpoint. These bindings are server configuration, never callback fields or browser settings. The endpoint is POST /api/booking-mail/events. Missing configuration refuses with 503. Development and demo modes refuse this intake. Key rotation preserves the same namespace. Changing the installation or namespace does not adopt old messages. No runtime secret or executable link is returned by a read or export. This native implementation establishes no live account, webhook configuration, sending-domain verification or provider qualification.

Only newly accepted booking-link sends with a stored installation, Resend, namespace, message ID and original single recipient are eligible. Authentication mail, foreign IDs, inadequately bound earlier sends, altered or extra recipients, forged signatures, erased guests and historical restored bindings refuse. A later booking-contact change does not rewrite the original recipient. Exact raw bytes and Svix headers enter the shipped mail intake and D1 store unchanged. SQL receipt and state fences recheck the binding during the durable transaction. Erasure deletes bindings and all linked receipts and states in the same guest-erasure batch, including a racing callback or late send response.

GET /api/booking-mail and the reservation email panel in the service view expose current personal owners and admins to provider acceptance, current delivery state and distinct retained provider facts. Host, member, server, preparation-key and shared-device reads refuse. Current authority is checked again on every read. Duplicate events add no fact. Conflicting identities roll back. Pending facts cannot regress a terminal state, and older or equal terminal facts do not replace the current state; distinct facts remain visible. Delivery means receiving mail server acceptance, without proof of a guest read. Observations never change a reservation, link, issue count or outbound count, and never initiate a resend.

Owner business CSV kinds booking-mail and booking-mail-events reconcile the bindings, current state and normalized provider facts. Subject access exports include only that guest's observations. Retention review includes the message's recorded dates. Reviewed privacy erasure creates open Resend processor follow-up references without making a provider request or claiming deletion there. Business backups retain history with historical=1; staged validation rejects broken guest, booking, message, recipient, receipt and state relationships. Restored facts grant no callback authorization or executable management link. A trusted later same-source erasure journal refuses an older archive; current erasure also invalidates retained transfer snapshots. Full category expiry and actual processor deletion receipts remain DATA-004 duties.