Sessions tools
All tool areas. Each tool acts within your access.
Sessions
create_block
Block time at a location: a closure (the whole location), one resource, or one product. Times are local; a date to includes that whole day. New sessions are never generated inside a block. A closure takes every session at the location inside its time off sale, and a product block that product's sessions there: guests and staff can't hold or book them, while the bookings and checkouts already there stay (move or cancel those sessions with move_session or cancel_session, which message the guests). A resource block leaves the sessions already holding the resource on sale. The preview names the sessions and their bookings. Returns a preview to confirm.
Changes · Members of an organization · Needs sessions:write
Input
locationIdThe location's id, from get_setup
kindclosure: the whole location is closed. resource: one resource is unavailable. product: one product isn't offered.
resourceIdFor a resource block
productIdFor a product block
fromLocal start: YYYY-MM-DD (from the start of that day) or YYYY-MM-DDTHH:MM
toLocal end: YYYY-MM-DD (through the end of that day) or YYYY-MM-DDTHH:MM
note
Output
blockblock.idblock.locationIdblock.timeZoneblock.kindblock.resourceIdblock.productIdblock.startsAtblock.endsAtblock.localFromblock.localToblock.notesessionsInsideScheduled sessions inside the block (for a resource block, those holding the resource then)
sessionsInside[]sessionsOffSaleThe sessions it took off sale, with the bookings still on them; empty for a resource block
sessionsOffSale[]sessionsOffSale[].sessionIdsessionsOffSale[].localStartsessionsOffSale[].bookingsConfirmed bookings, still booked
sessionsOffSale[].seatsBookedsessionsOffSale[].seatsHeldIn checkouts not yet paid
create_schedule
Add a schedule for a product at a location: weekly start times (ISO weekdays, 1 is Monday) and/or one-off dates, from startsOn to an optional endsOn. Applying it generates its sessions right away, as far ahead as bookings open; the daily job keeps adding days. The preview says how many sessions it will create. Returns a preview to confirm.
Changes · Members of an organization · Needs sessions:write
Input
productIdThe product's id, from list_products
locationIdThe location's id, from get_setup
namestartsOnFirst local date; today at the location by default
endsOnLast local date, inclusive; runs until changed if left out
timestimes[]times[] — object option 1times[] — object option 1.weekdaysISO weekdays: 1 is Monday, 7 is Sunday
times[] — object option 1.weekdays[]times[] — object option 1.startTimeA local start time at the location, HH:MM, 24-hour
times[] — object option 1.durationMinutesDefaults to the product's duration
times[] — object option 2times[] — object option 2.onDateA one-off time on this date
times[] — object option 2.startTimeA local start time at the location, HH:MM, 24-hour
times[] — object option 2.durationMinutes
Output
scheduleschedule.idschedule.productIdschedule.locationIdschedule.timeZoneschedule.nameschedule.startsOnschedule.endsOnschedule.descriptionschedule.timesschedule.times[]schedule.times[].weekdaysschedule.times[].weekdays[]schedule.times[].weekdayNamesschedule.times[].weekdayNames[]schedule.times[].onDateschedule.times[].startTimeschedule.times[].durationMinutesschedule.pricesThe schedule's own prices (set_schedule_price), where its sessions' ticket prices start in place of the location's; shown with pricing:read at its location
schedule.prices[]schedule.prices[].ticketTypeIdschedule.prices[].amountPer seat, or a group option's base charge, in minor units of the location's currency
schedule.prices[].perPersonAmountA group option's rate per person above its included seats; null for an individual ticket type, or nobody above them
sessionsCreatedskippedskipped[]skipped[].startsAtskipped[].reason
create_session
Create one session of a product at a location outside any schedule: a one-off date, or one only staff can book (settings { "visibility": "staff" }). For a party's own private session, with its price and booking link, use create_private_session. The date and time are local to the location. 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.
Changes · Members of an organization · Needs sessions:write
Input
productIdThe product's id, from list_products
locationIdThe location's id, from get_setup
dateA local date at the location, YYYY-MM-DD
startTimeA local start time at the location, HH:MM, 24-hour
durationMinutesDefaults to the product's duration
settingsSettings for this session only, e.g. { "visibility": "staff" } for one only staff can book, or { "capacity": 40 }
settings.*
Output
idproductIdproductNamehasMenuWhether 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.
locationIdtimeZonescheduleIdNull for a session created outside a schedule
statusstartsAtendsAtlocalStartcapacityseatsHeldIn checkouts not yet paid
seatsBookedcheckedInGuests checked in on its confirmed bookings, for the calendar and the run sheet. Always present
wholeSessionHeld or booked whole by a group option (a private booking): no seats left for anyone else, staff included
privateA private session's terms and booking link; null for a session on sale to everyone
private.nameWhose it is
private.pricingprivate.amountMinor units, before fees and tax: for the party (flat) or a person (per_person). Null without pricing:read
private.partySizeMaxThe largest party; null: the session's capacity
private.tokenThe 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
blockThe closure or product block it's inside, which takes it off sale (its bookings stay); null when none. Always present in list_sessions
block.idblock.kindblock.notesettingsOverrides set on this session
settings.*
delete_block
Remove a block or closure, so its time is free again: the sessions it took off sale go back on sale (the preview names them). Sessions aren't created by this; the nightly top-up fills the time from the schedules, or run generate_sessions afterwards. Returns a preview to confirm.
Changes · Members of an organization · Needs sessions:write
Input
blockIdThe block's id, from list_blocks
Output
iddeletedsessionsBackOnSaleThe sessions it had taken off sale, on sale again
sessionsBackOnSale[]
generate_sessions
Create the sessions of one schedule, or of every running schedule, as far ahead as bookings open. Sessions that exist are left alone, so it's safe to run any time; times inside a block or with a busy resource are skipped and reported. A daily job does this automatically; use it after changing a booking window or removing a block. The preview counts what would be created. Returns a preview to confirm.
Changes · Members of an organization · Needs sessions:write
Input
scheduleIdOne schedule; every running schedule if left out
Output
schedulesschedules[]schedules[].scheduleIdschedules[].sessionsCreatedschedules[].sessionsReinstatedCanceled by a schedule change, and back on at times the schedule has again
schedules[].skippedschedules[].skipped[]schedules[].skipped[].startsAtschedules[].skipped[].reason
get_session
Get one session's staff view, as in list_sessions, with its current per-person ticket prices for a party of one and whether each is the session's own price. Prices include fees, and tax when pricesIncludeTax; null without pricing:read. Group options and unpriced ticket types are omitted.
Reads · Members of an organization · Needs sessions:read
Input
sessionIdThe session's id, from list_sessions
Output
sessionsession.idsession.productIdsession.productNamesession.hasMenuWhether 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.
session.locationIdsession.timeZonesession.scheduleIdNull for a session created outside a schedule
session.statussession.startsAtsession.endsAtsession.localStartsession.capacitysession.seatsHeldIn checkouts not yet paid
session.seatsBookedsession.checkedInGuests checked in on its confirmed bookings, for the calendar and the run sheet. Always present
session.wholeSessionHeld or booked whole by a group option (a private booking): no seats left for anyone else, staff included
session.privateA private session's terms and booking link; null for a session on sale to everyone
session.private.nameWhose it is
session.private.pricingsession.private.amountMinor units, before fees and tax: for the party (flat) or a person (per_person). Null without pricing:read
session.private.partySizeMaxThe largest party; null: the session's capacity
session.private.tokenThe 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
session.blockThe closure or product block it's inside, which takes it off sale (its bookings stay); null when none. Always present in list_sessions
session.block.idsession.block.kindsession.block.notesession.settingsOverrides set on this session
session.settings.*session.locationNamesession.pricessession.prices[]session.prices[].ticketTypeIdsession.prices[].namesession.prices[].amountMinor units (cents) in the location's currency
session.prices[].currencysession.prices[].ownPrice
list_blocks
List blocks and closures (time when a location is closed, a resource is unavailable, or a product isn't offered) that end after from, optionally at one location. New sessions are never generated inside them, and a closure or product block takes the sessions already inside it off sale (list_sessions marks them with block).
Reads · Members of an organization · Needs sessions:read
Input
locationIdThe location's id, from get_setup
fromBlocks ending after this local date's start; today by default
daysHow many local days from
from(default 90)
Output
blocksblocks[]blocks[].idblocks[].locationIdblocks[].timeZoneblocks[].kindblocks[].resourceIdblocks[].productIdblocks[].startsAtblocks[].endsAtblocks[].localFromblocks[].localToblocks[].note
list_schedules
List schedules (the weekly or one-off start times that generate sessions), optionally for one product or location, with their times in words ("Thursday to Sunday at 19:00") and as data, and their own prices (set_schedule_price) for those who can read prices.
Reads · Members of an organization · Needs sessions:read
Input
productIdThe product's id, from list_products
locationIdThe location's id, from get_setup
Output
schedulesschedules[]schedules[].idschedules[].productIdschedules[].locationIdschedules[].timeZoneschedules[].nameschedules[].startsOnschedules[].endsOnschedules[].descriptionschedules[].timesschedules[].times[]schedules[].times[].weekdaysschedules[].times[].weekdays[]schedules[].times[].weekdayNamesschedules[].times[].weekdayNames[]schedules[].times[].onDateschedules[].times[].startTimeschedules[].times[].durationMinutesschedules[].pricesThe schedule's own prices (set_schedule_price), where its sessions' ticket prices start in place of the location's; shown with pricing:read at its location
schedules[].prices[]schedules[].prices[].ticketTypeIdschedules[].prices[].amountPer seat, or a group option's base charge, in minor units of the location's currency
schedules[].prices[].perPersonAmountA group option's rate per person above its included seats; null for an individual ticket type, or nobody above them
list_sessions
List sessions over a range of local dates (each location's own dates), soonest first: their times, status, schedule, capacity, seats held and booked, guests checked in, and settings set on the session. The staff view: includes unlisted, staff-only, and cancelled sessions, unlike list_availability. Use it for 'how many covers Saturday?' (seats booked and left); get_run_sheet has who is coming.
Reads · Members of an organization · Needs sessions:read
Input
fromFirst local date; today by default
daysHow many local days from
from(default 7)productIdThe product's id, from list_products
locationIdThe location's id, from get_setup
statusOnly sessions in this state; both when left out
Output
sessionssessions[]sessions[].idsessions[].productIdsessions[].productNamesessions[].hasMenuWhether 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.
sessions[].locationIdsessions[].timeZonesessions[].scheduleIdNull for a session created outside a schedule
sessions[].statussessions[].startsAtsessions[].endsAtsessions[].localStartsessions[].capacitysessions[].seatsHeldIn checkouts not yet paid
sessions[].seatsBookedsessions[].checkedInGuests checked in on its confirmed bookings, for the calendar and the run sheet. Always present
sessions[].wholeSessionHeld or booked whole by a group option (a private booking): no seats left for anyone else, staff included
sessions[].privateA private session's terms and booking link; null for a session on sale to everyone
sessions[].private.nameWhose it is
sessions[].private.pricingsessions[].private.amountMinor units, before fees and tax: for the party (flat) or a person (per_person). Null without pricing:read
sessions[].private.partySizeMaxThe largest party; null: the session's capacity
sessions[].private.tokenThe 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
sessions[].blockThe closure or product block it's inside, which takes it off sale (its bookings stay); null when none. Always present in list_sessions
sessions[].block.idsessions[].block.kindsessions[].block.notesessions[].settingsOverrides set on this session
sessions[].settings.*sessions[].locationNamelocationsThe locations you read sessions at, with only their id, name, and time zone: all the calendar needs to show times where they happen, for a role (a Host, a Venue partner) that can't read the setup. Not the sessions' own, so a quiet week still lists them
locations[]locations[].idlocations[].namelocations[].timeZoneThe IANA time zone sessions there run in
update_block
Change a block's or closure's times (local; a date to includes that whole day) or note. Its kind and target stay; delete it and create another to change those. The preview names the sessions the new times take off sale (with their bookings, which stay) and those going back on sale. Returns a preview to confirm.
Changes · Members of an organization · Needs sessions:write
Input
blockIdThe block's id, from list_blocks
fromLocal start: YYYY-MM-DD (from the start of that day) or YYYY-MM-DDTHH:MM
toLocal end: YYYY-MM-DD (through the end of that day) or YYYY-MM-DDTHH:MM
note
Output
blockblock.idblock.locationIdblock.timeZoneblock.kindblock.resourceIdblock.productIdblock.startsAtblock.endsAtblock.localFromblock.localToblock.notesessionsInsidesessionsInside[]sessionsOffSaleThe sessions off sale at its new times, with the bookings still on them; empty for a resource block
sessionsOffSale[]sessionsOffSale[].sessionIdsessionsOffSale[].localStartsessionsOffSale[].bookingsConfirmed bookings, still booked
sessionsOffSale[].seatsBookedsessionsOffSale[].seatsHeldIn checkouts not yet paid
update_schedule
Change a schedule's name, end date, or times (times replace all of them). Its future sessions follow: sessions at times it no longer has are cancelled, sessions whose length changed are retimed, and new times are generated. Sessions with holds are left as they are and named in the preview. Returns a preview to confirm.
Changes · Members of an organization · Needs sessions:write
Input
scheduleIdThe schedule's id, from list_schedules
nameendsOnLast local date, inclusive; null to run until changed
timesReplaces all of the schedule's times
times[]times[] — object option 1times[] — object option 1.weekdaysISO weekdays: 1 is Monday, 7 is Sunday
times[] — object option 1.weekdays[]times[] — object option 1.startTimeA local start time at the location, HH:MM, 24-hour
times[] — object option 1.durationMinutesDefaults to the product's duration
times[] — object option 2times[] — object option 2.onDateA one-off time on this date
times[] — object option 2.startTimeA local start time at the location, HH:MM, 24-hour
times[] — object option 2.durationMinutes
Output
scheduleschedule.idschedule.productIdschedule.locationIdschedule.timeZoneschedule.nameschedule.startsOnschedule.endsOnschedule.descriptionschedule.timesschedule.times[]schedule.times[].weekdaysschedule.times[].weekdays[]schedule.times[].weekdayNamesschedule.times[].weekdayNames[]schedule.times[].onDateschedule.times[].startTimeschedule.times[].durationMinutesschedule.pricesThe schedule's own prices (set_schedule_price), where its sessions' ticket prices start in place of the location's; shown with pricing:read at its location
schedule.prices[]schedule.prices[].ticketTypeIdschedule.prices[].amountPer seat, or a group option's base charge, in minor units of the location's currency
schedule.prices[].perPersonAmountA group option's rate per person above its included seats; null for an individual ticket type, or nobody above them
sessionsCanceledsessionsRetimedsessionsCreatedsessionsReinstatedCanceled by an earlier change, and back on at their times
sessionsKeptNo longer match the schedule but have holds or bookings, so they stay until nothing holds them; the daily top-up then cancels or retimes them
sessionsKept[]sessionsKept[].idsessionsKept[].startsAtskippedskipped[]skipped[].startsAtskipped[].reason