# Add-ons tools

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

## Add-ons

### create_add_on

Create an add-on: an extra sold with other products, such as merchandise (a tote bag), a drink pairing, or the contents of a package (the VIP package). Counted per person or per booking, with optional quantity limits, taxed by its own tax class, and priced (minor units, before fees and tax) with optional stock at each location. Then offer it on a product (set_product_add_on) or include it in a ticket type's price (set_ticket_type_add_on). 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
- `per` — string; optional. person: up to one each for the party (times maxPerPerson), e.g. a drink pairing; booking: any number for the booking, e.g. a tote bag Allowed: "person", "booking"; default: "booking"
- `taxClass` — string; optional. A tax class code (see get_setup) default: "standard"
- `maxPerBooking` — integer or null; optional. The most one booking can have; null: no limit minimum: 1; maximum: 10000; default: null
- `maxPerPerson` — integer or null; optional. The most for each person in the party; null: no limit (1 for a per-person add-on) minimum: 1; maximum: 10000; default: null
- `status` — string; optional.  Allowed: "draft", "active"; default: "active"
- `locations` — array; optional. Where it's sold, at what price, with what stock. Leave out for an add-on only a package includes maxItems: 50; default: \[\]
  - `locations[]` — object; optional. 
    - `locations[].locationId` — string; required. The location's id, from get_setup
    - `locations[].price` — integer; required. Per unit, minor units of the location's currency, before fees and tax minimum: 0
    - `locations[].inventory` — integer or null; optional. Units in stock at the location, counting those already sold (holds and bookings reserve them); null: unlimited minimum: 0; maximum: 1000000; default: null

#### Output

- `id` — string; required. The add-on (a product, prd_…)
- `name` — string; required. 
- `description` — string or null; required. 
- `status` — string; required.  Allowed: "draft", "active", "archived"
- `taxClass` — string; required. 
- `per` — string; required. person: up to one each for the party (times maxPerPerson), e.g. a drink pairing; booking: any number for the booking, e.g. a tote bag Allowed: "person", "booking"
- `maxPerBooking` — integer or null; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `maxPerPerson` — integer or null; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `locations` — array; required. 
  - `locations[]` — object; optional. 
    - `locations[].locationId` — string; required. 
    - `locations[].name` — string; required. 
    - `locations[].currency` — string; required. 
    - `locations[].amount` — integer or null; required. Per unit, before fees and tax. Null without pricing:read
    - `locations[].inventory` — integer or null; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `locations[].left` — integer or null; required. Stock not yet reserved by holds or sold; null: unlimited minimum: -9007199254740991; maximum: 9007199254740991
- `offeredBy` — array; required. 
  - `offeredBy[]` — object; optional. 
    - `offeredBy[].productId` — string; required. 
    - `offeredBy[].name` — string; required. 
    - `offeredBy[].placement` — string; required.  Allowed: "off", "checkout", "manage\_link", "both"
    - `offeredBy[].position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `includedIn` — array; required. 
  - `includedIn[]` — object; optional. 
    - `includedIn[].ticketTypeId` — string; required. 
    - `includedIn[].productId` — string; required. 
    - `includedIn[].name` — string; required. 
    - `includedIn[].quantity` — integer; required. For each seat minimum: -9007199254740991; maximum: 9007199254740991

### list_add_ons

List the organization's add-ons (extras sold with other products: merchandise, drink pairings, packages' contents): their terms, price and stock left at each location, the products offering them, and the ticket types including them.

Reads · Members of an organization · Needs products:read

#### Input

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

#### Output

- `addOns` — array; required. 
  - `addOns[]` — object; optional. 
    - `addOns[].id` — string; required. The add-on (a product, prd_…)
    - `addOns[].name` — string; required. 
    - `addOns[].description` — string or null; required. 
    - `addOns[].status` — string; required.  Allowed: "draft", "active", "archived"
    - `addOns[].taxClass` — string; required. 
    - `addOns[].per` — string; required. person: up to one each for the party (times maxPerPerson), e.g. a drink pairing; booking: any number for the booking, e.g. a tote bag Allowed: "person", "booking"
    - `addOns[].maxPerBooking` — integer or null; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `addOns[].maxPerPerson` — integer or null; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `addOns[].locations` — array; required. 
      - `addOns[].locations[]` — object; optional. 
        - `addOns[].locations[].locationId` — string; required. 
        - `addOns[].locations[].name` — string; required. 
        - `addOns[].locations[].currency` — string; required. 
        - `addOns[].locations[].amount` — integer or null; required. Per unit, before fees and tax. Null without pricing:read
        - `addOns[].locations[].inventory` — integer or null; required.  minimum: -9007199254740991; maximum: 9007199254740991
        - `addOns[].locations[].left` — integer or null; required. Stock not yet reserved by holds or sold; null: unlimited minimum: -9007199254740991; maximum: 9007199254740991
    - `addOns[].offeredBy` — array; required. 
      - `addOns[].offeredBy[]` — object; optional. 
        - `addOns[].offeredBy[].productId` — string; required. 
        - `addOns[].offeredBy[].name` — string; required. 
        - `addOns[].offeredBy[].placement` — string; required.  Allowed: "off", "checkout", "manage\_link", "both"
        - `addOns[].offeredBy[].position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `addOns[].includedIn` — array; required. 
      - `addOns[].includedIn[]` — object; optional. 
        - `addOns[].includedIn[].ticketTypeId` — string; required. 
        - `addOns[].includedIn[].productId` — string; required. 
        - `addOns[].includedIn[].name` — string; required. 
        - `addOns[].includedIn[].quantity` — integer; required. For each seat minimum: -9007199254740991; maximum: 9007199254740991

