# Menus tools

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

## Menus

### add_menu_choice

Add a choice to an existing menu course, with optional allergens, dietary tags and a supplement add-on. Position defaults to the end; a supplied position shifts nothing. Making it the default replaces the previous default. Existing holds and bookings keep their counts. Returns a preview to confirm.

Changes · Members of an organization · Needs products:write

#### Input

- `name` — string; required.  minLength: 1; maxLength: 100
- `description` — string; optional.  maxLength: 1000
- `allergens` — array; optional. Canada's priority allergens it contains: peanut, tree_nut, sesame, milk, egg, fish, crustacean, mollusc, soy, wheat, gluten, mustard, sulphite maxItems: 20; default: \[\]
  - `allergens[]` — string; optional.  Allowed: "peanut", "tree\_nut", "sesame", "milk", "egg", "fish", "crustacean", "mollusc", "soy", "wheat", "gluten", "mustard", "sulphite"
- `dietary` — array; optional. What it suits: vegetarian, vegan, pescatarian, gluten_free, dairy_free, nut_free, halal, kosher maxItems: 10; default: \[\]
  - `dietary[]` — string; optional.  Allowed: "vegetarian", "vegan", "pescatarian", "gluten\_free", "dairy\_free", "nut\_free", "halal", "kosher"
- `supplementAddOnId` — string; optional. An add-on charged for each guest who picks this choice (e.g. a $15 upgraded main)
- `default` — boolean; optional. Fills the seats the organizer leaves unchosen (at most one per course; never one with a supplement) default: false
- `courseId` — string; required. The menu course's id, from list_menus
- `position` — integer; optional.  minimum: 0; maximum: 9007199254740991

#### Output

- `id` — string; required. 
- `name` — string; required. 
- `description` — string or null; required. 
- `status` — string; required.  Allowed: "active", "archived"
- `courses` — array; required. 
  - `courses[]` — object; optional. 
    - `courses[].id` — string; required. 
    - `courses[].name` — string; required. 
    - `courses[].position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `courses[].choices` — array; required. 
      - `courses[].choices[]` — object; optional. 
        - `courses[].choices[].id` — string; required. 
        - `courses[].choices[].name` — string; required. 
        - `courses[].choices[].description` — string or null; required. 
        - `courses[].choices[].position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
        - `courses[].choices[].status` — string; required.  Allowed: "active", "archived"
        - `courses[].choices[].default` — boolean; required. Fills the seats the organizer leaves unchosen in this course
        - `courses[].choices[].allergens` — array; required. 
          - `courses[].choices[].allergens[]` — string; optional. 
        - `courses[].choices[].dietary` — array; required. 
          - `courses[].choices[].dietary[]` — string; optional. 
        - `courses[].choices[].supplementAddOnId` — string or null; required. The add-on charged for each guest who picks it (its price and stock per location: list_add_ons)
- `offeredBy` — array; required. 
  - `offeredBy[]` — object; optional. 
    - `offeredBy[].productId` — string; required. 
    - `offeredBy[].locationId` — string or null; required. Null: at every location it's offered

### add_menu_course

Add a course to an existing menu. Position defaults to the end; a supplied position shifts nothing. Existing holds and bookings keep their counts. Returns a preview to confirm.

Changes · Members of an organization · Needs products:write

#### Input

- `menuId` — string; required. The menu's id, from list_menus
- `name` — string; required.  minLength: 1; maxLength: 100
- `position` — integer; optional.  minimum: 0; maximum: 9007199254740991

#### Output

