# Private sessions tools

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

## Private sessions

### create_private_session

Create a private session for one party: a session of a product at a location at any local date and time, outside any schedule, priced `flat` (one amount for the party) or `per_person`, before fees and tax, for up to `partySizeMax` guests (the session's capacity by default; a product with no capacity there needs one set with update_settings first). It's never listed to guests; the party books and pays through its private booking link (the returned `private.token`: share `<booking site>/<organization slug>/private/<token>` with them, like a manage link), which takes the whole session at this price. It holds the product's resources like any session, so a closure, a block, or a resource another session holds is a conflict. Returns a preview to confirm; undo removes it while the party neither holds it nor has booked it, and no order was placed for it.

Changes · Members of an organization · Needs pricing:write, sessions:write

#### Input

- `productId` — string; required. The product's id, from list_products
- `locationId` — string; required. The location's id, from get_setup
- `date` — string; required. A local date at the location, YYYY-MM-DD format: "date"
- `startTime` — string; required. A local start time at the location, HH:MM, 24-hour pattern: "^(\[01\]\\\\d\|2\[0-3\]):\[0-5\]\\\\d$"
- `durationMinutes` — integer; optional. Defaults to the product's duration minimum: 1; maximum: 1440
- `name` — string or null; optional. Whose it is (e.g. Acme holiday party); the party sees it on its booking page minLength: 1; maxLength: 200
- `pricing` — string; required. flat: `amount` is the party's price, whatever its size; per_person: `amount` a person Allowed: "flat", "per\_person"
- `amount` — integer; required. Minor units, before fees and tax (the service charge and tax are added as at checkout) minimum: 0
- `partySizeMax` — integer or null; optional. The largest party; left out or null: the session's capacity minimum: 1; maximum: 10000

#### Output

- `id` — string; required. 
- `productId` — string; required. 
- `productName` — string; required. 
- `hasMenu` — boolean; required. Whether its product has an active menu where this session is offered (the location's own, else one for all its locations): a dining session, with menu choices and a kitchen sheet. Without one, the session has no kitchen sheet.
- `locationId` — string; required. 
- `timeZone` — string; required. 
- `scheduleId` — string or null; required. Null for a session created outside a schedule
- `status` — string; required.  Allowed: "scheduled", "canceled"
- `startsAt` — string; required.  format: "date-time"
- `endsAt` — string; required.  format: "date-time"
- `localStart` — string; required. 
- `capacity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `seatsHeld` — integer; required. In checkouts not yet paid minimum: -9007199254740991; maximum: 9007199254740991
- `seatsBooked` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `checkedIn` — integer; optional. Guests checked in on its confirmed bookings, for the calendar and the run sheet. Always present minimum: -9007199254740991; maximum: 9007199254740991
- `wholeSession` — boolean; optional. Held or booked whole by a group option (a private booking): no seats left for anyone else, staff included
- `private` — object or null; optional. A private session's terms and booking link; null for a session on sale to everyone
  - `private.name` — string or null; required. Whose it is
  - `private.pricing` — string; required.  Allowed: "flat", "per\_person"
  - `private.amount` — integer or null; required. Minor units, before fees and tax: for the party (flat) or a person (per_person). Null without pricing:read minimum: -9007199254740991; maximum: 9007199254740991
  - `private.partySizeMax` — integer or null; required. The largest party; null: the session's capacity minimum: -9007199254740991; maximum: 9007199254740991
  - `private.token` — string or null; required. The private booking link's token. Share it only with the party: it books the session. Null without pricing:write, which setting its price needs too
- `block` — object or null; optional. The closure or product block it's inside, which takes it off sale (its bookings stay); null when none. Always present in list_sessions
  - `block.id` — string; required. 
  - `block.kind` — string; required.  Allowed: "closure", "product"
  - `block.note` — string or null; required. 
- `settings` — object; required. Overrides set on this session
  - `settings.*` — any value; optional. 

### renew_private_link

Issue a new private booking link for a private session, so a link that went to the wrong people stops working: the old token is not found from then on. Holds already placed through it keep going. Returns a preview to confirm (the new token comes with the applied change). It can't be undone, so an old link never comes back: renew again for another one.

Changes · Members of an organization · Needs pricing:write, sessions:write

#### Input

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

#### Output

- `id` — string; required. 
- `productId` — string; required. 
- `productName` — string; required. 
- `hasMenu` — boolean; required. Whether its product has an active menu where this session is offered (the location's own, else one for all its locations): a dining session, with menu choices and a kitchen sheet. Without one, the session has no kitchen sheet.
- `locationId` — string; required. 
- `timeZone` — string; required. 
- `scheduleId` — string or null; required. Null for a session created outside a schedule
- `status` — string; required.  Allowed: "scheduled", "canceled"
- `startsAt` — string; required.  format: "date-time"
- `endsAt` — string; required.  format: "date-time"
- `localStart` — string; required. 
- `capacity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `seatsHeld` — integer; required. In checkouts not yet paid minimum: -9007199254740991; maximum: 9007199254740991
- `seatsBooked` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `checkedIn` — integer; optional. Guests checked in on its confirmed bookings, for the calendar and the run sheet. Always present minimum: -9007199254740991; maximum: 9007199254740991
- `wholeSession` — boolean; optional. Held or booked whole by a group option (a private booking): no seats left for anyone else, staff included
- `private` — object or null; optional. A private session's terms and booking link; null for a session on sale to everyone
  - `private.name` — string or null; required. Whose it is
  - `private.pricing` — string; required.  Allowed: "flat", "per\_person"
  - `private.amount` — integer or null; required. Minor units, before fees and tax: for the party (flat) or a person (per_person). Null without pricing:read minimum: -9007199254740991; maximum: 9007199254740991
  - `private.partySizeMax` — integer or null; required. The largest party; null: the session's capacity minimum: -9007199254740991; maximum: 9007199254740991
  - `private.token` — string or null; required. The private booking link's token. Share it only with the party: it books the session. Null without pricing:write, which setting its price needs too
- `block` — object or null; optional. The closure or product block it's inside, which takes it off sale (its bookings stay); null when none. Always present in list_sessions
  - `block.id` — string; required. 
  - `block.kind` — string; required.  Allowed: "closure", "product"
  - `block.note` — string or null; required. 
- `settings` — object; required. Overrides set on this session
  - `settings.*` — any value; optional. 

### update_private_session

Change a private session's terms before the party holds it: whose it is (`name`), `pricing` (flat or per_person), `amount` (minor units, before fees and tax), or `partySizeMax` (null for the session's capacity). Refused while the party holds it (a hold locks its price) or has booked it; a hold that ran out or was released doesn't stop it. Its time is changed by cancelling it (cancel_session) and creating another. Returns a preview to confirm.

Changes · Members of an organization · Needs pricing:write, sessions:write

#### Input

- `sessionId` — string; required. The session's id, from list_sessions
- `name` — string or null; optional. Whose it is (e.g. Acme holiday party); the party sees it on its booking page minLength: 1; maxLength: 200
- `pricing` — string; optional. flat: `amount` is the party's price, whatever its size; per_person: `amount` a person Allowed: "flat", "per\_person"
- `amount` — integer; optional. Minor units, before fees and tax (the service charge and tax are added as at checkout) minimum: 0
- `partySizeMax` — integer or null; optional. The largest party; left out or null: the session's capacity minimum: 1; maximum: 10000

#### Output

- `id` — string; required. 
- `productId` — string; required. 
- `productName` — string; required. 
- `hasMenu` — boolean; required. Whether its product has an active menu where this session is offered (the location's own, else one for all its locations): a dining session, with menu choices and a kitchen sheet. Without one, the session has no kitchen sheet.
- `locationId` — string; required. 
- `timeZone` — string; required. 
- `scheduleId` — string or null; required. Null for a session created outside a schedule
- `status` — string; required.  Allowed: "scheduled", "canceled"
- `startsAt` — string; required.  format: "date-time"
- `endsAt` — string; required.  format: "date-time"
- `localStart` — string; required. 
- `capacity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `seatsHeld` — integer; required. In checkouts not yet paid minimum: -9007199254740991; maximum: 9007199254740991
- `seatsBooked` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `checkedIn` — integer; optional. Guests checked in on its confirmed bookings, for the calendar and the run sheet. Always present minimum: -9007199254740991; maximum: 9007199254740991
- `wholeSession` — boolean; optional. Held or booked whole by a group option (a private booking): no seats left for anyone else, staff included
- `private` — object or null; optional. A private session's terms and booking link; null for a session on sale to everyone
  - `private.name` — string or null; required. Whose it is
  - `private.pricing` — string; required.  Allowed: "flat", "per\_person"
  - `private.amount` — integer or null; required. Minor units, before fees and tax: for the party (flat) or a person (per_person). Null without pricing:read minimum: -9007199254740991; maximum: 9007199254740991
  - `private.partySizeMax` — integer or null; required. The largest party; null: the session's capacity minimum: -9007199254740991; maximum: 9007199254740991
  - `private.token` — string or null; required. The private booking link's token. Share it only with the party: it books the session. Null without pricing:write, which setting its price needs too
- `block` — object or null; optional. The closure or product block it's inside, which takes it off sale (its bookings stay); null when none. Always present in list_sessions
  - `block.id` — string; required. 
  - `block.kind` — string; required.  Allowed: "closure", "product"
  - `block.note` — string or null; required. 
- `settings` — object; required. Overrides set on this session
  - `settings.*` — any value; optional. 
