# Bookings tools

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

## Bookings

### change_booking_seats

Add or remove seats on a confirmed booking of individual tickets, under the session's lock, with capacity checked (a ticket type's own too, and the stock of what its seats include). `lines` says each ticket type's seats from now on. Existing seats keep the price and tax they locked; seats added are a new sale, at what the same party, at its new size, would pay now and today's tax rates, as their own line if either differs. Its fees' rates and a promo code's terms stay as the order locked them, and apply to the new lines too. Seats come off the latest added first. Removing seats refunds nothing: the preview says what's now over-paid, and refund_order is a separate step. A fee sold as non-refundable (the service charge) stays at what was paid toward it, so a removed seat's service charge stays on a paid total; a refundable fee, or one on an unpaid booking, recalculates. The balance due follows. A group or private booking is refused, since its price is for the party. Menu counts follow (a new guest takes the default; the preview says if chosen seats came off). The guest is emailed what changed and the new total (changeEmail); an undo that comes after that email tells them it's back. Undo puts the seats back while nothing has changed or moved since and the seats are still free. Returns a preview to confirm.

Changes · Members of an organization · Needs bookings:write

#### Input

- `orderId` — string; required. The order's id, from list_bookings or list_orders
- `lines` — array; required. The seats per ticket type from now on. A ticket type left out stays as it is minItems: 1; maxItems: 50
  - `lines[]` — object; optional. 
    - `lines[].ticketTypeId` — string; required. The ticket type's id, from get_product
    - `lines[].quantity` — integer; required. Seats of this type from now on; 0 takes them all off minimum: 0; maximum: 10000

#### Output

- `booking` — object; required. 
  - `booking.id` — string; required. 
  - `booking.code` — string; required. The booking code guests quote
  - `booking.status` — string; required.  Allowed: "pending", "confirmed", "canceled"
  - `booking.cancelReason` — string or null; required.  Allowed: "seats\_unavailable", "guest\_request", "session\_canceled", "duplicate", "other"
  - `booking.cancelNote` — string or null; required. Staff's own words. Null without orders:amounts
  - `booking.createdAt` — string; required.  format: "date-time"
  - `booking.confirmedAt` — string or null; required.  format: "date-time"
  - `booking.canceledAt` — string or null; required.  format: "date-time"
  - `booking.customer` — object; required. 
    - `booking.customer.id` — string; required. 
    - `booking.customer.name` — string; required. The first name only, without customers:contact
    - `booking.customer.email` — string or null; required. Null without customers:contact
    - `booking.customer.phone` — string or null; required. Null without customers:contact, or when there's none
    - `booking.customer.contactHidden` — boolean; required. True when email and phone are hidden from you (you lack customers:contact here). False with a null email or phone means the guest gave none
  - `booking.product` — object; required. 
    - `booking.product.id` — string; required. 
    - `booking.product.name` — string; required. 
  - `booking.location` — object; required. 
    - `booking.location.id` — string; required. 
    - `booking.location.name` — string; required. 
    - `booking.location.timeZone` — string; required. 
  - `booking.session` — object; required. 
    - `booking.session.id` — string; required. 
    - `booking.session.startsAt` — string; required.  format: "date-time"
    - `booking.session.when` — string; required. In the location's time zone
  - `booking.partySize` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
  - `booking.currency` — string; required. 
  - `booking.total` — integer or null; required. Null without orders:amounts
  - `booking.paid` — integer or null; required. Null without orders:amounts
  - `booking.refunded` — integer or null; required. Refunded or on its way back. Null without orders:amounts
  - `booking.kept` — integer or null; required. Fees sold as non-refundable (the service charge) and their tax, kept on staff refunds, as far as the money is still held: 0 once everything paid has come back, refunded or as a credit in its place (a session the operator moved or called off), and none on an order canceled before it was booked. Null without orders:amounts
  - `booking.refundable` — integer or null; required. What staff can still refund: paid, less refunds, less a credit given in place of a refund (a session moved or called off), less what's kept. Null without orders:amounts
  - `booking.refunds` — array; required. 
    - `booking.refunds[]` — object; optional. 
      - `booking.refunds[].id` — string; required. 
      - `booking.refunds[].amount` — integer or null; required. Null without orders:amounts
      - `booking.refunds[].status` — string; required. pending (on its way), succeeded, failed, or reversed: given as a credit or gift certificate that was voided unused since, so it was taken back and isn't counted as refunded Allowed: "pending", "succeeded", "failed", "reversed"
      - `booking.refunds[].reason` — string or null; required.  Allowed: "seats\_unavailable", "guest\_request", "session\_canceled", "service\_issue", "duplicate", "goodwill", "other"
      - `booking.refunds[].note` — string or null; required. Staff's own words. Null without orders:amounts
      - `booking.refunds[].failureReason` — string or null; required. 
      - `booking.refunds[].createdAt` — string; required.  format: "date-time"
      - `booking.refunds[].tender` — string; optional. What the refunded payment was made with: card (back to the guest's card), gift_certificate or credit (back to it), or an offline tender (card_terminal, cash, debit, e_transfer, cheque), which staff gave back that way at the desk; a voucher's part is given back as a credit (creditId), and a guest's own refund under the booking's refundDestination as a credit (creditId) or gift certificate (giftCertificateId) instead of back to the card or the desk Allowed: "card", "gift\_certificate", "credit", "card\_terminal", "cash", "debit", "e\_transfer", "cheque", "voucher"
      - `booking.refunds[].creditId` — string or null; optional. The credit this refund became instead of going back where it was paid: a third party's voucher can't be handed back, so its part is a credit (voucher_refunded); a guest's own cancellation or change under refundDestination credit gives one (guest_change). The same credit the booking's credits list shows. Null for every other refund. Always present
      - `booking.refunds[].giftCertificateId` — string or null; optional. The gift certificate (kind refund) this refund became instead of going back where it was paid: a guest's own cancellation or change under refundDestination gift_certificate. Null for every other refund. Always present
      - `booking.refunds[].issuer` — string or null; optional. Who issued the voucher the refunded payment was (such as Costco); null for any other tender, and without orders:amounts. Always present
  - `booking.bookingId` — string or null; optional. Null until it's booked. Always present
  - `booking.booker` — string; optional. Who made it: a guest at checkout, or staff. Always present Allowed: "customer", "staff"
  - `booking.balanceDue` — integer or null; optional. What's still owing. Above 0 on a staff booking with payment to come, or seats added since: confirmed isn't paid. Null without orders:amounts. Always present
  - `booking.overPaid` — integer or null; optional. What's been paid beyond the total: seats removed, which refunds nothing by itself. Null without orders:amounts. Always present
  - `booking.paymentStatus` — string or null; optional. unpaid, partly_paid, paid, over_paid, refunded (all but any kept fee has gone back), or nothing_due, from what's actually been paid. A partial refund stays paid. Null without orders:amounts. Always present Allowed: "unpaid", "partly\_paid", "paid", "over\_paid", "refunded", "nothing\_due"
  - `booking.staffNote` — string or null; optional. Staff's own note, never shown to the guest. Null without orders:amounts, or when there's none. Always present
- `partySize` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `total` — integer or null; required. Null without orders:amounts
- `balanceDue` — integer or null; required. Null without orders:amounts
- `overPaid` — integer or null; required. Null without orders:amounts

### create_staff_booking

Book a party straight into a session for a walk-in or a phone call: seats by ticket type or a group option, extras and menu counts, the customer's name (email and phone optional), a note. It confirms at once, priced by the same engine as guests' bookings, with any `promoCode`. Capacity and a session taken whole bind staff; the party size limits, the booking window, and sales windows don't (the settings' `…AppliesTo` can say otherwise), and the preview warns what a guest couldn't have done. It takes no card: a total above 0 is confirmed with that balance due, `paymentStatus: unpaid`, and staff take payment outside Lokl. With an email the guest gets their confirmation saying what's still to pay; with none, nothing is sent. A private session is booked through its link instead. Undo cancels it if nothing has been built on it. Returns a preview to confirm.

Changes · Members of an organization · Needs bookings:write

#### Input

