# Customers tools

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

## Customers

### erase_customer

Erase a guest's personal data on their request (PIPEDA): their name, email, phone, and sign-in link, the staff notes on them (add_customer_note), the names of their party's seats, their answers to booking questions (allergies are health data), the buyer's details and message on gift certificates they bought, the name and email they gave on holds before paying (abandoned bookings), the address on their send log rows and emails still stored, and the name, email, and phone in the activity log's entries about their orders. They show as "Erased guest" afterwards, and their marketing consent is withdrawn, so they get no news and offers. What the books need stays: orders, lines, payments, refunds, invoices, and their amounts and codes (tax records are kept for six years), menu choices, and the suppression list. It can't be undone, so the preview lists what goes and what stays. Refused (`conflict`, saying what to do) while they have an order waiting for payment, a booking still to come, a balance due, money owed back to them, or a gift certificate not yet delivered. Needs customers:privacy across the whole organization (owner and admin). Erasing a guest who is already erased changes nothing. Returns a preview to confirm.

Changes · Members of an organization · Needs customers:privacy

#### Input

- `customerId` — string; required. The customer's id, from list_customers

#### Output

- `customer` — string; required. The customer (cus_…)
- `erased` — boolean; required. True when this call erased them; false when they were already erased and nothing changed
- `counts` — object; required. 
  - `counts.orders` — integer; required. Orders kept, with their amounts minimum: -9007199254740991; maximum: 9007199254740991
  - `counts.participants` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
  - `counts.answers` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
  - `counts.giftCertificates` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
  - `counts.tips` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
  - `counts.holds` — integer; required. Holds whose saved name and email (given before paying) were cleared minimum: -9007199254740991; maximum: 9007199254740991
  - `counts.messages` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
  - `counts.jobs` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
  - `counts.changesets` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
  - `counts.directCalls` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
  - `counts.events` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
  - `counts.notes` — integer; optional. Staff notes on the customer, deleted minimum: -9007199254740991; maximum: 9007199254740991

### export_customer_data

Export a customer's data for a guest's access request (PIPEDA): contact, consent history, staff's notes on the customer, orders and amounts, payments, refunds, invoices, participants, answers, party seats, menu choices, gift certificates, credits, tips, send log, suppressions, and activity. Includes staff notes (on the customer, and on their orders, payments, and refunds): review these before handing the export to the guest. Never email bodies. Needs customers:privacy, customers:contact, and orders:amounts across the organization.

Reads · Members of an organization · Needs customers:contact, customers:privacy, orders:amounts

#### Input

- `customerId` — string; required. The customer's id, from list_customers

#### Output

- `customer` — object; required. 
  - `customer.id` — string; required. The customer's id, from list_customers
  - `customer.name` — string or null; required. 
  - `customer.email` — string or null; required. 
  - `customer.phone` — string or null; required. 
  - `customer.createdAt` — string; required.  format: "date-time"
  - `customer.erasedAt` — string or null; required.  format: "date-time"
- `marketingConsent` — array; required. 
  - `marketingConsent[]` — object; optional. 
    - `marketingConsent[].id` — string; required. The marketing consent's id
    - `marketingConsent[].status` — string; required.  Allowed: "requested", "granted", "withdrawn"
    - `marketingConsent[].source` — string; required. 
    - `marketingConsent[].wording` — string or null; required. 
    - `marketingConsent[].wordingVersion` — string or null; required. 
    - `marketingConsent[].locale` — string or null; required. 
    - `marketingConsent[].orderId` — string or null; required. The order's id, from list_bookings or list_orders
    - `marketingConsent[].createdAt` — string; required.  format: "date-time"
- `notes` — array; optional. Staff's notes on the customer, newest first. Staff's words: review them before handing the export over
  - `notes[]` — object; optional. 
    - `notes[].id` — string; required. The customer note's id, from get_customer
    - `notes[].body` — string; required. 
    - `notes[].author` — object or null; required. Who wrote it; null when no member is recorded
      - `notes[].author.name` — string; required. 
    - `notes[].createdAt` — string; required.  format: "date-time"
    - `notes[].updatedAt` — string; required.  format: "date-time"
