# Group options tools

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

## Group options

### create_group_option

Add a group option to a product, beside its individual tickets: a base charge covering `includedSeats`, then a rate per person above them up to `maxSize`, either sharing the session or taking all of it (`wholeSession`, a private booking: offered only on an empty session, which then closes to everyone else). E.g. "Up to 6" (includedSeats 6, maxSize 6) or a private game (includedSeats 40, wholeSession, no maxSize: up to the session's capacity). A party smaller than includedSeats pays the base charge; `minSize` (the group minimum) is the smallest party guests can book it for. It isn't offered anywhere until it has a price at a location (set_group_option_price). Price rules never apply to it. Returns a preview to confirm.

Changes · Members of an organization · Needs products:write

#### Input

- `productId` — string; required. The product's id, from list_products
- `name` — string; required.  minLength: 1; maxLength: 100
- `includedSeats` — integer; required. Seats the base charge covers minimum: 1; maximum: 10000
- `description` — string or null; optional.  maxLength: 2000
- `position` — integer; optional. Display order among the product's group options minimum: 0; maximum: 10000
- `minSize` — integer or null; optional. The group minimum: the smallest party guests can book it for (at most maxSize); null or 1: any. Staff can book fewer minimum: 1; maximum: 10000
- `maxSize` — integer or null; optional. The largest party it takes (at least includedSeats); null: up to the session's capacity minimum: 1; maximum: 10000
- `wholeSession` — boolean; optional. Take the whole session (a private booking): offered only on an empty session, which then closes to everyone else. Default false: it shares the session
- `price` — object; optional. Its price at a location where the product is offered, set in the same changeset (needs pricing:write); the same as set_group_option_price afterwards
  - `price.locationId` — string; required. The location's id, from get_setup
  - `price.amount` — integer; required. The base charge, covering the option's included seats minimum: 0
  - `price.perPersonAmount` — integer or null; optional. Per person above the included seats; null or left out: nobody above them minimum: 0

#### Output

- `id` — string; required. 
- `productId` — string; required. 
- `ticketTypeId` — string; required. Its ticket type, which its prices, holds, and bookings refer to
- `name` — string; required. 
- `description` — string or null; required. 
- `status` — string; required.  Allowed: "active", "archived"
- `position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `includedSeats` — integer; required. Seats the base charge covers minimum: -9007199254740991; maximum: 9007199254740991
- `minSize` — integer; required. The smallest party guests can book it for (the group minimum; 1: any); staff can book fewer minimum: -9007199254740991; maximum: 9007199254740991
- `maxSize` — integer or null; required. The largest party it takes; null: up to the session's capacity minimum: -9007199254740991; maximum: 9007199254740991
- `wholeSession` — boolean; required. Takes the whole session (a private booking): offered only on an empty session, which then closes to everyone else
- `prices` — array; required. 
  - `prices[]` — object; optional. 
    - `prices[].locationId` — string; required. 
    - `prices[].currency` — string; required. 
    - `prices[].baseAmount` — integer; required. The base charge, covering includedSeats
    - `prices[].perPersonAmount` — integer or null; required. Per person above includedSeats; null: it takes no one above them there

### remove_group_option

Remove a group option from its product. One nobody has held is deleted with its prices, its schedules' own prices for it included (set_schedule_price; the preview lists them), and undoing it brings them all back. One that guests have held or booked is archived instead (no longer offered; its holds, orders, and bookings keep it), and update_group_option with status active brings it back. Returns a preview to confirm.

Changes · Members of an organization · Needs products:write

#### Input

- `groupOptionId` — string; required. The booking mode's id

#### Output

- `groupOptionId` — string; required. 
- `removed` — string; required.  Allowed: "deleted", "archived"

### set_group_option_price

Set a group option's price at a location where its product is offered: the base charge covering its included seats (`baseAmount`, minor units) and the rate per person above them (`perPersonAmount`; null or left out: it takes nobody above its included seats there). `remove: true` stops offering it there. Prices rules never change it, and holds already placed keep their prices. Returns a preview to confirm.

Changes · Members of an organization · Needs pricing:write

#### Input

- `groupOptionId` — string; required. The booking mode's id
- `locationId` — string; required. The location's id, from get_setup
- `baseAmount` — integer; optional. The base charge, covering the option's included seats minimum: 0
- `perPersonAmount` — integer or null; optional. Per person above the included seats; null or left out: nobody above them minimum: 0
- `remove` — boolean; optional. Stop offering the option at this location

#### Output

- `groupOptionId` — string; required. 
- `locationId` — string; required. 
- `currency` — string; required. 
- `price` — object or null; required. Null when removed: the option isn't offered there
  - `price.baseAmount` — integer; required. Minor units (cents) in the location's currency
  - `price.perPersonAmount` — integer or null; required. Minor units (cents) in the location's currency
- `description` — string; required. 

### update_group_option

Change a group option's name, description, display position, terms (includedSeats, minSize (the group minimum for guests), maxSize with null for the session's capacity, wholeSession), or status (archived stops offering it; active brings it back). Holds and bookings already made keep the terms and prices they were made at. Prices are changed with set_group_option_price. Returns a preview to confirm.

Changes · Members of an organization · Needs products:write

#### Input

- `groupOptionId` — string; required. The booking mode's id
- `name` — string; optional.  minLength: 1; maxLength: 100
- `includedSeats` — integer; optional.  minimum: 1; maximum: 10000
- `description` — string or null; optional.  maxLength: 2000
- `position` — integer; optional. Display order among the product's group options minimum: 0; maximum: 10000
- `minSize` — integer or null; optional. The group minimum: the smallest party guests can book it for (at most maxSize); null or 1: any. Staff can book fewer minimum: 1; maximum: 10000
- `maxSize` — integer or null; optional. The largest party it takes (at least includedSeats); null: up to the session's capacity minimum: 1; maximum: 10000
- `wholeSession` — boolean; optional. Take the whole session (a private booking): offered only on an empty session, which then closes to everyone else. Default false: it shares the session
- `status` — string; optional.  Allowed: "active", "archived"

#### Output

- `id` — string; required. 
- `productId` — string; required. 
- `ticketTypeId` — string; required. Its ticket type, which its prices, holds, and bookings refer to
- `name` — string; required. 
- `description` — string or null; required. 
- `status` — string; required.  Allowed: "active", "archived"
- `position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `includedSeats` — integer; required. Seats the base charge covers minimum: -9007199254740991; maximum: 9007199254740991
- `minSize` — integer; required. The smallest party guests can book it for (the group minimum; 1: any); staff can book fewer minimum: -9007199254740991; maximum: 9007199254740991
- `maxSize` — integer or null; required. The largest party it takes; null: up to the session's capacity minimum: -9007199254740991; maximum: 9007199254740991
- `wholeSession` — boolean; required. Takes the whole session (a private booking): offered only on an empty session, which then closes to everyone else
- `prices` — array; required. 
  - `prices[]` — object; optional. 
    - `prices[].locationId` — string; required. 
    - `prices[].currency` — string; required. 
    - `prices[].baseAmount` — integer; required. The base charge, covering includedSeats
    - `prices[].perPersonAmount` — integer or null; required. Per person above includedSeats; null: it takes no one above them there