### set_add_on_price

Set an add-on's price at a location (minor units, before fees and tax) and its stock there (`inventory`: units in stock counting those already sold, so add new units to it; null for unlimited), or stop selling it there (`remove: true`). Holds placed earlier keep their prices. Returns a preview to confirm.

Changes · Members of an organization · Needs pricing:write

#### Input

- `addOnId` — string; required. The product's id, from list_products
- `locationId` — string; required. The location's id, from get_setup
- `amount` — integer; optional. Per unit, minor units of the location's currency, before fees and tax. Needed the first time minimum: 0
- `inventory` — integer or null; optional. Units in stock at the location, counting those already sold (holds and bookings reserve them); null: unlimited minimum: 0; maximum: 1000000
- `remove` — boolean; optional. Stop selling it at this location Value: true

#### Output

- `addOnId` — string; required. 
- `locationId` — string; required. 
- `currency` — string; required. 
- `sold` — boolean; required. Whether it's sold at the location
- `amount` — integer or null; required. Minor units (cents) in the location's currency
- `inventory` — integer or null; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `left` — integer or null; required. Stock not yet reserved or sold; null: unlimited minimum: -9007199254740991; maximum: 9007199254740991

### set_product_add_on

Offer an add-on on a product (a tote bag with the dinner), choosing where guests can add it (`placement`: checkout, manage_link, both, or off for staff only) and its order (`position`; the booking page shows the first three inline, the rest under More options), or stop offering it (`remove: true`). Guests see it where the add-on has a price. Returns a preview to confirm.

Changes · Members of an organization · Needs products:write

#### Input

- `productId` — string; required. The product's id, from list_products
- `addOnId` — string; required. The product's id, from list_products
- `placement` — string; optional. Where guests can add it: checkout (the default for a new offer), manage_link (after booking, once the manage link sells extras), both, or off (staff only) Allowed: "off", "checkout", "manage\_link", "both"
- `position` — integer; optional. Its place among the product's add-ons; the booking page shows the first three inline minimum: 0; maximum: 1000
- `remove` — boolean; optional. Stop offering it on this product Value: true

#### Output

- `productId` — string; required. 
- `addOnId` — string; required. 
- `offered` — boolean; required. 
- `placement` — string or null; required.  Allowed: "off", "checkout", "manage\_link", "both"
- `position` — integer or null; required.  minimum: -9007199254740991; maximum: 9007199254740991

### set_ticket_type_add_on

Include an add-on in a ticket type's price, `quantity` for each seat (a package: VIP includes the VIP package), or stop including it (`remove: true`). Its price is in the ticket type's, so set that price to cover it; each seat booked still takes the add-on's stock. `sharePpm` is the part of that price that is the add-on, taxed by the add-on's own tax class (required when it isn't the product's: a wine pairing with dinner in BC). Holds placed earlier keep what they have. Returns a preview to confirm.

