Priority Booking Via the API
Our Priority Booking feature allows the client to specify a group of customers (or agents) who can book online for Events Instances before their Start Selling Date.
However, our API doesn’t have native functionality to query whether an Instance is open for Priority Booking for any customer or the logged in customer, though tickets can still be booked via the API during Priority Booking. This is down to how Priority Booking is set on the system: it is highly configurable, and consequently it is not possible to return one single date for Priority Booking.
High level information on how Priority Booking is set up on Spektrix
- Clients build an Event with Instances that have ‘Start Selling’ date in the future.
- Clients create a Priority Booking period, which is the number of days before the Start Selling Date/Time of an Instance that eligible customers are allowed to book online. Also select eligibility criteria (who can book during Priority Booking) and Events (which Events have Priority Booking).
- Note:
- An Event can have multiple Priority Booking periods associated with it. For example, an Event may start selling tickets 10 days in advance for Gold level members, 5 days in advance for Silver Level members and 1 day in advance for Bronze level members. These would need to be set up as 3 different Priority Booking periods.
- Similarly, a Priority Booking period may be used for multiple Events and can be unlocked with multiple eligibility criteria (such as tags, membership, promo code, payment method)
- Priority Booking periods can be set as whole days in advance of the StartSellingAtWeb DateTime. It is not possible to set them in increments of hours or minutes.
You can find out more about how Priority Booking works and is set up here.
An approach for querying whether an Instance is open for Priority Booking via the API
One approach that is possible is to use attributes in order to determine whether an Event Instance is in a Priority Booking period.
The approach on how to set up the attribute (such as drop down, tickbox, date etc) will be determined by the client based on the complexity of the logic behind Priority Booking and the online customer experience they want to provide. If you would like to discuss different approaches, please contact Support. Here are 3 examples that follow this approach.
Example 1: Retrieve boolean whether an Instance or Event is on Priority Booking
Such as attribute_isOnPriorityBooking: true
Client Set-up
- Set up either Event or Instance attributes such as ‘isOnPriorityBooking’ that uses a tickbox.
- When the client wants the Event Instance to be displayed as On Priority Booking, bulk update the attribute to the relevant Events or Instance.s This step will allow the web devs to retrieve the information that these Instances or Events are on Priority Booking right now. Please note this is in addition to setting up a Priority Booking period.
For Developers
- You can surface the Event attribute with GET v3/events/{id} or the Instance attribute with GET v3/instances/{id}.
- Using a combination of that attribute and the startSellingAtWeb property against the Instance you know whether an Event or Instance is on Priority Booking period
startSellingAtWeb | attribute_isOnPriorityBooking | Website displays |
---|---|---|
in the past | true | 'Book now' |
in the future | true | 'Priority Booking' |
in the future | false | 'Not yet on sale' |
Example case: For example, you can change the messaging on the ‘book now’ button to ‘Priority Booking’. You can then direct customers to chooseseats.aspx iframe where they will be prompted to log in.
Example 2: Retrieve date that Priority Booking starts
Such as attribute_PriorityBookingStarts: "2022-03-31T00:00:00"
Client Set-up
- Set up either Event or Instance attributes such as ‘PriorityBookingStarts’ that uses a date.
- Add a date to the attribute to the Events or Instances that are on Priority Booking. This step will allow the web devs to retrieve the date that these Instances or Events go on Priority Booking. The time will always be the same as the time of the Start Selling On Web time. Please note this is in addition to setting up a Priority Booking period.
For Developers
- You can surface the Event attribute with GET v3/events/{id} or the Instance attribute with GET v3/instances/{id}.
- Using a combination of that attribute and the startSellingAtWeb property against the Instance you know the date of the Priority Booking.
startSellingAtWeb | attribute_PriorityBookingStarts | Website displays |
---|---|---|
in the past | {{a date in the past}} | 'Book now' |
in the future | {{a date in the past}} | 'Priority Booking' |
in the future | {{a date in the future}} | 'Priority Booking goes on sale {{attribute_isOnPriorityBooking Date Portion}} at {{startSellingAtWeb Time Portion}' |
in the future | {{null}} | 'Goes on sale at {{startSellingAtWeb}}' |
Example 3: Retrieve number of days before startSellingAtWeb date
Such as attribute_PriorityBookingDaysInAdvance: "7"
Client Set-up
- Set up either Event or Instance attributes such as ‘PriorityBookingDaysInAdvance’ that uses a dropdown with integer values which indicate the number of days before Start Selling On Web.
- Use the attribute as the Event Criteria against your Priority Booking rules. You can use this to automatically attach Instances to the correct Priority Booking period when you build them. Map each of the values of the attribute to the corresponding Priority Booking periods.This step will allow the web devs to retrieve the date that these Instances or Events go on Priority Booking. The time will always be the same as the time of the Start Selling On Web time. Please note this is in addition to setting up a Priority Booking period.
For Developerss
- You can surface the Event attribute with GET v3/events/{id} or the Instance attribute with GET v3/instances/{id}.
- Using a combination of that attribute and the startSellingAtWeb property against the Instance you can calculate the date of the Priority Booking.
startSellingAtWeb | attribute_PriorityBookingDaysInAdvance | Website displays |
---|---|---|
in the past | {{any integer}} | 'Book now' |
in the future | {{an integer}} | Calculate startSellingAtWeb minus PriorityBookingDaysInAdvance. If we are in Priority Booking period, then display ‘Priority Booking’ |
in the future | {{an integer}} | Calculate startSellingAtWeb minus PriorityBookingDaysInAdvance. If we are before Priority Booking period, then display ‘Priority Booking goes on sale {{startSellingAtWeb Date - PriorityBookingDaysInAdvance}} at {{startSellingAtWeb Time Portion}}’ |
in the future | {{null}} | 'Goes on sale at {{startSellingAtWeb}}' |
All of these approaches can be adapted and extended for multiple Priority Booking periods. The client would need to set up multiple attributes with unique names such as isOnPriorityBookingGold, isOnPriorityBookingSilver, isOnPriorityBookingBronze. The developer can then retrieve the info associated with each attribute. The more Priority Booking periods set up, the more complicated it will be to implement and maintain this approach, so we recommend caution.