Skip to content

Firehose and Booking

Not every ScheduledSession or Slot in Firehose can be booked through imin. Every item carries imin:isPotentiallyBookable flags, in the same places for sessions and for facilities, and this page explains how to read them. To then send a customer to Checkout, see Firehose and Checkout.

Two terms

SessionsFacilities
Occurrence: the thing a customer booksScheduledSessionSlot
Parent: the series or facility it belongs toSessionSeries, found through the occurrence’s superEventFacilityUse, found through the occurrence’s facilityUse

Introduction to the Firehose explains how to find an occurrence’s parent, and vice versa.

The four requirements

An occurrence is bookable when all four of these hold:

RequirementWhere to lookfalse when
1The occurrence can be bookedOccurrence → imin:isPotentiallyBookableIt has no spaces left, or it has an additionalAdmissionRestriction
2The organiser or provider takes online bookingsParent → imin:isPotentiallyBookableThey do not allow open booking
3There is a public adult offer that can be bookedimin:aggregateOffer.publicAdult → imin:isPotentiallyBookable, on the parent or on the occurrence (see the paths below)The offer cannot be booked online, or is for members only. Absent altogether when the item is for children only
4The booking window is openOccurrence → startDate, against validFromBeforeStartDate of the aggregate offer from requirement 3See the booking window

imin:aggregateOffer sits on whichever item the Booking System publishes its offers on, so for requirement 3 check both. The full paths:

Sessions

FlagItemField
OccurrenceScheduledSessionimin:isPotentiallyBookable
ParentSessionSeriesimin:isPotentiallyBookable
OfferSessionSeries, in its superEventimin:aggregateOffer.publicAdult.imin:isPotentiallyBookable

Facilities

FlagItemField
OccurrenceSlotimin:isPotentiallyBookable
ParentFacilityUseimin:isPotentiallyBookable
OfferFacilityUse or Slotimin:aggregateOffer.publicAdult.imin:isPotentiallyBookable

The booking window

An occurrence can only be booked during the validFromBeforeStartDate period before it starts.

  • The window opens at the occurrence’s startDate minus validFromBeforeStartDate. With validFromBeforeStartDate of P1W (one week), the occurrence is bookable for the one week before it starts, and cannot be booked 8 days before.
  • The window closes at the startDate. After that it has already started.

Read validFromBeforeStartDate from the same imin:aggregateOffer.publicAdult you used for requirement 3.