Changes · Members of an organization · Needs products:write

#### Input

- `ticketTypeId` — string; required. The ticket type's id, from get_product
- `addOnId` — string; required. The product's id, from list_products
- `quantity` — integer; optional. How many come with each seat (1 by default) minimum: 1; maximum: 100
- `sharePpm` — integer or null; optional. The part of the ticket type's price that is this add-on (all of its quantity per seat), in parts per million (25% is 250000): set it to the add-on's fair market value as a part of the ticket (what it would sell for on its own), so that part is taxed by the add-on's own tax class (a wine pairing's GST plus PST in BC) and the rest by the product's. Required when the add-on's tax class isn't the product's; null leaves it no part of its own (taxed with the ticket). The ticket type's shares add up to at most 1000000. Leave it out to keep the current share minimum: 0; maximum: 1000000
- `remove` — boolean; optional. Stop including it in the ticket type Value: true

#### Output

- `ticketTypeId` — string; required. 
- `addOnId` — string; required. 
- `included` — boolean; required. 
- `quantity` — integer or null; required. For each seat minimum: -9007199254740991; maximum: 9007199254740991
- `sharePpm` — integer or null; required. Its part of the ticket type's price in parts per million, taxed by its own tax class; null: none of its own, taxed with the ticket minimum: -9007199254740991; maximum: 9007199254740991

### update_add_on

Change an add-on: its name, description, status (archive to stop selling it), tax class, whether it's per person or per booking, and its quantity limits. Holds and bookings already made keep what they have. Returns a preview to confirm.

Changes · Members of an organization · Needs products:write

#### Input

- `addOnId` — string; required. The product's id, from list_products
- `name` — string; optional.  minLength: 1; maxLength: 100
- `description` — string or null; optional.  maxLength: 2000
- `status` — string; optional. active: sold where it's offered and priced. archived: no longer sold (packages that include it still come with it) Allowed: "draft", "active", "archived"
- `taxClass` — string; optional. 
- `per` — string; optional. person: up to one each for the party (times maxPerPerson), e.g. a drink pairing; booking: any number for the booking, e.g. a tote bag Allowed: "person", "booking"
- `maxPerBooking` — integer or null; optional. null: no limit minimum: 1; maximum: 10000
- `maxPerPerson` — integer or null; optional. null: no limit (1 for a per-person add-on) minimum: 1; maximum: 10000

#### Output

- `id` — string; required. The add-on (a product, prd_…)
- `name` — string; required. 
- `description` — string or null; required. 
- `status` — string; required.  Allowed: "draft", "active", "archived"
- `taxClass` — string; required. 
- `per` — string; required. person: up to one each for the party (times maxPerPerson), e.g. a drink pairing; booking: any number for the booking, e.g. a tote bag Allowed: "person", "booking"
- `maxPerBooking` — integer or null; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `maxPerPerson` — integer or null; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `locations` — array; required. 
  - `locations[]` — object; optional. 
    - `locations[].locationId` — string; required. 
    - `locations[].name` — string; required. 
    - `locations[].currency` — string; required. 
    - `locations[].amount` — integer or null; required. Per unit, before fees and tax. Null without pricing:read
    - `locations[].inventory` — integer or null; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `locations[].left` — integer or null; required. Stock not yet reserved by holds or sold; null: unlimited minimum: -9007199254740991; maximum: 9007199254740991
- `offeredBy` — array; required. 
  - `offeredBy[]` — object; optional. 
    - `offeredBy[].productId` — string; required. 
    - `offeredBy[].name` — string; required. 
    - `offeredBy[].placement` — string; required.  Allowed: "off", "checkout", "manage\_link", "both"
    - `offeredBy[].position` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `includedIn` — array; required. 
  - `includedIn[]` — object; optional. 
    - `includedIn[].ticketTypeId` — string; required. 
    - `includedIn[].productId` — string; required. 
    - `includedIn[].name` — string; required. 
    - `includedIn[].quantity` — integer; required. For each seat minimum: -9007199254740991; maximum: 9007199254740991