- `id` — string; required. 
- `name` — string; required. 
- `description` — string or null; required. 
- `status` — string; required.  Allowed: "active", "archived"
- `courses` — array; required. 
  - `courses[]` — object; optional. 
    - `courses[].id` — string; required. 
    - `courses[].name` — string; required. 
    - `courses[].position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `courses[].choices` — array; required. 
      - `courses[].choices[]` — object; optional. 
        - `courses[].choices[].id` — string; required. 
        - `courses[].choices[].name` — string; required. 
        - `courses[].choices[].description` — string or null; required. 
        - `courses[].choices[].position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
        - `courses[].choices[].status` — string; required.  Allowed: "active", "archived"
        - `courses[].choices[].default` — boolean; required. Fills the seats the organizer leaves unchosen in this course
        - `courses[].choices[].allergens` — array; required. 
          - `courses[].choices[].allergens[]` — string; optional. 
        - `courses[].choices[].dietary` — array; required. 
          - `courses[].choices[].dietary[]` — string; optional. 
        - `courses[].choices[].supplementAddOnId` — string or null; required. The add-on charged for each guest who picks it (its price and stock per location: list_add_ons)
- `offeredBy` — array; required. 
  - `offeredBy[]` — object; optional. 
    - `offeredBy[].productId` — string; required. 
    - `offeredBy[].locationId` — string or null; required. Null: at every location it's offered

### create_menu

Create a menu: its courses in order, each with its choices (allergens and dietary tags as listed values, an optional supplement add-on charged for each guest who picks it (made with create_add_on, priced at each location with set_add_on_price), and at most one default, which fills the seats the organizer leaves unchosen). Offer it on a product with set_product_menu. Returns a preview to confirm.

Changes · Members of an organization · Needs products:write

#### Input

- `name` — string; required.  minLength: 1; maxLength: 100
- `description` — string; optional.  maxLength: 2000
- `courses` — array; required.  minItems: 1; maxItems: 12
  - `courses[]` — object; optional. 
    - `courses[].name` — string; required.  minLength: 1; maxLength: 100
    - `courses[].choices` — array; required.  minItems: 1; maxItems: 30
      - `courses[].choices[]` — object; optional. 
        - `courses[].choices[].name` — string; required.  minLength: 1; maxLength: 100
        - `courses[].choices[].description` — string; optional.  maxLength: 1000
        - `courses[].choices[].allergens` — array; optional. Canada's priority allergens it contains: peanut, tree_nut, sesame, milk, egg, fish, crustacean, mollusc, soy, wheat, gluten, mustard, sulphite maxItems: 20; default: \[\]
          - `courses[].choices[].allergens[]` — string; optional.  Allowed: "peanut", "tree\_nut", "sesame", "milk", "egg", "fish", "crustacean", "mollusc", "soy", "wheat", "gluten", "mustard", "sulphite"
        - `courses[].choices[].dietary` — array; optional. What it suits: vegetarian, vegan, pescatarian, gluten_free, dairy_free, nut_free, halal, kosher maxItems: 10; default: \[\]
          - `courses[].choices[].dietary[]` — string; optional.  Allowed: "vegetarian", "vegan", "pescatarian", "gluten\_free", "dairy\_free", "nut\_free", "halal", "kosher"
        - `courses[].choices[].supplementAddOnId` — string; optional. An add-on charged for each guest who picks this choice (e.g. a $15 upgraded main)
        - `courses[].choices[].default` — boolean; optional. Fills the seats the organizer leaves unchosen (at most one per course; never one with a supplement) default: false

#### Output

- `id` — string; required. 
- `name` — string; required. 
- `description` — string or null; required. 
- `status` — string; required.  Allowed: "active", "archived"
- `courses` — array; required. 
  - `courses[]` — object; optional. 
    - `courses[].id` — string; required. 
    - `courses[].name` — string; required. 
    - `courses[].position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `courses[].choices` — array; required. 
      - `courses[].choices[]` — object; optional. 
        - `courses[].choices[].id` — string; required. 
        - `courses[].choices[].name` — string; required. 
        - `courses[].choices[].description` — string or null; required. 
        - `courses[].choices[].position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
        - `courses[].choices[].status` — string; required.  Allowed: "active", "archived"
        - `courses[].choices[].default` — boolean; required. Fills the seats the organizer leaves unchosen in this course
        - `courses[].choices[].allergens` — array; required. 
          - `courses[].choices[].allergens[]` — string; optional. 
        - `courses[].choices[].dietary` — array; required. 
          - `courses[].choices[].dietary[]` — string; optional. 
        - `courses[].choices[].supplementAddOnId` — string or null; required. The add-on charged for each guest who picks it (its price and stock per location: list_add_ons)