- `productId` — string; required. The product's id, from list_products
- `sessionId` — string; required. The session's id, from list_sessions
- `lines` — array; optional. Seats by ticket type. Give this or `group` minItems: 1; maxItems: 20
  - `lines[]` — object; optional. 
    - `lines[].ticketTypeId` — string; required. The ticket type's id, from get_product
    - `lines[].quantity` — integer; required.  minimum: 1; maximum: 100
- `group` — object; optional. A group option for a party. Give this or `lines`
  - `group.groupOptionId` — string; required. A group option from list_availability
  - `group.partySize` — integer; required.  minimum: 1; maximum: 10000
- `addOns` — array; optional.  maxItems: 20
  - `addOns[]` — object; optional. 
    - `addOns[].addOnId` — string; required. An add-on from list_availability's addOns
    - `addOns[].quantity` — integer; required.  minimum: 1; maximum: 1000
- `menu` — array; optional.  maxItems: 50
  - `menu[]` — object; optional. 
    - `menu[].choiceId` — string; required. A choice from list_availability's menu
    - `menu[].quantity` — integer; required.  minimum: 0; maximum: 10000
- `promoCode` — string; optional. A promo code as the guest typed it, in any case minLength: 1; maxLength: 200
- `customer` — object or null; required. Required. It's null only in a stored changeset, which drops it once it's applied
  - `customer.name` — string; required.  minLength: 1; maxLength: 200
  - `customer.email` — string; optional. Finds their customer record, which is never rewritten; with none, nothing is sent format: "email"; maxLength: 254
  - `customer.phone` — string; optional.  minLength: 1; maxLength: 40
- `note` — string or null; optional. Staff's own note. Never shown to the guest minLength: 1; maxLength: 2000

#### Output

