Firehose and Checkout \[BETA\]
Is an Opportunity Bookable?
It is possible to book, in Checkout, ScheduledSessions and Slots that are found in Firehose. Not all of these are bookable. In order to determine whether a ScheduledSession or Slot is bookable, find its associated SessionSeries or FacilityUse in the respective endpoints and check that the following three requirements are ALL met:
- (
ScheduledSession/Slot)imin:isPotentiallyBookableisTRUE- This means that the
ScheduledSession/Slotis bookable. - This could be
FALSEif e.g. this particular occurrence ran out of spaces.
- This means that the
- (
SessionSeries/FacilityUse)imin:aggregateOffer.publicAdult.imin:isPotentiallyBookableisTRUE- This means that the
SessionSeries/FacilityUseis bookable. - This could be
FALSEif e.g. this opportunity does not support online bookings.
- This means that the
- (
ScheduledSession/Slot)startDateis within the window specified by (SessionSeries/FacilityUse)imin:aggregateOffer.publicAdult.validFromBeforeStartDate- The start of the time window is the
startDate(i.e. the time that the customer is browsing this data) minus thevalidFromBeforeStartDateduration e.g. ifvalidFromBeforeStartDateisP1W(“one week”), then theScheduledSession/Slotis only bookable for the one week period before it starts. It cannot be booked 8 days before it starts. - The end of the time window is the
startDate- Otherwise, it’s already started!
- The start of the time window is the
Booking a Session or Slot
If an opportunity is bookable according to the rules above, you can show your customers a “Book” button/link which uses the following URL, for ScheduledSessions:
https://{checkoutBaseUrl}/v1/scheduled-sessions/{scheduled-session-identifier}Where:
checkoutBaseUrlis the Checkout hostname that we’ve set up together e.g.checkout.acmesports.com(see here for more information).scheduled-session-identifier: The.identifierfield in the bookableScheduledSession. This must be URI encoded.
And for Slots:
https://{checkoutBaseUrl}/v1/slots/{slot-identifier}Where:
slot-identifier: The.identifierfield in the bookable Slot. This must be URI encoded.