- `offeredBy` — array; required. 
  - `offeredBy[]` — object; optional. 
    - `offeredBy[].productId` — string; required. 
    - `offeredBy[].locationId` — string or null; required. Null: at every location it's offered

### get_kitchen_counts

Get the kitchen's counts for sessions: for each course, how many of each choice the confirmed bookings have (and how many the default filled), the allergens on those plates, and when the counts stop changing. For one session, or a location's sessions over a few days. For the run sheet and the kitchen sheet. For who is coming (names, allergies, check-ins) use get_run_sheet.

Reads · Members of an organization · Needs kitchen:read

#### Input

- `sessionId` — string; optional. The session's id, from list_sessions
- `locationId` — string; optional. The location's id, from get_setup
- `from` — string; optional. A local date; today at each location by default format: "date"
- `days` — integer; optional.  minimum: 1; maximum: 7; default: 1

#### Output

- `sessions` — array; required. 
  - `sessions[]` — object; optional. 
    - `sessions[].sessionId` — string; required. 
    - `sessions[].productId` — string; required. 
    - `sessions[].productName` — string; required. 
    - `sessions[].locationId` — string; required. 
    - `sessions[].startsAt` — string; required.  format: "date-time"
    - `sessions[].localStart` — string; required. At the location, YYYY-MM-DDTHH:MM
    - `sessions[].menuCutoffAt` — string; required. When the counts stop changing (the menuCutoffMinutesBefore setting). The kitchen sheet goes out then, or two hours before the session if that is earlier; changes after it go as updates format: "date-time"
    - `sessions[].guests` — integer; required. Seats in its confirmed bookings minimum: -9007199254740991; maximum: 9007199254740991
    - `sessions[].courses` — array; required. 
      - `sessions[].courses[]` — object; optional. 
        - `sessions[].courses[].courseId` — string; required. 
        - `sessions[].courses[].name` — string; required. 
        - `sessions[].courses[].choices` — array; required. 
          - `sessions[].courses[].choices[]` — object; optional. 
            - `sessions[].courses[].choices[].choiceId` — string or null; required. Null: seats nobody chose for (no default)
            - `sessions[].courses[].choices[].name` — string or null; required. 
            - `sessions[].courses[].choices[].quantity` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
            - `sessions[].courses[].choices[].defaulted` — integer; required. Of these, the seats the course's default filled minimum: -9007199254740991; maximum: 9007199254740991
            - `sessions[].courses[].choices[].allergens` — array; required. 
              - `sessions[].courses[].choices[].allergens[]` — string; optional. 
            - `sessions[].courses[].choices[].dietary` — array; required. 
              - `sessions[].courses[].choices[].dietary[]` — string; optional. 
    - `sessions[].allergens` — array; required. Plates containing each allergen, from the choices' allergens. Guests' own are in `notes`
      - `sessions[].allergens[]` — object; optional. 
        - `sessions[].allergens[].allergen` — string; required. 
        - `sessions[].allergens[].plates` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `sessions[].notes` — array; required. The answers to the booking questions marked for the kitchen (allergies, dietary needs), by booking
      - `sessions[].notes[]` — object; optional. 
        - `sessions[].notes[].code` — string; required. The booking code
        - `sessions[].notes[].question` — string; required. 
        - `sessions[].notes[].participant` — integer or null; required. Which guest; null for the booking minimum: -9007199254740991; maximum: 9007199254740991
        - `sessions[].notes[].answer` — one of: string, number, boolean, array; required. 
          - `sessions[].notes[].answer — array option 4` — array; optional. 
            - `sessions[].notes[].answer — array option 4[]` — string; optional. 
        - `sessions[].notes[].pastParty` — boolean; optional. This guest's seat was taken off the booking after it was answered (no guest has this number now): they may still be coming. Always present
        - `sessions[].notes[].warning` — string or null; optional. What to tell the kitchen about a pastParty note, in plain words; null otherwise. Always present