- `orders` — array; required. 
  - `orders[]` — object; optional. 
    - `orders[].id` — string; required. The order's id, from list_bookings or list_orders
    - `orders[].code` — string; required. The booking code guests quote
    - `orders[].kind` — string; required.  Allowed: "booking", "gift\_certificate"
    - `orders[].status` — string; required.  Allowed: "pending", "confirmed", "canceled"
    - `orders[].createdAt` — string; required.  format: "date-time"
    - `orders[].confirmedAt` — string or null; required.  format: "date-time"
    - `orders[].canceledAt` — string or null; required.  format: "date-time"
    - `orders[].contactName` — string or null; required. 
    - `orders[].contactPhone` — string or null; required. 
    - `orders[].staffNote` — string or null; required. 
    - `orders[].cancelNote` — string or null; required. 
    - `orders[].productId` — string or null; required. The product's id, from list_products
    - `orders[].locationId` — string or null; required. The location's id, from get_setup
    - `orders[].sessionId` — string or null; required. The session's id, from list_sessions
    - `orders[].sessionAt` — string or null; required.  format: "date-time"
    - `orders[].totals` — object; required. 
      - `orders[].totals.currency` — string; required. 
      - `orders[].totals.lines` — array; required. 
        - `orders[].totals.lines[]` — one of: object, object, object, object; optional. A booking's tickets, extras, and fees; a gift certificate's order has only its gift_certificate line
          - `orders[].totals.lines[] — object option 1` — object; optional. 
            - `orders[].totals.lines[] — object option 1.kind` — string; required.  Value: "ticket\_type"
            - `orders[].totals.lines[] — object option 1.ticketTypeId` — string; required. 
            - `orders[].totals.lines[] — object option 1.name` — string; required. 
            - `orders[].totals.lines[] — object option 1.quantity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
            - `orders[].totals.lines[] — object option 1.unitAmount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
            - `orders[].totals.lines[] — object option 1.group` — object; optional. Only on a group option's line: the line is baseAmount plus unitAmount for each seat above includedSeats
              - `orders[].totals.lines[] — object option 1.group.baseAmount` — integer; required. The base charge, covering includedSeats, before fees and tax minimum: -9007199254740991; maximum: 9007199254740991
              - `orders[].totals.lines[] — object option 1.group.includedSeats` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
            - `orders[].totals.lines[] — object option 1.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
            - `orders[].totals.lines[] — object option 1.components` — array; optional. Only on a package whose price is split by tax class (a VIP ticket including a wine pairing): its parts, the ticket's own first, each taxed by its own class. Their amounts add up to the line's. Show them under the line
              - `orders[].totals.lines[] — object option 1.components[]` — object; optional. 
                - `orders[].totals.lines[] — object option 1.components[].addOnId` — string or null; required. The included add-on (prd_…) this part is; null for the ticket's own part, named for its product
                - `orders[].totals.lines[] — object option 1.components[].name` — string; required. 
                - `orders[].totals.lines[] — object option 1.components[].quantity` — integer; required. Units for the whole line (seats for the ticket's own part, seats times the units per seat for an add-on) minimum: -9007199254740991; maximum: 9007199254740991
                - `orders[].totals.lines[] — object option 1.components[].amount` — integer; required. Its part of the line's amount, after discounts, before tax minimum: -9007199254740991; maximum: 9007199254740991
                - `orders[].totals.lines[] — object option 1.components[].taxes` — array; optional. Its own taxes, by the add-on's tax class (the product's for the ticket's own part). Only on refunded lines
                  - `orders[].totals.lines[] — object option 1.components[].taxes[]` — object; optional. 
                    - `orders[].totals.lines[] — object option 1.components[].taxes[].name` — string; required. 
                    - `orders[].totals.lines[] — object option 1.components[].taxes[].ratePpm` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
                    - `orders[].totals.lines[] — object option 1.components[].taxes[].amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
          - `orders[].totals.lines[] — object option 2` — object; optional. 
            - `orders[].totals.lines[] — object option 2.kind` — string; required.  Value: "add\_on"
            - `orders[].totals.lines[] — object option 2.addOnId` — string; required. The add-on (a product, prd_…)
            - `orders[].totals.lines[] — object option 2.name` — string; required. 
            - `orders[].totals.lines[] — object option 2.quantity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
            - `orders[].totals.lines[] — object option 2.unitAmount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
            - `orders[].totals.lines[] — object option 2.menuChoiceId` — string or null; optional. The menu choice (mch_…) this line is the supplement of, for the guests who picked it; null for an add-on bought on its own. One add-on can have both lines in one order: label each by this, never by its add-on and quantity. Always present
            - `orders[].totals.lines[] — object option 2.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
          - `orders[].totals.lines[] — object option 3` — object; optional. 
            - `orders[].totals.lines[] — object option 3.kind` — string; required.  Value: "fee"
            - `orders[].totals.lines[] — object option 3.feeId` — string; required. 
            - `orders[].totals.lines[] — object option 3.name` — string; required. 
            - `orders[].totals.lines[] — object option 3.ratePpm` — integer or null; required.  minimum: -9007199254740991; maximum: 9007199254740991
            - `orders[].totals.lines[] — object option 3.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
          - `orders[].totals.lines[] — object option 4` — object; optional. 
            - `orders[].totals.lines[] — object option 4.kind` — string; required.  Value: "gift\_certificate"
            - `orders[].totals.lines[] — object option 4.name` — string; required. "Gift certificate", or the preset's name
            - `orders[].totals.lines[] — object option 4.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
      - `orders[].totals.subtotal` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
      - `orders[].totals.fees` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
      - `orders[].totals.totalBeforeTax` — integer; required. Subtotal plus fees: the party's total as shown before tax minimum: -9007199254740991; maximum: 9007199254740991
      - `orders[].totals.tax` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
      - `orders[].totals.total` — integer; required. The total with tax, what the guest pays minimum: -9007199254740991; maximum: 9007199254740991
      - `orders[].totals.taxes` — array; required. 
        - `orders[].totals.taxes[]` — object; optional. 
          - `orders[].totals.taxes[].name` — string; required. 
          - `orders[].totals.taxes[].ratePpm` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
          - `orders[].totals.taxes[].amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
          - `orders[].totals.taxes[].base` — integer; required. What this tax was charged on: the lines carrying this rate, after discounts, before tax. Less than the subtotal before tax when part of it (a service charge) isn't taxed minimum: -9007199254740991; maximum: 9007199254740991
      - `orders[].totals.discount` — object or null; optional. The promo code on this hold or order and what it took off, before tax. Each line's `amount` and `subtotal` are already after it. Null without a code. Always present
        - `orders[].totals.discount.code` — string; required. 
        - `orders[].totals.discount.kind` — string; required.  Allowed: "amount\_off", "percent\_off", "set\_price", "waive\_service\_charge"
        - `orders[].totals.discount.amount` — integer; required. What it took off, before tax: off the tickets and extras, or the fees a waive_service_charge code waived minimum: -9007199254740991; maximum: 9007199254740991
        - `orders[].totals.discount.lines` — array; required. What it took off each line: this plus the line's own amount is what the line was before it. A waived fee has no line of its own in `lines` above
          - `orders[].totals.discount.lines[]` — one of: object, object, object; optional. 
            - `orders[].totals.discount.lines[] — object option 1` — object; optional. 
              - `orders[].totals.discount.lines[] — object option 1.kind` — string; required.  Value: "ticket\_type"
              - `orders[].totals.discount.lines[] — object option 1.ticketTypeId` — string; required. 
              - `orders[].totals.discount.lines[] — object option 1.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
            - `orders[].totals.discount.lines[] — object option 2` — object; optional. 
              - `orders[].totals.discount.lines[] — object option 2.kind` — string; required.  Value: "add\_on"
              - `orders[].totals.discount.lines[] — object option 2.addOnId` — string; required. 
              - `orders[].totals.discount.lines[] — object option 2.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
            - `orders[].totals.discount.lines[] — object option 3` — object; optional. 
              - `orders[].totals.discount.lines[] — object option 3.kind` — string; required.  Value: "fee"
              - `orders[].totals.discount.lines[] — object option 3.feeId` — string; required. 
              - `orders[].totals.discount.lines[] — object option 3.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
      - `orders[].totals.storedValueDiscounts` — array; optional. Free value an order took off before tax, after the promo code, in the order given: a promotional gift certificate, or a goodwill or service recovery credit. Each line's `amount` and `subtotal` are already after it; show each as its own row before the fees and tax, like the promo code's. Never on a hold. Always present: empty when there's none
        - `orders[].totals.storedValueDiscounts[]` — object; optional. 
          - `orders[].totals.storedValueDiscounts[].source` — string; required.  Allowed: "gift\_certificate", "credit"
          - `orders[].totals.storedValueDiscounts[].code` — string; required. Its code masked (•••• and its last 4)
          - `orders[].totals.storedValueDiscounts[].amount` — integer; required. What it took off, before tax minimum: -9007199254740991; maximum: 9007199254740991
          - `orders[].totals.storedValueDiscounts[].lines` — array; required. What it took off each line: this plus the line's own amount is what the line was before it
            - `orders[].totals.storedValueDiscounts[].lines[]` — one of: object, object; optional. 
              - `orders[].totals.storedValueDiscounts[].lines[] — object option 1` — object; optional. 
                - `orders[].totals.storedValueDiscounts[].lines[] — object option 1.kind` — string; required.  Value: "ticket\_type"
                - `orders[].totals.storedValueDiscounts[].lines[] — object option 1.ticketTypeId` — string; required. 
                - `orders[].totals.storedValueDiscounts[].lines[] — object option 1.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
              - `orders[].totals.storedValueDiscounts[].lines[] — object option 2` — object; optional. 
                - `orders[].totals.storedValueDiscounts[].lines[] — object option 2.kind` — string; required.  Value: "add\_on"
                - `orders[].totals.storedValueDiscounts[].lines[] — object option 2.addOnId` — string; required. 
                - `orders[].totals.storedValueDiscounts[].lines[] — object option 2.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
    - `orders[].payments` — array; required. 
      - `orders[].payments[]` — object; optional. 
        - `orders[].payments[].id` — string; required. 
        - `orders[].payments[].provider` — string; required. 
        - `orders[].payments[].status` — string or null; required. Null without orders:amounts
        - `orders[].payments[].amount` — integer or null; required. Null without orders:amounts
        - `orders[].payments[].createdAt` — string; required.  format: "date-time"
        - `orders[].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"
        - `orders[].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
        - `orders[].payments[].issuer` — string or null; optional. A voucher's issuer (Costco, WagJag). Null without orders:amounts
        - `orders[].payments[].note` — string or null; optional. Staff's own note on a recorded payment, never shown to the guest. Null without orders:amounts
        - `orders[].payments[].recordedBy` — string or null; optional. The member (usr_…) who recorded it
        - `orders[].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
        - `orders[].payments[].invoiceId` — string or null; optional. The invoice (ivc_…) it counts toward, or null. Always present
        - `orders[].payments[].currency` — string; required. 
    - `orders[].refunds` — array; required. 
      - `orders[].refunds[]` — object; optional. 
        - `orders[].refunds[].id` — string; required. 
        - `orders[].refunds[].amount` — integer or null; required. Null without orders:amounts
        - `orders[].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"
        - `orders[].refunds[].reason` — string or null; required.  Allowed: "seats\_unavailable", "guest\_request", "session\_canceled", "service\_issue", "duplicate", "goodwill", "other"
        - `orders[].refunds[].note` — string or null; required. Staff's own words. Null without orders:amounts
        - `orders[].refunds[].failureReason` — string or null; required. 
        - `orders[].refunds[].createdAt` — string; required.  format: "date-time"
        - `orders[].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"
        - `orders[].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
        - `orders[].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
        - `orders[].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
        - `orders[].refunds[].paymentId` — string; required. The payment's id
        - `orders[].refunds[].currency` — string; required. 
    - `orders[].invoices` — array; required. 
      - `orders[].invoices[]` — object; optional. 
        - `orders[].invoices[].id` — string; required. ivc_…
        - `orders[].invoices[].kind` — string; required. invoice, or credit_note (December) Allowed: "invoice", "credit\_note"
        - `orders[].invoices[].portion` — string or null; required. full (the whole order), deposit, or balance (the deposit's other half, issued with it). Null on a credit note Allowed: "full", "deposit", "balance"
        - `orders[].invoices[].number` — string or null; required. INV-0001: null on a draft, kept once voided
        - `orders[].invoices[].status` — string; required. What's stored; read `state` for paid, overdue, and the rest Allowed: "draft", "issued", "void"
        - `orders[].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"
        - `orders[].invoices[].orderId` — string; required. 
        - `orders[].invoices[].bookingCode` — string; required. 
        - `orders[].invoices[].quoteId` — string or null; required. 
        - `orders[].invoices[].entity` — object; required. 
          - `orders[].invoices[].entity.id` — string; required. 
          - `orders[].invoices[].entity.name` — string; required. 
        - `orders[].invoices[].location` — object; required. 
          - `orders[].invoices[].location.id` — string; required. 
          - `orders[].invoices[].location.name` — string; required. 
          - `orders[].invoices[].location.timeZone` — string; required. 
        - `orders[].invoices[].session` — object; required. 
          - `orders[].invoices[].session.id` — string; required. 
          - `orders[].invoices[].session.startsAt` — string; required.  format: "date-time"
          - `orders[].invoices[].session.when` — string; required. In the location's time zone
        - `orders[].invoices[].billTo` — object; required. 
          - `orders[].invoices[].billTo.name` — string or null; required. 
          - `orders[].invoices[].billTo.company` — string or null; required. 
          - `orders[].invoices[].billTo.email` — string or null; required. 
          - `orders[].invoices[].billTo.phone` — string or null; required. 
          - `orders[].invoices[].billTo.address` — object or null; required. 
            - `orders[].invoices[].billTo.address.line1` — string; required.  minLength: 1
            - `orders[].invoices[].billTo.address.line2` — string; optional.  minLength: 1
            - `orders[].invoices[].billTo.address.city` — string; required.  minLength: 1
            - `orders[].invoices[].billTo.address.region` — string; required. Province or state code, e.g. ON minLength: 1
            - `orders[].invoices[].billTo.address.postalCode` — string; required.  minLength: 1
            - `orders[].invoices[].billTo.address.country` — string; required. ISO 3166-1 alpha-2, e.g. CA pattern: "^\[A-Z\]\{2\}$"
        - `orders[].invoices[].issuer` — object or null; required. Null on a draft
          - `orders[].invoices[].issuer.name` — string; required. 
          - `orders[].invoices[].issuer.legalName` — string; required. 
          - `orders[].invoices[].issuer.address` — object; required. 
            - `orders[].invoices[].issuer.address.line1` — string; required.  minLength: 1
            - `orders[].invoices[].issuer.address.line2` — string; optional.  minLength: 1
            - `orders[].invoices[].issuer.address.city` — string; required.  minLength: 1
            - `orders[].invoices[].issuer.address.region` — string; required. Province or state code, e.g. ON minLength: 1
            - `orders[].invoices[].issuer.address.postalCode` — string; required.  minLength: 1
            - `orders[].invoices[].issuer.address.country` — string; required. ISO 3166-1 alpha-2, e.g. CA pattern: "^\[A-Z\]\{2\}$"
          - `orders[].invoices[].issuer.taxRegistrations` — array; required. 
            - `orders[].invoices[].issuer.taxRegistrations[]` — object; optional. 
              - `orders[].invoices[].issuer.taxRegistrations[].tax` — string; required. HST, GST, PST, sales tax
              - `orders[].invoices[].issuer.taxRegistrations[].jurisdiction` — string; required. CA-ON, US-MA
              - `orders[].invoices[].issuer.taxRegistrations[].number` — string; required. 
        - `orders[].invoices[].currency` — string; required. 
        - `orders[].invoices[].amount` — integer or null; required. What it asks for, with tax. Null without orders:amounts
        - `orders[].invoices[].paid` — integer or null; required. Paid toward it, less refunds of those payments. Null without orders:amounts
        - `orders[].invoices[].balance` — integer or null; required. What's still owed on it: 0 once paid, on a draft, or once void. Null without orders:amounts
        - `orders[].invoices[].totals` — object or null; required. Its own lines, frozen when it was made: the order's, or a deposit's or balance's share of each line, tax, and fee. Null without orders:amounts
          - `orders[].invoices[].totals.currency` — string; required. 
          - `orders[].invoices[].totals.lines` — array; required. 
            - `orders[].invoices[].totals.lines[]` — one of: object, object, object, object; optional. A booking's tickets, extras, and fees; a gift certificate's order has only its gift_certificate line
              - `orders[].invoices[].totals.lines[] — object option 1` — object; optional. 
                - `orders[].invoices[].totals.lines[] — object option 1.kind` — string; required.  Value: "ticket\_type"
                - `orders[].invoices[].totals.lines[] — object option 1.ticketTypeId` — string; required. 
                - `orders[].invoices[].totals.lines[] — object option 1.name` — string; required. 
                - `orders[].invoices[].totals.lines[] — object option 1.quantity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
                - `orders[].invoices[].totals.lines[] — object option 1.unitAmount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
                - `orders[].invoices[].totals.lines[] — object option 1.group` — object; optional. Only on a group option's line: the line is baseAmount plus unitAmount for each seat above includedSeats
                  - `orders[].invoices[].totals.lines[] — object option 1.group.baseAmount` — integer; required. The base charge, covering includedSeats, before fees and tax minimum: -9007199254740991; maximum: 9007199254740991
                  - `orders[].invoices[].totals.lines[] — object option 1.group.includedSeats` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
                - `orders[].invoices[].totals.lines[] — object option 1.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
                - `orders[].invoices[].totals.lines[] — object option 1.components` — array; optional. Only on a package whose price is split by tax class (a VIP ticket including a wine pairing): its parts, the ticket's own first, each taxed by its own class. Their amounts add up to the line's. Show them under the line
                  - `orders[].invoices[].totals.lines[] — object option 1.components[]` — object; optional. 
                    - `orders[].invoices[].totals.lines[] — object option 1.components[].addOnId` — string or null; required. The included add-on (prd_…) this part is; null for the ticket's own part, named for its product
                    - `orders[].invoices[].totals.lines[] — object option 1.components[].name` — string; required. 
                    - `orders[].invoices[].totals.lines[] — object option 1.components[].quantity` — integer; required. Units for the whole line (seats for the ticket's own part, seats times the units per seat for an add-on) minimum: -9007199254740991; maximum: 9007199254740991
                    - `orders[].invoices[].totals.lines[] — object option 1.components[].amount` — integer; required. Its part of the line's amount, after discounts, before tax minimum: -9007199254740991; maximum: 9007199254740991
                    - `orders[].invoices[].totals.lines[] — object option 1.components[].taxes` — array; optional. Its own taxes, by the add-on's tax class (the product's for the ticket's own part). Only on refunded lines
                      - `orders[].invoices[].totals.lines[] — object option 1.components[].taxes[]` — object; optional. 
                        - `orders[].invoices[].totals.lines[] — object option 1.components[].taxes[].name` — string; required. 
                        - `orders[].invoices[].totals.lines[] — object option 1.components[].taxes[].ratePpm` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
                        - `orders[].invoices[].totals.lines[] — object option 1.components[].taxes[].amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
              - `orders[].invoices[].totals.lines[] — object option 2` — object; optional. 
                - `orders[].invoices[].totals.lines[] — object option 2.kind` — string; required.  Value: "add\_on"
                - `orders[].invoices[].totals.lines[] — object option 2.addOnId` — string; required. The add-on (a product, prd_…)
                - `orders[].invoices[].totals.lines[] — object option 2.name` — string; required. 
                - `orders[].invoices[].totals.lines[] — object option 2.quantity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
                - `orders[].invoices[].totals.lines[] — object option 2.unitAmount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
                - `orders[].invoices[].totals.lines[] — object option 2.menuChoiceId` — string or null; optional. The menu choice (mch_…) this line is the supplement of, for the guests who picked it; null for an add-on bought on its own. One add-on can have both lines in one order: label each by this, never by its add-on and quantity. Always present
                - `orders[].invoices[].totals.lines[] — object option 2.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
              - `orders[].invoices[].totals.lines[] — object option 3` — object; optional. 
                - `orders[].invoices[].totals.lines[] — object option 3.kind` — string; required.  Value: "fee"
                - `orders[].invoices[].totals.lines[] — object option 3.feeId` — string; required. 
                - `orders[].invoices[].totals.lines[] — object option 3.name` — string; required. 
                - `orders[].invoices[].totals.lines[] — object option 3.ratePpm` — integer or null; required.  minimum: -9007199254740991; maximum: 9007199254740991
                - `orders[].invoices[].totals.lines[] — object option 3.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
              - `orders[].invoices[].totals.lines[] — object option 4` — object; optional. 
                - `orders[].invoices[].totals.lines[] — object option 4.kind` — string; required.  Value: "gift\_certificate"
                - `orders[].invoices[].totals.lines[] — object option 4.name` — string; required. "Gift certificate", or the preset's name
                - `orders[].invoices[].totals.lines[] — object option 4.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
          - `orders[].invoices[].totals.subtotal` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
          - `orders[].invoices[].totals.fees` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
          - `orders[].invoices[].totals.totalBeforeTax` — integer; required. Subtotal plus fees: the party's total as shown before tax minimum: -9007199254740991; maximum: 9007199254740991
          - `orders[].invoices[].totals.tax` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
          - `orders[].invoices[].totals.total` — integer; required. The total with tax, what the guest pays minimum: -9007199254740991; maximum: 9007199254740991
          - `orders[].invoices[].totals.taxes` — array; required. 
            - `orders[].invoices[].totals.taxes[]` — object; optional. 
              - `orders[].invoices[].totals.taxes[].name` — string; required. 
              - `orders[].invoices[].totals.taxes[].ratePpm` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
              - `orders[].invoices[].totals.taxes[].amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
              - `orders[].invoices[].totals.taxes[].base` — integer; required. What this tax was charged on: the lines carrying this rate, after discounts, before tax. Less than the subtotal before tax when part of it (a service charge) isn't taxed minimum: -9007199254740991; maximum: 9007199254740991
          - `orders[].invoices[].totals.discount` — object or null; optional. The promo code on this hold or order and what it took off, before tax. Each line's `amount` and `subtotal` are already after it. Null without a code. Always present
            - `orders[].invoices[].totals.discount.code` — string; required. 
            - `orders[].invoices[].totals.discount.kind` — string; required.  Allowed: "amount\_off", "percent\_off", "set\_price", "waive\_service\_charge"
            - `orders[].invoices[].totals.discount.amount` — integer; required. What it took off, before tax: off the tickets and extras, or the fees a waive_service_charge code waived minimum: -9007199254740991; maximum: 9007199254740991
            - `orders[].invoices[].totals.discount.lines` — array; required. What it took off each line: this plus the line's own amount is what the line was before it. A waived fee has no line of its own in `lines` above
              - `orders[].invoices[].totals.discount.lines[]` — one of: object, object, object; optional. 
                - `orders[].invoices[].totals.discount.lines[] — object option 1` — object; optional. 
                  - `orders[].invoices[].totals.discount.lines[] — object option 1.kind` — string; required.  Value: "ticket\_type"
                  - `orders[].invoices[].totals.discount.lines[] — object option 1.ticketTypeId` — string; required. 
                  - `orders[].invoices[].totals.discount.lines[] — object option 1.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
                - `orders[].invoices[].totals.discount.lines[] — object option 2` — object; optional. 
                  - `orders[].invoices[].totals.discount.lines[] — object option 2.kind` — string; required.  Value: "add\_on"
                  - `orders[].invoices[].totals.discount.lines[] — object option 2.addOnId` — string; required. 
                  - `orders[].invoices[].totals.discount.lines[] — object option 2.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
                - `orders[].invoices[].totals.discount.lines[] — object option 3` — object; optional. 
                  - `orders[].invoices[].totals.discount.lines[] — object option 3.kind` — string; required.  Value: "fee"
                  - `orders[].invoices[].totals.discount.lines[] — object option 3.feeId` — string; required. 
                  - `orders[].invoices[].totals.discount.lines[] — object option 3.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
          - `orders[].invoices[].totals.storedValueDiscounts` — array; optional. Free value an order took off before tax, after the promo code, in the order given: a promotional gift certificate, or a goodwill or service recovery credit. Each line's `amount` and `subtotal` are already after it; show each as its own row before the fees and tax, like the promo code's. Never on a hold. Always present: empty when there's none
            - `orders[].invoices[].totals.storedValueDiscounts[]` — object; optional. 
              - `orders[].invoices[].totals.storedValueDiscounts[].source` — string; required.  Allowed: "gift\_certificate", "credit"
              - `orders[].invoices[].totals.storedValueDiscounts[].code` — string; required. Its code masked (•••• and its last 4)
              - `orders[].invoices[].totals.storedValueDiscounts[].amount` — integer; required. What it took off, before tax minimum: -9007199254740991; maximum: 9007199254740991
              - `orders[].invoices[].totals.storedValueDiscounts[].lines` — array; required. What it took off each line: this plus the line's own amount is what the line was before it
                - `orders[].invoices[].totals.storedValueDiscounts[].lines[]` — one of: object, object; optional. 
                  - `orders[].invoices[].totals.storedValueDiscounts[].lines[] — object option 1` — object; optional. 
                    - `orders[].invoices[].totals.storedValueDiscounts[].lines[] — object option 1.kind` — string; required.  Value: "ticket\_type"
                    - `orders[].invoices[].totals.storedValueDiscounts[].lines[] — object option 1.ticketTypeId` — string; required. 
                    - `orders[].invoices[].totals.storedValueDiscounts[].lines[] — object option 1.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
                  - `orders[].invoices[].totals.storedValueDiscounts[].lines[] — object option 2` — object; optional. 
                    - `orders[].invoices[].totals.storedValueDiscounts[].lines[] — object option 2.kind` — string; required.  Value: "add\_on"
                    - `orders[].invoices[].totals.storedValueDiscounts[].lines[] — object option 2.addOnId` — string; required. 
                    - `orders[].invoices[].totals.storedValueDiscounts[].lines[] — object option 2.amount` — integer; required. Minor units (cents) minimum: -9007199254740991; maximum: 9007199254740991
        - `orders[].invoices[].matchesOrder` — boolean; required. Whether the order's invoices still add up to the order. False once seats changed after it was issued: void it and issue another
        - `orders[].invoices[].statement` — array or null; required. What's been paid and given back, as lines after the total that add up to the balance: `amount` plus every line's amount is `balance`. Empty while nothing has been paid or refunded, and on a draft or a void invoice. A refund already given (goodwill, say) shows as its own line with its reason, then comes off again as not owed again. Null without orders:amounts
          - `orders[].invoices[].statement[]` — object; optional. 
            - `orders[].invoices[].statement[].kind` — string; required. paid (minus), refunded (a refund already given, plus: money handed back is owed again), refund_not_owed (minus: the refund leaves nothing owing, so the same amount comes off again) Allowed: "paid", "refunded", "refund\_not\_owed"
            - `orders[].invoices[].statement[].amount` — integer; required. Signed, in minor units, so the invoice's `amount` plus every line's `amount` is its `balance` minimum: -9007199254740991; maximum: 9007199254740991
            - `orders[].invoices[].statement[].reason` — string or null; required. Why a refund was given (goodwill, service_issue, …); null on the other kinds Allowed: "seats\_unavailable", "guest\_request", "session\_canceled", "service\_issue", "duplicate", "goodwill", "other"
            - `orders[].invoices[].statement[].label` — string; required. The line in English: Paid, Refunded (goodwill), Refund not owed again
        - `orders[].invoices[].payments` — array or null; required. Null without orders:amounts
          - `orders[].invoices[].payments[]` — object; optional. 
            - `orders[].invoices[].payments[].id` — string; required. pay_…
            - `orders[].invoices[].payments[].tender` — string; required.  Allowed: "card", "gift\_certificate", "credit", "card\_terminal", "cash", "debit", "e\_transfer", "cheque", "voucher"
            - `orders[].invoices[].payments[].status` — string; required.  Allowed: "pending", "processing", "succeeded", "failed", "canceled"
            - `orders[].invoices[].payments[].amount` — integer; required. Minor units (cents) in the location's currency
            - `orders[].invoices[].payments[].refunded` — integer; required. Refunded or on its way back (an excess given back, or staff's)
            - `orders[].invoices[].payments[].createdAt` — string; required.  format: "date-time"
        - `orders[].invoices[].issuedAt` — string or null; required.  format: "date-time"
        - `orders[].invoices[].dueOn` — string or null; required. The day it's due, at the location. Null on a credit note format: "date"
        - `orders[].invoices[].dueAt` — string or null; required. The end of dueOn at the location: overdue from then format: "date-time"
        - `orders[].invoices[].overdueAt` — string or null; required. When the overdue alert was raised format: "date-time"
        - `orders[].invoices[].sentAt` — string or null; required. When it was last emailed format: "date-time"
        - `orders[].invoices[].note` — string or null; required. Shown to the guest
        - `orders[].invoices[].voidedAt` — string or null; required.  format: "date-time"
        - `orders[].invoices[].voidReason` — string or null; required.  Allowed: "reissued", "order\_canceled", "issued\_in\_error", "other"
        - `orders[].invoices[].voidNote` — string or null; required. Staff's own words. Null without orders:amounts
        - `orders[].invoices[].createdAt` — string; required.  format: "date-time"
- `participants` — array; required. 
  - `participants[]` — object; optional. 
    - `participants[].position` — integer; required. The guest's place in the party, as booking questions' answers number them. Positions never renumber: removing seats removes the highest positions not checked in, so a checked-in guest keeps theirs (it can be above the party's size) minimum: -9007199254740991; maximum: 9007199254740991
    - `participants[].name` — string or null; required. Null when nobody's given one. The first name only, without customers:contact
    - `participants[].checkedInAt` — string or null; required. When they arrived: the server's time, or the time the phone queued it for a call replayed after being offline format: "date-time"
    - `participants[].checkedInBy` — string or null; required. The member who checked them in (name, or email)
    - `participants[].bookingId` — string; required. The booking's id, from list_bookings
    - `participants[].removedAt` — string or null; required.  format: "date-time"
    - `participants[].claimedAt` — string or null; required.  format: "date-time"
- `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
- `partySeats` — array; required. 
  - `partySeats[]` — object; optional. 
    - `partySeats[].position` — integer; required. The guest's place in the party, as booking questions' answers number them. Positions never renumber: removing seats removes the highest positions not checked in, so a checked-in guest keeps theirs (it can be above the party's size) minimum: -9007199254740991; maximum: 9007199254740991
    - `partySeats[].name` — string or null; required. Null when nobody's given one. The first name only, without customers:contact
    - `partySeats[].checkedInAt` — string or null; required. When they arrived: the server's time, or the time the phone queued it for a call replayed after being offline format: "date-time"
    - `partySeats[].checkedInBy` — string or null; required. The member who checked them in (name, or email)
    - `partySeats[].bookingId` — string; required. The booking's id, from list_bookings
    - `partySeats[].removedAt` — string or null; required.  format: "date-time"
    - `partySeats[].claimedAt` — string or null; required.  format: "date-time"
- `menuChoices` — array; required. 
  - `menuChoices[]` — object; optional. 
    - `menuChoices[].bookingId` — string; required. The booking's id, from list_bookings
    - `menuChoices[].position` — integer or null; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `menuChoices[].courseId` — string; required. The menu course's id, from list_menus
    - `menuChoices[].choiceId` — string or null; required. The menu choice's id, from list_menus
    - `menuChoices[].quantity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `menuChoices[].defaulted` — boolean; required. 
- `giftCertificates` — array; required. 
  - `giftCertificates[]` — object; optional. 
    - `giftCertificates[].id` — string; required. 
    - `giftCertificates[].code` — string; required. In groups of 4. In full only to someone holding refunds:create and orders:amounts where it was sold; masked (•••• and its last 4) otherwise, since whoever reads it can spend it
    - `giftCertificates[].kind` — string; required.  Allowed: "purchased", "promotional", "refund"
    - `giftCertificates[].reason` — string or null; optional.  Allowed: "comp", "partner", "media", "service\_recovery"
    - `giftCertificates[].issuedBy` — string or null; optional. 
    - `giftCertificates[].status` — string; required. pending (its purchase isn't paid yet), active, voided, or expired (promotional ones past expiresAt) Allowed: "pending", "active", "voided", "expired"
    - `giftCertificates[].entityId` — string; required. The entity it's a liability of
    - `giftCertificates[].locationId` — string or null; required. Where it was sold
    - `giftCertificates[].currency` — string; required. 
    - `giftCertificates[].amount` — integer or null; required. As sold, minor units; null without orders:amounts
    - `giftCertificates[].balance` — integer or null; required. What's left to use; null without orders:amounts
    - `giftCertificates[].orderId` — string or null; required. The purchase's order; null for a promotional one
    - `giftCertificates[].orderCode` — string or null; required. 
    - `giftCertificates[].buyer` — object or null; required. 
      - `giftCertificates[].buyer.customerId` — string or null; required. 
      - `giftCertificates[].buyer.name` — string; required. First name only without customers:contact
    - `giftCertificates[].recipientName` — string or null; required. First name only without customers:contact
    - `giftCertificates[].recipientEmail` — string or null; required. Null without customers:contact, or when none was given
    - `giftCertificates[].message` — string or null; required. 
    - `giftCertificates[].presetName` — string or null; required. 
    - `giftCertificates[].deliverOn` — string or null; required. The local date at its location it goes to the recipient format: "date"
    - `giftCertificates[].deliverAt` — string or null; required. When the delivery job sends it: 9:00 at its location on deliverOn, or the moment it was paid for (or issued) when that was already the day. Show it in timeZone format: "date-time"
    - `giftCertificates[].timeZone` — string or null; required. The time zone of the location it was sold at, where deliverOn is a local date and deliverAt was planned; null without a location
    - `giftCertificates[].deliveredAt` — string or null; required.  format: "date-time"
    - `giftCertificates[].delivery` — object; required. 
      - `giftCertificates[].delivery.state` — string; required. scheduled: goes at deliverAt; overdue: deliverAt has passed without a send; sent; no_email: nowhere to send it (the buyer's receipt has its card link) Allowed: "scheduled", "overdue", "sent", "no\_email"
      - `giftCertificates[].delivery.deliverOn` — string or null; required. A local date at the location, YYYY-MM-DD format: "date"
      - `giftCertificates[].delivery.deliverAt` — string or null; required. When it goes, as deliverAt above format: "date-time"
      - `giftCertificates[].delivery.timeZone` — string or null; required. Where deliverAt is shown, as timeZone above
      - `giftCertificates[].delivery.deliveredAt` — string or null; required.  format: "date-time"
    - `giftCertificates[].expiresAt` — string or null; optional.  format: "date-time"
    - `giftCertificates[].voidedAt` — string or null; required.  format: "date-time"
    - `giftCertificates[].voidReason` — string or null; required.  Allowed: "refunded", "fraud", "issued\_in\_error", "other"
    - `giftCertificates[].voidNote` — string or null; required. Staff's own words; null without orders:amounts
    - `giftCertificates[].createdAt` — string; required.  format: "date-time"
- `credits` — array; required. 
  - `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"
- `tips` — array; required. 
  - `tips[]` — object; optional. 
    - `tips[].id` — string; required. The tip's id, from list_tips
    - `tips[].orderId` — string or null; required. The order's id, from list_bookings or list_orders
    - `tips[].amount` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `tips[].currency` — string; required. 
    - `tips[].source` — string; required.  Allowed: "booking\_link", "qr", "checkout"
    - `tips[].contactName` — string or null; required. 
    - `tips[].paidAt` — string or null; required.  format: "date-time"
    - `tips[].createdAt` — string; required.  format: "date-time"
- `messages` — array; required. 
  - `messages[]` — object; optional. 
    - `messages[].id` — string; required. The message's id, from list_messages
    - `messages[].notification` — string; required. 
    - `messages[].recipient` — string; required. 
    - `messages[].status` — string; required. 
    - `messages[].sendAt` — string; required.  format: "date-time"
    - `messages[].sentAt` — string or null; required.  format: "date-time"
    - `messages[].deliveryStatus` — string or null; required. 
    - `messages[].deliveryAt` — string or null; required.  format: "date-time"
- `suppressions` — array; required. 
  - `suppressions[]` — object; optional. 
    - `suppressions[].id` — string; required. 
    - `suppressions[].address` — string; required. 
    - `suppressions[].reason` — string; required.  Allowed: "hard\_bounce", "complaint"
    - `suppressions[].scope` — string; required. A hard bounce holds for every organization on Lokl (the address doesn't exist); a complaint only for this one Allowed: "all\_organizations", "this\_organization"
    - `suppressions[].since` — string; required.  format: "date-time"
    - `suppressions[].liftedAt` — string or null; required.  format: "date-time"
    - `suppressions[].canLift` — boolean; required. A complaint that hasn't been lifted. A hard bounce can't be lifted: the address doesn't exist, and it stops mattering once the guest's email is corrected
- `activity` — array; required. 
  - `activity[]` — object; optional. 
    - `activity[].id` — string; required. 
    - `activity[].type` — string; required. 
    - `activity[].actor` — object; required. 
      - `activity[].actor.type` — string; required.  Allowed: "user", "agent", "system", "guest"
      - `activity[].actor.id` — string or null; required. 
      - `activity[].actor.via` — string; required.  Allowed: "session", "api\_key", "oauth", "internal", "public"
      - `activity[].actor.name` — string or null; required. 
    - `activity[].subject` — object; required. 
      - `activity[].subject.type` — string; required. 
      - `activity[].subject.id` — string; required. 
      - `activity[].subject.label` — string or null; required. 
    - `activity[].locationName` — string or null; required. 
    - `activity[].changes` — array or null; required. 
      - `activity[].changes[]` — object; optional. 
        - `activity[].changes[].field` — string; required. 
        - `activity[].changes[].before` — string or null; required. 
        - `activity[].changes[].after` — string or null; required. 
    - `activity[].changesetId` — string or null; required. 
    - `activity[].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
      - `activity[].draftedBy.agentId` — string; required. 
      - `activity[].draftedBy.callId` — string; required. 
    - `activity[].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
      - `activity[].data.*` — any value; optional. 
    - `activity[].masked` — boolean; optional. True when `data` was withheld
    - `activity[].createdAt` — string; required.  format: "date-time"

### withdraw_marketing_consent

Record a guest's request to stop news and offers. Booking messages continue. Needs customers:privacy across the organization. Cannot be undone: only the guest can grant consent again. Returns a preview to confirm.

Changes · Members of an organization · Needs customers:privacy

#### Input

- `email` — string; required.  format: "email"; maxLength: 320

#### Output

- `status` — string; required.  Value: "withdrawn"
- `changed` — boolean; required. 