- `booking` — object; required. 
  - `booking.id` — string; required. 
  - `booking.code` — string; required. The booking code guests quote
  - `booking.status` — string; required.  Allowed: "pending", "confirmed", "canceled"
  - `booking.cancelReason` — string or null; required.  Allowed: "seats\_unavailable", "guest\_request", "session\_canceled", "duplicate", "other"
  - `booking.cancelNote` — string or null; required. Staff's own words. Null without orders:amounts
  - `booking.createdAt` — string; required.  format: "date-time"
  - `booking.confirmedAt` — string or null; required.  format: "date-time"
  - `booking.canceledAt` — string or null; required.  format: "date-time"
  - `booking.customer` — object; required. 
    - `booking.customer.id` — string; required. 
    - `booking.customer.name` — string; required. The first name only, without customers:contact
    - `booking.customer.email` — string or null; required. Null without customers:contact
    - `booking.customer.phone` — string or null; required. Null without customers:contact, or when there's none
    - `booking.customer.contactHidden` — boolean; required. True when email and phone are hidden from you (you lack customers:contact here). False with a null email or phone means the guest gave none
  - `booking.product` — object; required. 
    - `booking.product.id` — string; required. 
    - `booking.product.name` — string; required. 
  - `booking.location` — object; required. 
    - `booking.location.id` — string; required. 
    - `booking.location.name` — string; required. 
    - `booking.location.timeZone` — string; required. 
  - `booking.session` — object; required. 
    - `booking.session.id` — string; required. 
    - `booking.session.startsAt` — string; required.  format: "date-time"
    - `booking.session.when` — string; required. In the location's time zone
  - `booking.partySize` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
  - `booking.currency` — string; required. 
  - `booking.total` — integer or null; required. Null without orders:amounts
  - `booking.paid` — integer or null; required. Null without orders:amounts
  - `booking.refunded` — integer or null; required. Refunded or on its way back. Null without orders:amounts
  - `booking.kept` — integer or null; required. Fees sold as non-refundable (the service charge) and their tax, kept on staff refunds, as far as the money is still held: 0 once everything paid has come back, refunded or as a credit in its place (a session the operator moved or called off), and none on an order canceled before it was booked. Null without orders:amounts
  - `booking.refundable` — integer or null; required. What staff can still refund: paid, less refunds, less a credit given in place of a refund (a session moved or called off), less what's kept. Null without orders:amounts
  - `booking.refunds` — array; required. 
    - `booking.refunds[]` — object; optional. 
      - `booking.refunds[].id` — string; required. 
      - `booking.refunds[].amount` — integer or null; required. Null without orders:amounts
      - `booking.refunds[].status` — string; required. pending (on its way), succeeded, failed, or reversed: given as a credit or gift certificate that was voided unused since, so it was taken back and isn't counted as refunded Allowed: "pending", "succeeded", "failed", "reversed"
      - `booking.refunds[].reason` — string or null; required.  Allowed: "seats\_unavailable", "guest\_request", "session\_canceled", "service\_issue", "duplicate", "goodwill", "other"
      - `booking.refunds[].note` — string or null; required. Staff's own words. Null without orders:amounts
      - `booking.refunds[].failureReason` — string or null; required. 
      - `booking.refunds[].createdAt` — string; required.  format: "date-time"
      - `booking.refunds[].tender` — string; optional. What the refunded payment was made with: card (back to the guest's card), gift_certificate or credit (back to it), or an offline tender (card_terminal, cash, debit, e_transfer, cheque), which staff gave back that way at the desk; a voucher's part is given back as a credit (creditId), and a guest's own refund under the booking's refundDestination as a credit (creditId) or gift certificate (giftCertificateId) instead of back to the card or the desk Allowed: "card", "gift\_certificate", "credit", "card\_terminal", "cash", "debit", "e\_transfer", "cheque", "voucher"
      - `booking.refunds[].creditId` — string or null; optional. The credit this refund became instead of going back where it was paid: a third party's voucher can't be handed back, so its part is a credit (voucher_refunded); a guest's own cancellation or change under refundDestination credit gives one (guest_change). The same credit the booking's credits list shows. Null for every other refund. Always present
      - `booking.refunds[].giftCertificateId` — string or null; optional. The gift certificate (kind refund) this refund became instead of going back where it was paid: a guest's own cancellation or change under refundDestination gift_certificate. Null for every other refund. Always present
      - `booking.refunds[].issuer` — string or null; optional. Who issued the voucher the refunded payment was (such as Costco); null for any other tender, and without orders:amounts. Always present
  - `booking.bookingId` — string or null; optional. Null until it's booked. Always present
  - `booking.booker` — string; optional. Who made it: a guest at checkout, or staff. Always present Allowed: "customer", "staff"
  - `booking.balanceDue` — integer or null; optional. What's still owing. Above 0 on a staff booking with payment to come, or seats added since: confirmed isn't paid. Null without orders:amounts. Always present
  - `booking.overPaid` — integer or null; optional. What's been paid beyond the total: seats removed, which refunds nothing by itself. Null without orders:amounts. Always present
  - `booking.paymentStatus` — string or null; optional. unpaid, partly_paid, paid, over_paid, refunded (all but any kept fee has gone back), or nothing_due, from what's actually been paid. A partial refund stays paid. Null without orders:amounts. Always present Allowed: "unpaid", "partly\_paid", "paid", "over\_paid", "refunded", "nothing\_due"
  - `booking.staffNote` — string or null; optional. Staff's own note, never shown to the guest. Null without orders:amounts, or when there's none. Always present

### get_booking

Get one booking's page: its summary (as list_bookings gives it), its seats by ticket type, extras, menu counts, answers to booking questions, payments, refunds, balance due, and history from the activity log, newest first. By its order id. Without orders:amounts every amount, the payments' status, and the note are null; without customers:contact the guest is a first name; a history entry's data needs both, as in list_activity.

Reads · Members of an organization · Needs bookings:read

#### Input

- `orderId` — string; required. The order's id, from list_bookings or list_orders

#### Output

- `booking` — object; required. 
  - `booking.id` — string; required. 
  - `booking.code` — string; required. The booking code guests quote
  - `booking.status` — string; required.  Allowed: "pending", "confirmed", "canceled"
  - `booking.cancelReason` — string or null; required.  Allowed: "seats\_unavailable", "guest\_request", "session\_canceled", "duplicate", "other"
  - `booking.cancelNote` — string or null; required. Staff's own words. Null without orders:amounts
  - `booking.createdAt` — string; required.  format: "date-time"
  - `booking.confirmedAt` — string or null; required.  format: "date-time"
  - `booking.canceledAt` — string or null; required.  format: "date-time"
  - `booking.customer` — object; required. 
    - `booking.customer.id` — string; required. 
    - `booking.customer.name` — string; required. The first name only, without customers:contact
    - `booking.customer.email` — string or null; required. Null without customers:contact
    - `booking.customer.phone` — string or null; required. Null without customers:contact, or when there's none
    - `booking.customer.contactHidden` — boolean; required. True when email and phone are hidden from you (you lack customers:contact here). False with a null email or phone means the guest gave none
  - `booking.product` — object; required. 
    - `booking.product.id` — string; required. 
    - `booking.product.name` — string; required. 
  - `booking.location` — object; required. 
    - `booking.location.id` — string; required. 
    - `booking.location.name` — string; required. 
    - `booking.location.timeZone` — string; required. 
  - `booking.session` — object; required. 
    - `booking.session.id` — string; required. 
    - `booking.session.startsAt` — string; required.  format: "date-time"
    - `booking.session.when` — string; required. In the location's time zone
  - `booking.partySize` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
  - `booking.currency` — string; required. 
  - `booking.total` — integer or null; required. Null without orders:amounts
  - `booking.paid` — integer or null; required. Null without orders:amounts
  - `booking.refunded` — integer or null; required. Refunded or on its way back. Null without orders:amounts
  - `booking.kept` — integer or null; required. Fees sold as non-refundable (the service charge) and their tax, kept on staff refunds, as far as the money is still held: 0 once everything paid has come back, refunded or as a credit in its place (a session the operator moved or called off), and none on an order canceled before it was booked. Null without orders:amounts
  - `booking.refundable` — integer or null; required. What staff can still refund: paid, less refunds, less a credit given in place of a refund (a session moved or called off), less what's kept. Null without orders:amounts
  - `booking.refunds` — array; required. 
    - `booking.refunds[]` — object; optional. 
      - `booking.refunds[].id` — string; required. 
      - `booking.refunds[].amount` — integer or null; required. Null without orders:amounts
      - `booking.refunds[].status` — string; required. pending (on its way), succeeded, failed, or reversed: given as a credit or gift certificate that was voided unused since, so it was taken back and isn't counted as refunded Allowed: "pending", "succeeded", "failed", "reversed"
      - `booking.refunds[].reason` — string or null; required.  Allowed: "seats\_unavailable", "guest\_request", "session\_canceled", "service\_issue", "duplicate", "goodwill", "other"
      - `booking.refunds[].note` — string or null; required. Staff's own words. Null without orders:amounts
      - `booking.refunds[].failureReason` — string or null; required. 
      - `booking.refunds[].createdAt` — string; required.  format: "date-time"
      - `booking.refunds[].tender` — string; optional. What the refunded payment was made with: card (back to the guest's card), gift_certificate or credit (back to it), or an offline tender (card_terminal, cash, debit, e_transfer, cheque), which staff gave back that way at the desk; a voucher's part is given back as a credit (creditId), and a guest's own refund under the booking's refundDestination as a credit (creditId) or gift certificate (giftCertificateId) instead of back to the card or the desk Allowed: "card", "gift\_certificate", "credit", "card\_terminal", "cash", "debit", "e\_transfer", "cheque", "voucher"
      - `booking.refunds[].creditId` — string or null; optional. The credit this refund became instead of going back where it was paid: a third party's voucher can't be handed back, so its part is a credit (voucher_refunded); a guest's own cancellation or change under refundDestination credit gives one (guest_change). The same credit the booking's credits list shows. Null for every other refund. Always present
      - `booking.refunds[].giftCertificateId` — string or null; optional. The gift certificate (kind refund) this refund became instead of going back where it was paid: a guest's own cancellation or change under refundDestination gift_certificate. Null for every other refund. Always present
      - `booking.refunds[].issuer` — string or null; optional. Who issued the voucher the refunded payment was (such as Costco); null for any other tender, and without orders:amounts. Always present
  - `booking.bookingId` — string or null; optional. Null until it's booked. Always present
  - `booking.booker` — string; optional. Who made it: a guest at checkout, or staff. Always present Allowed: "customer", "staff"
  - `booking.balanceDue` — integer or null; optional. What's still owing. Above 0 on a staff booking with payment to come, or seats added since: confirmed isn't paid. Null without orders:amounts. Always present
  - `booking.overPaid` — integer or null; optional. What's been paid beyond the total: seats removed, which refunds nothing by itself. Null without orders:amounts. Always present
  - `booking.paymentStatus` — string or null; optional. unpaid, partly_paid, paid, over_paid, refunded (all but any kept fee has gone back), or nothing_due, from what's actually been paid. A partial refund stays paid. Null without orders:amounts. Always present Allowed: "unpaid", "partly\_paid", "paid", "over\_paid", "refunded", "nothing\_due"
  - `booking.staffNote` — string or null; optional. Staff's own note, never shown to the guest. Null without orders:amounts, or when there's none. Always present
- `seats` — array; required. 
  - `seats[]` — object; optional. 
    - `seats[].ticketTypeId` — string; required. 
    - `seats[].name` — string; required. 
    - `seats[].quantity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `seats[].unitAmount` — integer or null; required. Per seat as sold, before fees and tax; seats added later can have a line of their own at another price. Null without orders:amounts
    - `seats[].group` — object or null; required. A group or private line: its base charge covers includedSeats, then unitAmount a seat
      - `seats[].group.baseAmount` — integer or null; required. Minor units (cents) in the location's currency
      - `seats[].group.includedSeats` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `seats[].amount` — integer or null; required. The line after any promo code, before fees and tax. Null without orders:amounts
- `extras` — array; required. 
  - `extras[]` — object; optional. 
    - `extras[].addOnId` — string; required. 
    - `extras[].name` — string; required. 
    - `extras[].quantity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `extras[].includedIn` — string or null; required. The ticket type whose package includes it
    - `extras[].menuChoiceId` — string or null; required. A menu choice's supplement
    - `extras[].unitAmount` — integer or null; required. Null without orders:amounts
- `menu` — array; required. 
  - `menu[]` — object; optional. 
    - `menu[].courseId` — string; required. 
    - `menu[].course` — string; required. 
    - `menu[].choiceId` — string or null; required. 
    - `menu[].choice` — string or null; required. Null for seats still to choose
    - `menu[].quantity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `menu[].defaulted` — boolean; required. 
- `answers` — array; required. 
  - `answers[]` — object; optional. 
    - `answers[].orderId` — string; required. 
    - `answers[].code` — string; required. The order's booking code
    - `answers[].bookingId` — string or null; required. 
    - `answers[].sessionId` — string; required. 
    - `answers[].questionId` — string; required. 
    - `answers[].question` — string; required. 
    - `answers[].participant` — integer or null; required. Which guest (1 to the party size) for a participant question; null for the booking minimum: -9007199254740991; maximum: 9007199254740991
    - `answers[].value` — one of: string, number, boolean, array; required. 
      - `answers[].value — array option 4` — array; optional. 
        - `answers[].value — array option 4[]` — string; optional. 
    - `answers[].answeredBy` — string; required.  Allowed: "guest", "staff"
    - `answers[].staffOnly` — boolean; required. 
    - `answers[].runSheet` — boolean; required. 
    - `answers[].kitchen` — boolean; required. 
    - `answers[].pastParty` — boolean; optional. This guest's seat was taken off the booking after it was answered: no guest has this number now (guest numbers never change, and a checked-in guest is never the one removed). A guest number doesn't say who left, so this guest may still be coming: check before relying on it. Always present
- `guestPositions` — array; optional. The guest numbers still in the party, for a participant question's answer (numbers never renumber, so after a seat change they may skip). Empty before the booking has its guests: use 1 to the party size then
  - `guestPositions[]` — integer; optional.  minimum: -9007199254740991; maximum: 9007199254740991
- `questions` — array; optional. The questions this booking can be asked, as staff see them: its product's active questions everywhere or at its location, staff-only ones included, in their order. Answers are in `answers`.
  - `questions[]` — object; optional. 
    - `questions[].id` — string; required. 
    - `questions[].label` — string; required. 
    - `questions[].helpText` — string or null; required. 
    - `questions[].scope` — string; required.  Allowed: "booking", "participant"
    - `questions[].type` — string; required. text, number, single_choice or multiple_choice (from `choices`), or yes_no Allowed: "text", "number", "single\_choice", "multiple\_choice", "yes\_no"
    - `questions[].choices` — array; required. 
      - `questions[].choices[]` — string; optional. 
    - `questions[].required` — boolean; required. 
    - `questions[].staffOnly` — boolean; required. 
    - `questions[].kitchen` — boolean; required. 
- `credits` — array; optional. Credits issued for this order (given instead of a refund when its session moved or was cancelled, or by staff), newest first, shown as list_credits shows them
  - `credits[]` — object; optional. 
    - `credits[].id` — string; required. 
    - `credits[].code` — string; required. What the guest quotes to use it. In full only to someone who may give a credit there (refunds:create and orders:amounts); masked (•••• and its last 4) otherwise, since whoever reads it can spend it
    - `credits[].status` — string; required.  Allowed: "active", "voided", "expired"
    - `credits[].reason` — string; required. session_moved, session_canceled: given instead of a refund when the session moved or was called off; service_recovery, goodwill: staff's own; gift_certificate_voided: Given because the gift certificate it was paid with had been cancelled; voucher_refunded: a refund reached what a third party's voucher paid, which can't be handed back, so that part is this credit (the refund's creditId); guest_change: the guest cancelled, removed seats, or moved to a cheaper date on their manage link, and the booking's refund policy gives refunds as credit, so what would have gone back to the card is this credit (the refunds' creditId) Allowed: "session\_moved", "session\_canceled", "service\_recovery", "goodwill", "gift\_certificate\_voided", "voucher\_refunded", "guest\_change"
    - `credits[].entityId` — string; required. The entity it's a liability of
    - `credits[].currency` — string; required. 
    - `credits[].amount` — integer or null; required. Minor units, as issued; null without orders:amounts minimum: -9007199254740991; maximum: 9007199254740991
    - `credits[].balance` — integer or null; required. What's left to use; null without orders:amounts minimum: -9007199254740991; maximum: 9007199254740991
    - `credits[].customerId` — string; required. 
    - `credits[].customerName` — string; required. First name only without customers:contact
    - `credits[].orderId` — string or null; required. 
    - `credits[].orderCode` — string or null; required. 
    - `credits[].sessionId` — string or null; required. 
    - `credits[].note` — string or null; required. Staff's own words; null without orders:amounts
    - `credits[].expiresAt` — string or null; required.  format: "date-time"
    - `credits[].createdAt` — string; required.  format: "date-time"
- `split` — object or null; optional. A split booking: the deadline, where it stands, the organizer's saved card, and every share with what's paid and owing and who paid it (amounts null without orders:amounts; first names only). Staff act on it with extend_split_deadline, charge_unpaid_shares, and release_unpaid_seats. Null when the payment isn't split. Always present
  - `split.status` — string; required. open: guests are paying, the deadline is ahead. closing and charging: the deadline came and the card is being charged (or seats released). grace: the charge failed, and the organizer can pay until graceUntil. needs_action: the grace ran out; staff decide. settled: nothing is owed. released: the unpaid seats went back on sale. canceled: the booking was canceled Allowed: "open", "closing", "charging", "grace", "needs\_action", "settled", "released", "canceled"
  - `split.payBy` — string; required. The deadline format: "date-time"
  - `split.timeZone` — string; required. The location's time zone: show the deadline in it, never the viewer's
  - `split.currency` — string; optional. The booking's currency (ISO 4217), which every amount here is in: the party page has no other money to read it from. Always present
  - `split.unpaidShares` — string; required. What happens at the deadline to what's unpaid: charge_organizer (the saved card) or release_seats (back on sale) Allowed: "charge\_organizer", "release\_seats"
  - `split.maxCharge` — integer or null; required. The most the saved card can be charged, as the organizer agreed (0 when seats are released instead). Null where amounts aren't shown (staff without orders:amounts)
  - `split.card` — object or null; required. The organizer's saved card ("Visa ending 4242"); null when none is saved (release_seats, not saved yet, or forgotten once settled)
    - `split.card.brand` — string or null; required. 
    - `split.card.last4` — string or null; required. 
  - `split.graceUntil` — string or null; required. After a failed charge: until when the organizer can pay format: "date-time"
  - `split.charged` — integer or null; optional. What the saved card has been charged so far, against maxCharge. Null without orders:amounts. Always present
  - `split.lastFailure` — object or null; optional. The saved card's last failed charge, if any. Always present
    - `split.lastFailure.reason` — string; required. The words for why the saved card's charge failed ("The card was declined", "The bank asked the cardholder to confirm this payment", "The card is no longer saved")
    - `split.lastFailure.at` — string; required.  format: "date-time"
  - `split.balanceDue` — integer or null; required. What's owed on the booking (paymentStateOf()); the shares say who owes which part. Null where amounts aren't shown
  - `split.shares` — array; required. 
    - `split.shares[]` — object; optional. 
      - `split.shares[].position` — integer; required. The seat's number in the party (the party page's spot); the organizer's is 1 minimum: 1; maximum: 9007199254740991
      - `split.shares[].organizer` — boolean; required. The organizer's own seat
      - `split.shares[].firstName` — string or null; required. The first name the seat was claimed with on the party page (the organizer's seat: theirs); null while it's free
      - `split.shares[].amount` — integer or null; required. What the share comes to, with tax. The shares add up to the booking's total to the cent: each guest's part is rounded to the cent for itself, and any cent rounding leaves is on the organizer's share (`rounding`). Null without orders:amounts
      - `split.shares[].paid` — integer or null; required. Paid toward it, less refunds. Null without orders:amounts
      - `split.shares[].owing` — integer or null; required. What's still owed on it. The shares' owing adds up to the booking's balance due. Null without orders:amounts
      - `split.shares[].rounding` — integer or null; optional. The organizer's share only: the cent or two that rounding each guest's tax and service charge for themselves leaves, so the shares add up to the total (0 on every other share, and usually on the organizer's). Null without orders:amounts. Always present
      - `split.shares[].paidAt` — string or null; optional. When it was paid in full (its last payment succeeded); null while something is owed. Always present format: "date-time"
      - `split.shares[].status` — string; required. unpaid: something is still owed on it; processing: a payment for it is on its way (a bank's); paid: nothing is owed on it Allowed: "unpaid", "processing", "paid"
      - `split.shares[].paidBy` — string or null; required. Who paid it, once paid: the guest, the organizer (at checkout or from the manage page), or the organizer's saved card at the deadline; null while unpaid Allowed: "guest", "organizer", "saved\_card"
      - `split.shares[].parts` — array or null; required. What it's made of, line by line with tax: for the viewer's own share (the organizer and staff: every share); null otherwise
        - `split.shares[].parts[]` — object; optional. 
          - `split.shares[].parts[].kind` — string; required. ticket_type: the seat's ticket; add_on: an extra or menu supplement it holds; group: its equal part of a group or private booking's line; discount: its part of a promo code's discount (negative); fee: its part of the service charge Allowed: "ticket\_type", "add\_on", "group", "discount", "fee"
          - `split.shares[].parts[].name` — string; required. 
          - `split.shares[].parts[].quantity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
          - `split.shares[].parts[].amount` — integer or null; required. Before tax, minor units; negative for a discount. Null without orders:amounts
          - `split.shares[].parts[].tax` — integer or null; required. Null without orders:amounts
          - `split.shares[].parts[].shared` — boolean; required. The party's, split equally (a group line, an amount-off code, a fixed fee)
- `invoices` — array; optional. The booking's invoices, oldest first (a deposit before its balance), with what's paid and owed on each; amounts null without orders:amounts. Empty when none. Always present
  - `invoices[]` — object; optional. 
    - `invoices[].id` — string; required. 
    - `invoices[].kind` — string; required.  Allowed: "invoice", "credit\_note"
    - `invoices[].portion` — string or null; required.  Allowed: "full", "deposit", "balance"
    - `invoices[].number` — string or null; required. 
    - `invoices[].state` — string; required. draft (not sent, no number), sent (nothing paid yet, not due), partly_paid (some paid, not due), paid, overdue (something owed past its due date, paid in part or not), void Allowed: "draft", "sent", "partly\_paid", "paid", "overdue", "void"
    - `invoices[].amount` — integer or null; required. Minor units (cents) in the location's currency
    - `invoices[].paid` — integer or null; required. Minor units (cents) in the location's currency
    - `invoices[].balance` — integer or null; required. Minor units (cents) in the location's currency
    - `invoices[].issuedAt` — string or null; required.  format: "date-time"
    - `invoices[].dueOn` — string or null; required. A local date at the location, YYYY-MM-DD format: "date"
    - `invoices[].payUrl` — string or null; required. The guest's pay link, to copy or text. Null once the invoice is void or paid, for a draft, and without invoices:write, orders:amounts and customers:contact where the booking is: whoever holds it can pay and see the invoice, with its bill-to's name, email and address
- `acknowledgements` — array; optional. The statements the booking was sold under, at the versions its hold locked, in the order its guest read them, with when the guest ticked each at checkout; `acceptedAt` null on a staff booking, whose guest wasn't asked. Empty when there were none. Always present
  - `acknowledgements[]` — object; optional. 
    - `acknowledgements[].id` — string; required. 
    - `acknowledgements[].versionId` — string; required. This version: what checkout's `acknowledgements` takes
    - `acknowledgements[].version` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `acknowledgements[].text` — string; required. 
    - `acknowledgements[].acceptedAt` — string or null; required. When the guest ticked it at checkout; null on a staff booking, whose guest wasn't asked format: "date-time"
- `totals` — object or null; required. Null without orders:amounts
  - `totals.subtotal` — integer; required. Minor units (cents) in the location's currency
  - `totals.fees` — integer; required. Minor units (cents) in the location's currency
  - `totals.tax` — integer; required. Minor units (cents) in the location's currency
  - `totals.total` — integer; required. Minor units (cents) in the location's currency
  - `totals.discount` — object or null; required. 
    - `totals.discount.code` — string; required. 
    - `totals.discount.amount` — integer; required. Minor units (cents) in the location's currency
  - `totals.storedValueDiscounts` — array; optional. Free value that came off before tax, after the promo code, in the order given: a promotional gift certificate, or a goodwill or service recovery credit. Empty when none. Always present
    - `totals.storedValueDiscounts[]` — object; optional. 
      - `totals.storedValueDiscounts[].source` — string; required.  Allowed: "gift\_certificate", "credit"
      - `totals.storedValueDiscounts[].code` — string; required. Masked: ••••JKLM
      - `totals.storedValueDiscounts[].amount` — integer; required. Minor units (cents) in the location's currency
- `payments` — array; required. 
  - `payments[]` — object; optional. 
    - `payments[].id` — string; required. 
    - `payments[].provider` — string; required. 
    - `payments[].status` — string or null; required. Null without orders:amounts
    - `payments[].amount` — integer or null; required. Null without orders:amounts
    - `payments[].createdAt` — string; required.  format: "date-time"
    - `payments[].tender` — string; optional. card (online), gift_certificate, credit, or what staff recorded (record_payment): card_terminal (card at the desk), cash, debit, e_transfer, cheque, voucher Allowed: "card", "gift\_certificate", "credit", "card\_terminal", "cash", "debit", "e\_transfer", "cheque", "voucher"
    - `payments[].reference` — string or null; optional. A recorded payment's reference: an e-transfer's, a cheque's number, a voucher's code, a terminal's receipt number. Null without orders:amounts
    - `payments[].issuer` — string or null; optional. A voucher's issuer (Costco, WagJag). Null without orders:amounts
    - `payments[].note` — string or null; optional. Staff's own note on a recorded payment, never shown to the guest. Null without orders:amounts
    - `payments[].recordedBy` — string or null; optional. The member (usr_…) who recorded it
    - `payments[].code` — string or null; optional. The gift certificate's or credit's code it was paid with, masked (••••JKLM), for tenders gift_certificate and credit. Null for every other tender and without orders:amounts. Always present
    - `payments[].invoiceId` — string or null; optional. The invoice (ivc_…) it counts toward, or null. Always present
- `history` — array; required. 
  - `history[]` — object; optional. 
    - `history[].id` — string; required. 
    - `history[].type` — string; required. 
    - `history[].actor` — object; required. 
      - `history[].actor.type` — string; required.  Allowed: "user", "agent", "system", "guest"
      - `history[].actor.id` — string or null; required. 
      - `history[].actor.via` — string; required.  Allowed: "session", "api\_key", "oauth", "internal", "public"
      - `history[].actor.name` — string or null; required. 
    - `history[].subject` — object; required. 
      - `history[].subject.type` — string; required. 
      - `history[].subject.id` — string; required. 
      - `history[].subject.label` — string or null; required. 
    - `history[].locationName` — string or null; required. 
    - `history[].changes` — array or null; required. 
      - `history[].changes[]` — object; optional. 
        - `history[].changes[].field` — string; required. 
        - `history[].changes[].before` — string or null; required. 
        - `history[].changes[].after` — string or null; required. 
    - `history[].changesetId` — string or null; required. 
    - `history[].draftedBy` — object or null; optional. Set when the command bar's assistant drafted the change this event came from, and the person (the actor) previewed and applied it: the assistant (agt_...) and its model call (aic_...). Always sent; null otherwise
      - `history[].draftedBy.agentId` — string; required. 
      - `history[].draftedBy.callId` — string; required. 
    - `history[].data` — object or null; required. What the event recorded, which can hold amounts and guests' names. Null without both orders:amounts and customers:contact where the event belongs; billing, member/invitation, agent, and API-key events also need billing:read, members:read, agents:read, and api_keys:write respectively at the organization
      - `history[].data.*` — any value; optional. 
    - `history[].masked` — boolean; optional. True when `data` was withheld
    - `history[].createdAt` — string; required.  format: "date-time"
    - `history[].undo` — object or null; required. 
      - `history[].undo.changesetId` — string; required. 
      - `history[].undo.until` — string; required.  format: "date-time"
    - `history[].actorName` — string or null; required. The member's name, or email, even once removed; null for the system, an agent, or a guest
- `historyMore` — boolean; required. More than the 100 newest entries exist: list_activity has the rest
- `due` — object or null; required. What this one booking owes, for taking payment at the desk. Given with orders:amounts, and to someone who may book walk-ins here (bookings:write and products:read) though their grant hides the books; null for anyone else. It names no refund, payment history, or other booking
  - `due.total` — integer; required. What the booking comes to, with tax
  - `due.paid` — integer; required. What has been paid on it, net of change given back
  - `due.due` — integer; required. Still owing: 0 when paid in full
  - `due.currency` — string; required. 
  - `due.status` — string; required. unpaid and partly_paid while something is owing; paid once paid in full; nothing_due when nothing was ever to be paid (a total of 0, or a canceled booking), so it never reads paid when nothing was Allowed: "unpaid", "partly\_paid", "paid", "nothing\_due"

### get_customer

Get one customer's page: their contact details, staff's notes on them (newest first, at most 50; add_customer_note, update_customer_note, remove_customer_note), whether they've agreed to news and offers (`marketing`), and their bookings, newest first, as list_bookings gives them (pending ones included). Someone limited to a location, entity, or product reaches a customer only through a booking they're covered for, and sees only those bookings; anyone else is not found. Without customers:contact it's a first name with no email or phone, no notes, and no marketing status. Page their bookings back with `before`.

Reads · Members of an organization · Needs bookings:read

#### Input

- `customerId` — string; required. The customer's id, from list_customers
- `limit` — integer; optional. The most results to return (default 25) minimum: 1; maximum: 100; default: 25
- `before` — string; optional. A order id; returns ones older than it

#### Output

- `timeZone` — string; required. The organization's time zone for customer dates and staff notes: its oldest location's zone (creation time, then id), or UTC before it has a location
- `customer` — object; required. 
  - `customer.id` — string; required. 
  - `customer.name` — string; required. The first name only, without customers:contact. Someone without it across the organization sees what the orders they're covered for hold, never the customer's shared record
  - `customer.email` — string or null; required. Null without customers:contact, or when there's none
  - `customer.phone` — string or null; required. Null without customers:contact, or when there's none; without it across the organization, the phone on the newest order you're covered for
  - `customer.contactHidden` — boolean; required. True when email and phone are hidden from you (you lack customers:contact here). False with a null email or phone means the guest gave none
  - `customer.bookings` — integer; required. Orders of theirs you're covered for, canceled ones included minimum: -9007199254740991; maximum: 9007199254740991
  - `customer.lastSessionAt` — string or null; required. The latest session among them format: "date-time"
  - `customer.lastSessionTimeZone` — string or null; required. The IANA time zone of that session's location
  - `customer.lastSessionLocationName` — string or null; required. The name of that session's location
  - `customer.createdAt` — string; required.  format: "date-time"
  - `customer.notes` — array; optional. Staff's notes on the customer, newest first, at most 50; empty without customers:contact where you reach them
    - `customer.notes[]` — object; optional. 
      - `customer.notes[].id` — string; required. The customer note's id, from get_customer
      - `customer.notes[].body` — string; required. 
      - `customer.notes[].author` — object or null; required. Who wrote it; null when no member is recorded
        - `customer.notes[].author.name` — string; required. 
      - `customer.notes[].createdAt` — string; required.  format: "date-time"
      - `customer.notes[].updatedAt` — string; required.  format: "date-time"
      - `customer.notes[].canEdit` — boolean; required. Whether you may change or remove it: its author may, and so may someone with customers:privacy across the organization
  - `customer.marketing` — string or null; optional. Where the customer's email stands on news and offers (CASL): none (never agreed, or a sign-up not confirmed within a week), requested (a sign-up waiting for confirmation), granted, or withdrawn. Null without customers:contact or without an email Allowed: "none", "requested", "granted", "withdrawn"
- `bookings` — array; required. 
  - `bookings[]` — object; optional. 
    - `bookings[].id` — string; required. 
    - `bookings[].code` — string; required. The booking code guests quote
    - `bookings[].status` — string; required.  Allowed: "pending", "confirmed", "canceled"
    - `bookings[].cancelReason` — string or null; required.  Allowed: "seats\_unavailable", "guest\_request", "session\_canceled", "duplicate", "other"
    - `bookings[].cancelNote` — string or null; required. Staff's own words. Null without orders:amounts
    - `bookings[].createdAt` — string; required.  format: "date-time"
    - `bookings[].confirmedAt` — string or null; required.  format: "date-time"
    - `bookings[].canceledAt` — string or null; required.  format: "date-time"
    - `bookings[].customer` — object; required. 
      - `bookings[].customer.id` — string; required. 
      - `bookings[].customer.name` — string; required. The first name only, without customers:contact
      - `bookings[].customer.email` — string or null; required. Null without customers:contact
      - `bookings[].customer.phone` — string or null; required. Null without customers:contact, or when there's none
      - `bookings[].customer.contactHidden` — boolean; required. True when email and phone are hidden from you (you lack customers:contact here). False with a null email or phone means the guest gave none
    - `bookings[].product` — object; required. 
      - `bookings[].product.id` — string; required. 
      - `bookings[].product.name` — string; required. 
    - `bookings[].location` — object; required. 
      - `bookings[].location.id` — string; required. 
      - `bookings[].location.name` — string; required. 
      - `bookings[].location.timeZone` — string; required. 
    - `bookings[].session` — object; required. 
      - `bookings[].session.id` — string; required. 
      - `bookings[].session.startsAt` — string; required.  format: "date-time"
      - `bookings[].session.when` — string; required. In the location's time zone
    - `bookings[].partySize` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `bookings[].currency` — string; required. 
    - `bookings[].total` — integer or null; required. Null without orders:amounts
    - `bookings[].paid` — integer or null; required. Null without orders:amounts
    - `bookings[].refunded` — integer or null; required. Refunded or on its way back. Null without orders:amounts
    - `bookings[].kept` — integer or null; required. Fees sold as non-refundable (the service charge) and their tax, kept on staff refunds, as far as the money is still held: 0 once everything paid has come back, refunded or as a credit in its place (a session the operator moved or called off), and none on an order canceled before it was booked. Null without orders:amounts
    - `bookings[].refundable` — integer or null; required. What staff can still refund: paid, less refunds, less a credit given in place of a refund (a session moved or called off), less what's kept. Null without orders:amounts
    - `bookings[].refunds` — array; required. 
      - `bookings[].refunds[]` — object; optional. 
        - `bookings[].refunds[].id` — string; required. 
        - `bookings[].refunds[].amount` — integer or null; required. Null without orders:amounts
        - `bookings[].refunds[].status` — string; required. pending (on its way), succeeded, failed, or reversed: given as a credit or gift certificate that was voided unused since, so it was taken back and isn't counted as refunded Allowed: "pending", "succeeded", "failed", "reversed"
        - `bookings[].refunds[].reason` — string or null; required.  Allowed: "seats\_unavailable", "guest\_request", "session\_canceled", "service\_issue", "duplicate", "goodwill", "other"
        - `bookings[].refunds[].note` — string or null; required. Staff's own words. Null without orders:amounts
        - `bookings[].refunds[].failureReason` — string or null; required. 
        - `bookings[].refunds[].createdAt` — string; required.  format: "date-time"
        - `bookings[].refunds[].tender` — string; optional. What the refunded payment was made with: card (back to the guest's card), gift_certificate or credit (back to it), or an offline tender (card_terminal, cash, debit, e_transfer, cheque), which staff gave back that way at the desk; a voucher's part is given back as a credit (creditId), and a guest's own refund under the booking's refundDestination as a credit (creditId) or gift certificate (giftCertificateId) instead of back to the card or the desk Allowed: "card", "gift\_certificate", "credit", "card\_terminal", "cash", "debit", "e\_transfer", "cheque", "voucher"
        - `bookings[].refunds[].creditId` — string or null; optional. The credit this refund became instead of going back where it was paid: a third party's voucher can't be handed back, so its part is a credit (voucher_refunded); a guest's own cancellation or change under refundDestination credit gives one (guest_change). The same credit the booking's credits list shows. Null for every other refund. Always present
        - `bookings[].refunds[].giftCertificateId` — string or null; optional. The gift certificate (kind refund) this refund became instead of going back where it was paid: a guest's own cancellation or change under refundDestination gift_certificate. Null for every other refund. Always present
        - `bookings[].refunds[].issuer` — string or null; optional. Who issued the voucher the refunded payment was (such as Costco); null for any other tender, and without orders:amounts. Always present
    - `bookings[].bookingId` — string or null; optional. Null until it's booked. Always present
    - `bookings[].booker` — string; optional. Who made it: a guest at checkout, or staff. Always present Allowed: "customer", "staff"
    - `bookings[].balanceDue` — integer or null; optional. What's still owing. Above 0 on a staff booking with payment to come, or seats added since: confirmed isn't paid. Null without orders:amounts. Always present
    - `bookings[].overPaid` — integer or null; optional. What's been paid beyond the total: seats removed, which refunds nothing by itself. Null without orders:amounts. Always present
    - `bookings[].paymentStatus` — string or null; optional. unpaid, partly_paid, paid, over_paid, refunded (all but any kept fee has gone back), or nothing_due, from what's actually been paid. A partial refund stays paid. Null without orders:amounts. Always present Allowed: "unpaid", "partly\_paid", "paid", "over\_paid", "refunded", "nothing\_due"
    - `bookings[].staffNote` — string or null; optional. Staff's own note, never shown to the guest. Null without orders:amounts, or when there's none. Always present
- `nextBefore` — string or null; required. 

### list_bookings

Find bookings, newest first, for the front desk: `search` by booking code, guest's name, or email (forgiving small slips in a name), or by `sessionId` or `locationId`, a range of local dates (`from`, `to`), by default the session's date, or with `dateBasis` "booked" the date the booking was made (for "bookings made last week", accounting), or `status`. Leaves out orders still waiting on a guest's payment unless `status` asks for pending. Each shows the guest, the session, the party, who made it (`booker`), and the total, what's paid, the balance due, and what's over-paid. Confirmed isn't paid: read `paymentStatus`. Only bookings your grants cover. Without customers:contact the guest is a first name with no email or phone, and only a booking code or a first name finds one; without orders:amounts every amount, `paymentStatus`, and the note are null. Page back with `before`.

Reads · Members of an organization · Needs bookings:read

#### Input

- `search` — string; optional. A booking code, a guest's name, or an email minLength: 1; maxLength: 200
- `sessionId` — string; optional. The session's id, from list_sessions
- `locationId` — string; optional. Only bookings for sessions at this location
- `dateBasis` — string; optional. What `from` and `to` apply to. session (default): the session's local date at its location. booked: the date the booking was made, at the session's location (when it was confirmed, or created while it's still pending); then newest made first Allowed: "session", "booked"; default: "session"
- `from` — string; optional. From this date (inclusive), by `dateBasis`, at the session's location format: "date"
- `to` — string; optional. To this date (inclusive), by `dateBasis`, at the session's location format: "date"
- `status` — string; optional.  Allowed: "pending", "confirmed", "canceled"
- `limit` — integer; optional. The most results to return (default 25) minimum: 1; maximum: 100; default: 25
- `before` — string; optional. A order id; returns ones older than it

#### Output

- `bookings` — array; required. 
  - `bookings[]` — object; optional. 
    - `bookings[].id` — string; required. 
    - `bookings[].code` — string; required. The booking code guests quote
    - `bookings[].status` — string; required.  Allowed: "pending", "confirmed", "canceled"
    - `bookings[].cancelReason` — string or null; required.  Allowed: "seats\_unavailable", "guest\_request", "session\_canceled", "duplicate", "other"
    - `bookings[].cancelNote` — string or null; required. Staff's own words. Null without orders:amounts
    - `bookings[].createdAt` — string; required.  format: "date-time"
    - `bookings[].confirmedAt` — string or null; required.  format: "date-time"
    - `bookings[].canceledAt` — string or null; required.  format: "date-time"
    - `bookings[].customer` — object; required. 
      - `bookings[].customer.id` — string; required. 
      - `bookings[].customer.name` — string; required. The first name only, without customers:contact
      - `bookings[].customer.email` — string or null; required. Null without customers:contact
      - `bookings[].customer.phone` — string or null; required. Null without customers:contact, or when there's none
      - `bookings[].customer.contactHidden` — boolean; required. True when email and phone are hidden from you (you lack customers:contact here). False with a null email or phone means the guest gave none
    - `bookings[].product` — object; required. 
      - `bookings[].product.id` — string; required. 
      - `bookings[].product.name` — string; required. 
    - `bookings[].location` — object; required. 
      - `bookings[].location.id` — string; required. 
      - `bookings[].location.name` — string; required. 
      - `bookings[].location.timeZone` — string; required. 
    - `bookings[].session` — object; required. 
      - `bookings[].session.id` — string; required. 
      - `bookings[].session.startsAt` — string; required.  format: "date-time"
      - `bookings[].session.when` — string; required. In the location's time zone
    - `bookings[].partySize` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `bookings[].currency` — string; required. 
    - `bookings[].total` — integer or null; required. Null without orders:amounts
    - `bookings[].paid` — integer or null; required. Null without orders:amounts
    - `bookings[].refunded` — integer or null; required. Refunded or on its way back. Null without orders:amounts
    - `bookings[].kept` — integer or null; required. Fees sold as non-refundable (the service charge) and their tax, kept on staff refunds, as far as the money is still held: 0 once everything paid has come back, refunded or as a credit in its place (a session the operator moved or called off), and none on an order canceled before it was booked. Null without orders:amounts
    - `bookings[].refundable` — integer or null; required. What staff can still refund: paid, less refunds, less a credit given in place of a refund (a session moved or called off), less what's kept. Null without orders:amounts
    - `bookings[].refunds` — array; required. 
      - `bookings[].refunds[]` — object; optional. 
        - `bookings[].refunds[].id` — string; required. 
        - `bookings[].refunds[].amount` — integer or null; required. Null without orders:amounts
        - `bookings[].refunds[].status` — string; required. pending (on its way), succeeded, failed, or reversed: given as a credit or gift certificate that was voided unused since, so it was taken back and isn't counted as refunded Allowed: "pending", "succeeded", "failed", "reversed"
        - `bookings[].refunds[].reason` — string or null; required.  Allowed: "seats\_unavailable", "guest\_request", "session\_canceled", "service\_issue", "duplicate", "goodwill", "other"
        - `bookings[].refunds[].note` — string or null; required. Staff's own words. Null without orders:amounts
        - `bookings[].refunds[].failureReason` — string or null; required. 
        - `bookings[].refunds[].createdAt` — string; required.  format: "date-time"
        - `bookings[].refunds[].tender` — string; optional. What the refunded payment was made with: card (back to the guest's card), gift_certificate or credit (back to it), or an offline tender (card_terminal, cash, debit, e_transfer, cheque), which staff gave back that way at the desk; a voucher's part is given back as a credit (creditId), and a guest's own refund under the booking's refundDestination as a credit (creditId) or gift certificate (giftCertificateId) instead of back to the card or the desk Allowed: "card", "gift\_certificate", "credit", "card\_terminal", "cash", "debit", "e\_transfer", "cheque", "voucher"
        - `bookings[].refunds[].creditId` — string or null; optional. The credit this refund became instead of going back where it was paid: a third party's voucher can't be handed back, so its part is a credit (voucher_refunded); a guest's own cancellation or change under refundDestination credit gives one (guest_change). The same credit the booking's credits list shows. Null for every other refund. Always present
        - `bookings[].refunds[].giftCertificateId` — string or null; optional. The gift certificate (kind refund) this refund became instead of going back where it was paid: a guest's own cancellation or change under refundDestination gift_certificate. Null for every other refund. Always present
        - `bookings[].refunds[].issuer` — string or null; optional. Who issued the voucher the refunded payment was (such as Costco); null for any other tender, and without orders:amounts. Always present
    - `bookings[].bookingId` — string or null; optional. Null until it's booked. Always present
    - `bookings[].booker` — string; optional. Who made it: a guest at checkout, or staff. Always present Allowed: "customer", "staff"
    - `bookings[].balanceDue` — integer or null; optional. What's still owing. Above 0 on a staff booking with payment to come, or seats added since: confirmed isn't paid. Null without orders:amounts. Always present
    - `bookings[].overPaid` — integer or null; optional. What's been paid beyond the total: seats removed, which refunds nothing by itself. Null without orders:amounts. Always present
    - `bookings[].paymentStatus` — string or null; optional. unpaid, partly_paid, paid, over_paid, refunded (all but any kept fee has gone back), or nothing_due, from what's actually been paid. A partial refund stays paid. Null without orders:amounts. Always present Allowed: "unpaid", "partly\_paid", "paid", "over\_paid", "refunded", "nothing\_due"
    - `bookings[].staffNote` — string or null; optional. Staff's own note, never shown to the guest. Null without orders:amounts, or when there's none. Always present
- `nextBefore` — string or null; required. 
- `canExport` — boolean; required. Whether the organization's plan includes CSV export (Growth and up): the screen offers the download only then. The rows are the same either way

### list_customers

Find customers, newest first: `search` by name or email, forgiving small slips in a name. A customer belongs to the organization, so someone limited to a location, entity, or product sees only customers with a booking they're covered for, counts only those, and reads the contact on those bookings rather than the customer's shared record. Without customers:contact a customer is a first name with no email or phone, and only a first name finds one. Page back with `before`.

Reads · Members of an organization · Needs bookings:read

#### Input

- `search` — string; optional.  minLength: 1; maxLength: 200
- `limit` — integer; optional. The most results to return (default 25) minimum: 1; maximum: 100; default: 25
- `before` — string; optional. A customer id; returns ones older than it

#### Output

- `customers` — array; required. 
  - `customers[]` — object; optional. 
    - `customers[].id` — string; required. 
    - `customers[].name` — string; required. The first name only, without customers:contact. Someone without it across the organization sees what the orders they're covered for hold, never the customer's shared record
    - `customers[].email` — string or null; required. Null without customers:contact, or when there's none
    - `customers[].phone` — string or null; required. Null without customers:contact, or when there's none; without it across the organization, the phone on the newest order you're covered for
    - `customers[].contactHidden` — boolean; required. True when email and phone are hidden from you (you lack customers:contact here). False with a null email or phone means the guest gave none
    - `customers[].bookings` — integer; required. Orders of theirs you're covered for, canceled ones included minimum: -9007199254740991; maximum: 9007199254740991
    - `customers[].lastSessionAt` — string or null; required. The latest session among them format: "date-time"
    - `customers[].lastSessionTimeZone` — string or null; required. The IANA time zone of that session's location
    - `customers[].lastSessionLocationName` — string or null; required. The name of that session's location
    - `customers[].createdAt` — string; required.  format: "date-time"
- `nextBefore` — string or null; required. 

### update_booking_details

Change the contact name, email, and phone on a booking, and staff's note, without rewriting the customer record, which other bookings share: the name and phone are this booking's own, and a new email moves it to that address's record (found or added). Messages still to come go to the new address; ones already sent aren't sent again. Adding an email to a booking that had none starts its confirmation and reminder. Answers to booking questions have their own tool (set_booking_answer). The contact needs customers:contact, and the note orders:amounts. Undo puts them back while they're unchanged. Returns a preview to confirm.

Changes · Members of an organization · Needs bookings:write

#### Input

- `orderId` — string; required. The order's id, from list_bookings or list_orders
- `name` — string or null; optional. The name on this booking. A booking always has one: null leaves it as it is minLength: 1; maxLength: 200
- `email` — string or null; optional. The address on this booking: its messages still to come go there. It moves the booking to that address's customer record, and never rewrites a record. Null takes it off, and those messages are skipped format: "email"; maxLength: 254
- `phone` — string or null; optional. The phone on this booking; null takes it off minLength: 1; maxLength: 40
- `note` — string or null; optional. Staff's own note; null takes it off. Never shown to the guest minLength: 1; maxLength: 2000

#### Output

- `booking` — object; required. 
  - `booking.id` — string; required. 
  - `booking.code` — string; required. The booking code guests quote
  - `booking.status` — string; required.  Allowed: "pending", "confirmed", "canceled"
  - `booking.cancelReason` — string or null; required.  Allowed: "seats\_unavailable", "guest\_request", "session\_canceled", "duplicate", "other"
  - `booking.cancelNote` — string or null; required. Staff's own words. Null without orders:amounts
  - `booking.createdAt` — string; required.  format: "date-time"
  - `booking.confirmedAt` — string or null; required.  format: "date-time"
  - `booking.canceledAt` — string or null; required.  format: "date-time"
  - `booking.customer` — object; required. 
    - `booking.customer.id` — string; required. 
    - `booking.customer.name` — string; required. The first name only, without customers:contact
    - `booking.customer.email` — string or null; required. Null without customers:contact
    - `booking.customer.phone` — string or null; required. Null without customers:contact, or when there's none
    - `booking.customer.contactHidden` — boolean; required. True when email and phone are hidden from you (you lack customers:contact here). False with a null email or phone means the guest gave none
  - `booking.product` — object; required. 
    - `booking.product.id` — string; required. 
    - `booking.product.name` — string; required. 
  - `booking.location` — object; required. 
    - `booking.location.id` — string; required. 
    - `booking.location.name` — string; required. 
    - `booking.location.timeZone` — string; required. 
  - `booking.session` — object; required. 
    - `booking.session.id` — string; required. 
    - `booking.session.startsAt` — string; required.  format: "date-time"
    - `booking.session.when` — string; required. In the location's time zone
  - `booking.partySize` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
  - `booking.currency` — string; required. 
  - `booking.total` — integer or null; required. Null without orders:amounts
  - `booking.paid` — integer or null; required. Null without orders:amounts
  - `booking.refunded` — integer or null; required. Refunded or on its way back. Null without orders:amounts
  - `booking.kept` — integer or null; required. Fees sold as non-refundable (the service charge) and their tax, kept on staff refunds, as far as the money is still held: 0 once everything paid has come back, refunded or as a credit in its place (a session the operator moved or called off), and none on an order canceled before it was booked. Null without orders:amounts
  - `booking.refundable` — integer or null; required. What staff can still refund: paid, less refunds, less a credit given in place of a refund (a session moved or called off), less what's kept. Null without orders:amounts
  - `booking.refunds` — array; required. 
    - `booking.refunds[]` — object; optional. 
      - `booking.refunds[].id` — string; required. 
      - `booking.refunds[].amount` — integer or null; required. Null without orders:amounts
      - `booking.refunds[].status` — string; required. pending (on its way), succeeded, failed, or reversed: given as a credit or gift certificate that was voided unused since, so it was taken back and isn't counted as refunded Allowed: "pending", "succeeded", "failed", "reversed"
      - `booking.refunds[].reason` — string or null; required.  Allowed: "seats\_unavailable", "guest\_request", "session\_canceled", "service\_issue", "duplicate", "goodwill", "other"
      - `booking.refunds[].note` — string or null; required. Staff's own words. Null without orders:amounts
      - `booking.refunds[].failureReason` — string or null; required. 
      - `booking.refunds[].createdAt` — string; required.  format: "date-time"
      - `booking.refunds[].tender` — string; optional. What the refunded payment was made with: card (back to the guest's card), gift_certificate or credit (back to it), or an offline tender (card_terminal, cash, debit, e_transfer, cheque), which staff gave back that way at the desk; a voucher's part is given back as a credit (creditId), and a guest's own refund under the booking's refundDestination as a credit (creditId) or gift certificate (giftCertificateId) instead of back to the card or the desk Allowed: "card", "gift\_certificate", "credit", "card\_terminal", "cash", "debit", "e\_transfer", "cheque", "voucher"
      - `booking.refunds[].creditId` — string or null; optional. The credit this refund became instead of going back where it was paid: a third party's voucher can't be handed back, so its part is a credit (voucher_refunded); a guest's own cancellation or change under refundDestination credit gives one (guest_change). The same credit the booking's credits list shows. Null for every other refund. Always present
      - `booking.refunds[].giftCertificateId` — string or null; optional. The gift certificate (kind refund) this refund became instead of going back where it was paid: a guest's own cancellation or change under refundDestination gift_certificate. Null for every other refund. Always present
      - `booking.refunds[].issuer` — string or null; optional. Who issued the voucher the refunded payment was (such as Costco); null for any other tender, and without orders:amounts. Always present
  - `booking.bookingId` — string or null; optional. Null until it's booked. Always present
  - `booking.booker` — string; optional. Who made it: a guest at checkout, or staff. Always present Allowed: "customer", "staff"
  - `booking.balanceDue` — integer or null; optional. What's still owing. Above 0 on a staff booking with payment to come, or seats added since: confirmed isn't paid. Null without orders:amounts. Always present
  - `booking.overPaid` — integer or null; optional. What's been paid beyond the total: seats removed, which refunds nothing by itself. Null without orders:amounts. Always present
  - `booking.paymentStatus` — string or null; optional. unpaid, partly_paid, paid, over_paid, refunded (all but any kept fee has gone back), or nothing_due, from what's actually been paid. A partial refund stays paid. Null without orders:amounts. Always present Allowed: "unpaid", "partly\_paid", "paid", "over\_paid", "refunded", "nothing\_due"
  - `booking.staffNote` — string or null; optional. Staff's own note, never shown to the guest. Null without orders:amounts, or when there's none. Always present