### list_menus

List the organization's menus: courses and choices (allergens, dietary tags, supplement, default), and the products offering each.

Reads · Members of an organization · Needs products:read

#### Input

- `status` — string; optional.  Allowed: "active", "archived"

#### Output

- `menus` — array; required. 
  - `menus[]` — object; optional. 
    - `menus[].id` — string; required. 
    - `menus[].name` — string; required. 
    - `menus[].description` — string or null; required. 
    - `menus[].status` — string; required.  Allowed: "active", "archived"
    - `menus[].courses` — array; required. 
      - `menus[].courses[]` — object; optional. 
        - `menus[].courses[].id` — string; required. 
        - `menus[].courses[].name` — string; required. 
        - `menus[].courses[].position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
        - `menus[].courses[].choices` — array; required. 
          - `menus[].courses[].choices[]` — object; optional. 
            - `menus[].courses[].choices[].id` — string; required. 
            - `menus[].courses[].choices[].name` — string; required. 
            - `menus[].courses[].choices[].description` — string or null; required. 
            - `menus[].courses[].choices[].position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
            - `menus[].courses[].choices[].status` — string; required.  Allowed: "active", "archived"
            - `menus[].courses[].choices[].default` — boolean; required. Fills the seats the organizer leaves unchosen in this course
            - `menus[].courses[].choices[].allergens` — array; required. 
              - `menus[].courses[].choices[].allergens[]` — string; optional. 
            - `menus[].courses[].choices[].dietary` — array; required. 
              - `menus[].courses[].choices[].dietary[]` — string; optional. 
            - `menus[].courses[].choices[].supplementAddOnId` — string or null; required. The add-on charged for each guest who picks it (its price and stock per location: list_add_ons)
    - `menus[].offeredBy` — array; required. 
      - `menus[].offeredBy[]` — object; optional. 
        - `menus[].offeredBy[].productId` — string; required. 
        - `menus[].offeredBy[].locationId` — string or null; required. Null: at every location it's offered

### set_product_menu

Offer a menu on a product, everywhere or at one location (which wins there), or stop offering one (menuId null). An archived menu is made active again with update_menu first. Guests' organizers then give the party's counts at checkout. Holds placed earlier keep their counts. Returns a preview to confirm.

Changes · Members of an organization · Needs products:write

#### Input

