Promo codes tools
All tool areas. Each tool acts within your access.
Promo codes
create_promo_code
Create a promo code guests type at checkout: an amount or percentage off the tickets, extras, or both; a set price per seat; or the service charge waived. For a comp, media, or partner code, give the reason, and it shows in get_comps_report. A comp defaults to one use when usageLimit is omitted; set a number for another limit, or null for no limit. A code for 100% off always needs a reason (invalid_input without one). Limit it to products, locations, when it can be used, the dates of the sessions it can be used on, and a total number of uses. One code per order. A manager's code is limited: its own locations, reason service_recovery or comp, one use, and expiring within 30 days. Returns a preview to confirm.
Changes · Members of an organization · Needs promos:write
Input
codeLetters, digits, and hyphens, 6 to 32; stored uppercase, and guests' typing matches any case. Left out, a random one of 10 characters is made. A comp, or a code that can reach 100% off (percent_off of 100%, or set_price 0), must be left out: it can't be typed
kindamount_off:
amountoff the order; percent_off:percentPpmoff; set_price: each individual seat comes down toamount(a line at or below it stays; group and private lines aren't eligible); waive_service_charge: every fee on the order is 0amountMinor units: amount_off's total off, or set_price's per seat
currencyWith
amount. The code applies only where the entity's currency is thispercentPpmpercent_off, in parts per million (15% is 150000)
appliesToWhat amount_off and percent_off discount: tickets, extras, or both (the default). set_price is always tickets and waive_service_charge always fees: any other value is refused
productIdsThe products it can be used on; empty means all
productIds[]The product's id, from list_products
locationIdsThe locations it can be used at; empty means all
locationIds[]The location's id, from get_setup
validFromWhen it can first be used
validUntilWhen it stops being usable
sessionFromThe first local date of a session it can be used on, at the session's location
sessionUntilThe last local date of a session it can be used on
usageLimitTotal number of uses. Omit for one use when reason is comp, otherwise no limit; null explicitly means no limit
reasonWhy: comp, partner, media, or service_recovery, shown in the comps report. Null: a plain promotion
Output
idcodeThe code, shown only to someone holding promos:write everywhere it applies. Otherwise masked: •••• and its last 4 characters
kindamountamount_off's and set_price's, in
currencycurrencypercentPpmpercent_off's, in parts per million (15% is 150000)
appliesToproductIdsproductIds[]locationIdslocationIds[]validFromvalidUntilsessionFromsessionUntilusageLimitusesUses so far: live holds, orders waiting for payment, and orders that were confirmed
reasonstatuscreatedBycreatedBy.memberIdcreatedBy.nameThe member's name, else their email
createdAt
get_comps_report
Get what promo codes and free stored value (promotional gift certificates, and goodwill and service recovery credits) took off bookings, by reason and by code or certificate, over a date range. Dates are local dates at the order's location: by default the date it was confirmed (basis: booked), so a comp shows in the period it was given, or with basis: session the date its session runs. Confirmed orders only: one canceled since gave nothing away. Different currencies are never added together: each total has its own. Amounts need orders:amounts (null without). A promo code's own text shows only with promos:write everywhere it applies, and is otherwise masked (•••• and its last 4 characters). Stored value codes are always masked. Only orders at places your grants cover.
Reads · Members of an organization · Needs promos:read
Input
fromFirst local date (of confirmation, or of the session)
toLast local date, up to 366 days after
frombasisbooked: the local date the order was confirmed (the default);session: the local date its session runslocationIdThe location's id, from get_setup
reason
Output
fromtobasiscanExportWhether the organization's plan includes CSV export (Growth and up): the screen offers the download only then. The rows are the same either way
columnsHow to read
ordersas a CSV, with reportCsv()columns[]columns[].keycolumns[].labelcolumns[].kindbyReasonbyReason[]byReason[].reasonbyReason[].currencybyReason[].ordersbyReason[].seatsbyReason[].discountThe total discount in this currency, before tax. Null unless you may see orders:amounts on every order in it
byCodebyCode[]byCode[].sourcebyCode[].instrumentIdbyCode[].promoCodeIdbyCode[].codeThe code, shown only to someone holding promos:write everywhere it applies. Otherwise masked: •••• and its last 4 characters
byCode[].kindbyCode[].reasonbyCode[].currencybyCode[].ordersbyCode[].seatsbyCode[].discountThe total discount in this currency, before tax. Null unless you may see orders:amounts on every order in it
ordersorders[]orders[].sourceorders[].instrumentIdorders[].orderIdorders[].bookingCodeorders[].confirmedOnThe local date it was confirmed, at its location
orders[].sessionOnThe local date its session runs, at its location
orders[].productorders[].product.idorders[].product.nameorders[].locationorders[].location.idorders[].location.nameorders[].codeThe code, shown only to someone holding promos:write everywhere it applies. Otherwise masked: •••• and its last 4 characters
orders[].kindorders[].reasonorders[].seatsorders[].currencyorders[].discountBefore tax. Null without orders:amounts
orders[].createdByWho created the code: the member's name, else their email
orders[].customerFirstName
list_promo_codes
List promo codes, newest first: each one's code, terms, limits, uses so far, status, and who made it. Filter by status and reason. With a grant at some locations, only codes limited to those locations show; a code for every location needs a grant across the organization. The code's own text shows only with promos:write everywhere it applies, and is otherwise masked (•••• and its last 4 characters). Page back with before.
Reads · Members of an organization · Needs promos:read
Input
statusreasonlimitThe most results to return (default 50)
beforeA promo code id; returns codes older than it
Output
promoCodespromoCodes[]promoCodes[].idpromoCodes[].codeThe code, shown only to someone holding promos:write everywhere it applies. Otherwise masked: •••• and its last 4 characters
promoCodes[].kindpromoCodes[].amountamount_off's and set_price's, in
currencypromoCodes[].currencypromoCodes[].percentPpmpercent_off's, in parts per million (15% is 150000)
promoCodes[].appliesTopromoCodes[].productIdspromoCodes[].productIds[]promoCodes[].locationIdspromoCodes[].locationIds[]promoCodes[].validFrompromoCodes[].validUntilpromoCodes[].sessionFrompromoCodes[].sessionUntilpromoCodes[].usageLimitpromoCodes[].usesUses so far: live holds, orders waiting for payment, and orders that were confirmed
promoCodes[].reasonpromoCodes[].statuspromoCodes[].createdBypromoCodes[].createdBy.memberIdpromoCodes[].createdBy.nameThe member's name, else their email
promoCodes[].createdAtnextBefore
update_promo_code
Change a promo code: its limits, reason, or status (archive to stop guests using it; a used code is archived, never deleted). Holds and orders already made keep the terms they locked. A used code's kind and amount can't change (conflict): archive it and make another. A typed code can't become a comp or reach 100% off, and no code's text ever changes. A change that leaves a code at 100% off needs it to have a reason. A manager can only archive a code within a manager's limits (status: archived, nothing else), and makes a new one for any other change. Returns a preview to confirm.
Changes · Members of an organization · Needs promos:write
Input
promoCodeIdThe promo code's id, from list_promo_codes
kindamount_off:
amountoff the order; percent_off:percentPpmoff; set_price: each individual seat comes down toamount(a line at or below it stays; group and private lines aren't eligible); waive_service_charge: every fee on the order is 0amountMinor units (cents) in the location's currency
currencypercentPpmappliesToWhat amount_off and percent_off discount: tickets, extras, or both (the default). set_price is always tickets and waive_service_charge always fees: any other value is refused
productIdsThe products it can be used on; empty means all
productIds[]The product's id, from list_products
locationIdsThe locations it can be used at; empty means all
locationIds[]The location's id, from get_setup
validFromWhen it can first be used
validUntilWhen it stops being usable
sessionFromThe first local date of a session it can be used on, at the session's location
sessionUntilThe last local date of a session it can be used on
usageLimitHow many times it can be used in all: a live hold counts, and gives the use back if released or run out; a confirmed order counts even if it's canceled later. Null: no limit
reasonWhy: comp, partner, media, or service_recovery, shown in the comps report. Null: a plain promotion
statusarchived: guests can't use it any more. Holds and orders keep it
Output
idcodeThe code, shown only to someone holding promos:write everywhere it applies. Otherwise masked: •••• and its last 4 characters
kindamountamount_off's and set_price's, in
currencycurrencypercentPpmpercent_off's, in parts per million (15% is 150000)
appliesToproductIdsproductIds[]locationIdslocationIds[]validFromvalidUntilsessionFromsessionUntilusageLimitusesUses so far: live holds, orders waiting for payment, and orders that were confirmed
reasonstatuscreatedBycreatedBy.memberIdcreatedBy.nameThe member's name, else their email
createdAt