# Run sheet tools

[All tool areas](/docs/tools.md). Each tool acts within your access.

## Run sheet

### get_run_sheet

Get one session's run sheet: its confirmed bookings in the order they booked (then as the orders were made), each with party size, the guest's name as you may see it, menu choices, the answers to kitchen and run sheet questions per guest (past the party flagged), staff's note, whether money is owing, and check-ins (null until check-in exists); with the session's totals: seats, the kitchen's counts by course and choice (as get_kitchen_counts), allergen and dietary plates, guests' notes, seats nobody chose a dish for. Needs sessions:read and kitchen:read where the session is. Names need bookings:read (full names customers:contact, else first names), money orders:amounts, notes both; someone with only kitchen:read (a venue partner) gets the kitchen's view: each booking by its code and party size with choices, allergies and dietary notes, and no names, contacts, notes, or money.

Reads · Members of an organization · Needs kitchen:read, sessions:read

#### Input

- `sessionId` — string; required. The session's id, from list_sessions

#### Output

- `tipQr` — object or null; optional. The QR code guests tip by for this session's product at its location, while the tipQr setting is on there; null otherwise. Always present
  - `tipQr.url` — string; required. What the QR code holds: the tip page, BOOKING_URL/<organization>/tip/<token>
  - `tipQr.svg` — string; required. The QR code as an SVG document (black on white, with its quiet zone), for any size
- `session` — object; required. 
  - `session.sessionId` — string; required. 
  - `session.productId` — string; required. 
  - `session.productName` — string; required. 
  - `session.hasMenu` — boolean; required. Whether its product has an active menu where this session is offered (the location's own, else one for all its locations): a dining session, with menu choices and a kitchen sheet. Without one, the session has no kitchen sheet.
  - `session.locationId` — string; required. 
  - `session.locationName` — string; required. 
  - `session.startsAt` — string; required.  format: "date-time"
  - `session.localStart` — string; required. At the location, YYYY-MM-DDTHH:MM
  - `session.status` — string; required. 
  - `session.menuCutoffAt` — string; required.  format: "date-time"
  - `session.block` — object or null; optional. The closure or product block it's inside, which takes it off sale (its bookings stay); null when none. Always present
    - `session.block.id` — string; required. 
    - `session.block.kind` — string; required.  Allowed: "closure", "product"
    - `session.block.note` — string or null; required. 
- `view` — string; required. floor: the caller holds bookings:read here (names as far as they may see them). kitchen: codes, choices, and notes only Allowed: "floor", "kitchen"
- `bookings` — array; required. 
  - `bookings[]` — object; optional. 
    - `bookings[].code` — string; required. The booking code
    - `bookings[].partySize` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `bookings[].name` — string or null; required. The guest as the caller may see them: the full name with customers:contact, the first name with bookings:read, null for the kitchen's view
    - `bookings[].bookingId` — string or null; required. Null in the kitchen's view
    - `bookings[].orderId` — string or null; required. Null in the kitchen's view
    - `bookings[].bookedAt` — string or null; required.  format: "date-time"
    - `bookings[].menu` — array; required. The booking's menu counts, by course in the menu's order
      - `bookings[].menu[]` — object; optional. 
        - `bookings[].menu[].course` — string; required. 
        - `bookings[].menu[].choice` — string or null; required. Null: seats nobody chose for (no default)
        - `bookings[].menu[].quantity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
        - `bookings[].menu[].defaulted` — boolean; required. The course's default filled these seats
    - `bookings[].answers` — array; required. 
      - `bookings[].answers[]` — object; optional. 
        - `bookings[].answers[].questionId` — string; required. 
        - `bookings[].answers[].question` — string; required. 
        - `bookings[].answers[].participant` — integer or null; required. Which guest (1 to the party); null for the booking minimum: -9007199254740991; maximum: 9007199254740991
        - `bookings[].answers[].value` — one of: string, number, boolean, array; required. 
          - `bookings[].answers[].value — array option 4` — array; optional. 
            - `bookings[].answers[].value — array option 4[]` — string; optional. 
        - `bookings[].answers[].kitchen` — boolean; required. A kitchen question (allergies, dietary needs)
        - `bookings[].answers[].runSheet` — boolean; required. A run sheet question
        - `bookings[].answers[].pastParty` — boolean; required. This guest's number is past the party as it is now: the seat count dropped after it was answered, so they may still be coming
        - `bookings[].answers[].warning` — string or null; required. What to tell the room about a pastParty answer; else null
    - `bookings[].staffNote` — string or null; required. Needs bookings:read and orders:amounts; else null
    - `bookings[].paymentDue` — boolean or null; required. Whether the booking still owes money, so the host sends them to the desk. Needs bookings:read; null in the kitchen's view
    - `bookings[].balanceDue` — integer or null; required. Minor units. Needs orders:amounts and bookings:read; else null minimum: -9007199254740991; maximum: 9007199254740991
    - `bookings[].currency` — string or null; required. 
    - `bookings[].checkedIn` — integer; required. Guests checked in, 0 to the party minimum: -9007199254740991; maximum: 9007199254740991
- `totals` — object; required. 
  - `totals.bookings` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
  - `totals.seats` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
  - `totals.courses` — array; required. get_kitchen_counts' counts for this session
    - `totals.courses[]` — object; optional. 
      - `totals.courses[].courseId` — string; required. 
      - `totals.courses[].name` — string; required. 
      - `totals.courses[].choices` — array; required. 
        - `totals.courses[].choices[]` — object; optional. 
          - `totals.courses[].choices[].choiceId` — string or null; required. Null: seats nobody chose for (no default)
          - `totals.courses[].choices[].name` — string or null; required. 
          - `totals.courses[].choices[].quantity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
          - `totals.courses[].choices[].defaulted` — integer; required. Of these, the seats the course's default filled minimum: -9007199254740991; maximum: 9007199254740991
          - `totals.courses[].choices[].allergens` — array; required. 
            - `totals.courses[].choices[].allergens[]` — string; optional. 
          - `totals.courses[].choices[].dietary` — array; required. 
            - `totals.courses[].choices[].dietary[]` — string; optional. 
  - `totals.allergens` — array; required. 
    - `totals.allergens[]` — object; optional. 
      - `totals.allergens[].allergen` — string; required. 
      - `totals.allergens[].plates` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
  - `totals.dietary` — array; required. 
    - `totals.dietary[]` — object; optional. 
      - `totals.dietary[].tag` — string; required. 
      - `totals.dietary[].plates` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
  - `totals.guestNotes` — object; required. Guests' answers to kitchen questions (allergies, dietary needs), and the bookings with any
    - `totals.guestNotes.answers` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `totals.guestNotes.bookings` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
  - `totals.notChosen` — integer; required. Seats nobody chose a dish for in some course (no default) minimum: -9007199254740991; maximum: 9007199254740991
  - `totals.paymentDue` — integer or null; required. Bookings still owing money. Needs bookings:read; else null minimum: -9007199254740991; maximum: 9007199254740991
  - `totals.checkedIn` — integer; required. Guests checked in across the session's bookings minimum: -9007199254740991; maximum: 9007199254740991