- `productId` — string; required. The product's id, from list_products
- `locationId` — string; optional. Offer it only at this location (it wins there over the product's own); left out: everywhere
- `menuId` — string or null; required. The menu; null to stop offering one (there, or everywhere)

#### Output

- `productId` — string; required. 
- `locationId` — string or null; required. 
- `menuId` — string or null; required. 

### update_menu

Rename a menu, change its description, or archive it (an archived menu isn't offered; holds and bookings keep their counts). Returns a preview to confirm.

Changes · Members of an organization · Needs products:write

#### Input

- `menuId` — string; required. The menu's id, from list_menus
- `name` — string; optional.  minLength: 1; maxLength: 100
- `description` — string or null; optional.  maxLength: 2000
- `status` — string; optional.  Allowed: "active", "archived"

#### Output

- `id` — string; required. 
- `name` — string; required. 
- `description` — string or null; required. 
- `status` — string; required.  Allowed: "active", "archived"
- `courses` — array; required. 
  - `courses[]` — object; optional. 
    - `courses[].id` — string; required. 
    - `courses[].name` — string; required. 
    - `courses[].position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `courses[].choices` — array; required. 
      - `courses[].choices[]` — object; optional. 
        - `courses[].choices[].id` — string; required. 
        - `courses[].choices[].name` — string; required. 
        - `courses[].choices[].description` — string or null; required. 
        - `courses[].choices[].position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
        - `courses[].choices[].status` — string; required.  Allowed: "active", "archived"
        - `courses[].choices[].default` — boolean; required. Fills the seats the organizer leaves unchosen in this course
        - `courses[].choices[].allergens` — array; required. 
          - `courses[].choices[].allergens[]` — string; optional. 
        - `courses[].choices[].dietary` — array; required. 
          - `courses[].choices[].dietary[]` — string; optional. 
        - `courses[].choices[].supplementAddOnId` — string or null; required. The add-on charged for each guest who picks it (its price and stock per location: list_add_ons)
- `offeredBy` — array; required. 
  - `offeredBy[]` — object; optional. 
    - `offeredBy[].productId` — string; required. 
    - `offeredBy[].locationId` — string or null; required. Null: at every location it's offered

### update_menu_choice

Change a menu choice: its name, description, allergens, dietary tags, supplement add-on, whether it's its course's default, or archive it. Holds and bookings keep the counts they have. Returns a preview to confirm.

Changes · Members of an organization · Needs products:write

#### Input

- `choiceId` — string; required. The menu choice's id, from list_menus
- `name` — string; optional.  minLength: 1; maxLength: 100
- `description` — string or null; optional.  maxLength: 1000
- `allergens` — array; optional. Canada's priority allergens it contains: peanut, tree_nut, sesame, milk, egg, fish, crustacean, mollusc, soy, wheat, gluten, mustard, sulphite maxItems: 20
  - `allergens[]` — string; optional.  Allowed: "peanut", "tree\_nut", "sesame", "milk", "egg", "fish", "crustacean", "mollusc", "soy", "wheat", "gluten", "mustard", "sulphite"
- `dietary` — array; optional. What it suits: vegetarian, vegan, pescatarian, gluten_free, dairy_free, nut_free, halal, kosher maxItems: 10
  - `dietary[]` — string; optional.  Allowed: "vegetarian", "vegan", "pescatarian", "gluten\_free", "dairy\_free", "nut\_free", "halal", "kosher"
- `supplementAddOnId` — string or null; optional. An add-on charged for each guest who picks it; null for none
- `default` — boolean; optional. Make it its course's default (the course's current default stops being one) Value: true
- `status` — string; optional. archived: no longer offered (holds and bookings keep it). A course's default can't be archived Allowed: "active", "archived"

#### Output

- `id` — string; required. 
- `name` — string; required. 
- `description` — string or null; required. 
- `status` — string; required.  Allowed: "active", "archived"
- `courses` — array; required. 
  - `courses[]` — object; optional. 
    - `courses[].id` — string; required. 
    - `courses[].name` — string; required. 
    - `courses[].position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `courses[].choices` — array; required. 
      - `courses[].choices[]` — object; optional. 
        - `courses[].choices[].id` — string; required. 
        - `courses[].choices[].name` — string; required. 
        - `courses[].choices[].description` — string or null; required. 
        - `courses[].choices[].position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
        - `courses[].choices[].status` — string; required.  Allowed: "active", "archived"
        - `courses[].choices[].default` — boolean; required. Fills the seats the organizer leaves unchosen in this course
        - `courses[].choices[].allergens` — array; required. 
          - `courses[].choices[].allergens[]` — string; optional. 
        - `courses[].choices[].dietary` — array; required. 
          - `courses[].choices[].dietary[]` — string; optional. 
        - `courses[].choices[].supplementAddOnId` — string or null; required. The add-on charged for each guest who picks it (its price and stock per location: list_add_ons)
- `offeredBy` — array; required. 
  - `offeredBy[]` — object; optional. 
    - `offeredBy[].productId` — string; required. 
    - `offeredBy[].locationId` — string or null; required. Null: at every location it's offered
