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
| Sessions | Facilities | |
|---|---|---|
| Occurrence: the thing a customer books | ScheduledSession | Slot |
| Parent: the series or facility it belongs to | SessionSeries, found through the occurrence’s superEvent | FacilityUse, 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:
| Requirement | Where to look | false when | |
|---|---|---|---|
| 1 | The occurrence can be booked | Occurrence → imin:isPotentiallyBookable | It has no spaces left, or it has an additionalAdmissionRestriction |
| 2 | The organiser or provider takes online bookings | Parent → imin:isPotentiallyBookable | They do not allow open booking |
| 3 | There is a public adult offer that can be booked | imin: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 |
| 4 | The booking window is open | Occurrence → startDate, against validFromBeforeStartDate of the aggregate offer from requirement 3 | See 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
| Flag | Item | Field |
|---|---|---|
| Occurrence | ScheduledSession | imin:isPotentiallyBookable |
| Parent | SessionSeries | imin:isPotentiallyBookable |
| Offer | SessionSeries, in its superEvent | imin:aggregateOffer.publicAdult.imin:isPotentiallyBookable |
Facilities
| Flag | Item | Field |
|---|---|---|
| Occurrence | Slot | imin:isPotentiallyBookable |
| Parent | FacilityUse | imin:isPotentiallyBookable |
| Offer | FacilityUse or Slot | imin: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
startDateminusvalidFromBeforeStartDate. WithvalidFromBeforeStartDateofP1W(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.