Developer portal

Booking API

Introduction

The Booking API functions cover the whole process of booking tickets which is organised as a standard shopping flow. All the data relevant to the session are held on our servers for the whole duration of the process so that the implementation on the client side is simplified as much as possible. The only information you have to hold on your side during the booking process is the Basket ID (see below for more explanation). It is therefore possible to implement the whole booking process even without a persistent storage (i.e. without a database for instance).

The whole process consists of four simple steps:

  1. Each transaction starts by creating a basket (POST Baskets API request). A basket is represented by a Basket ID - a globally unique identifier (with a data type of Guid). The client receives the BasketId by calling the POST Baskets function. This ID is then used for adding (reserving) tickets and for submitting the order.
  2. The next step is to Each booking is to add tickets to the basket. You can simply add any combination of tickets (e.g. you can book multiple tickets for multiple performance dates or multiple events in one single transaction). By adding the ticket to basket a basket item is created and the ticket is reserved to you (and will be held for you for a certain time period)
  3. You can always check the contents of the Basket (for instance when your application displays the basket to your users). Note that each basket item (i.e. each ticket you’ve reserved) has its own reservation time (the time when you added the ticket to basket) and therefore its own expiration time (the time when we’ll release the ticket, remove it from your basket and mark it as available for other customers).
  4. When you’re finished with the ticket selection, you can make a POST Baskets/{basketId}/SubmitOrder request for the given basket ID. This will return you the URL of the payment gateway. Once the payment is successfully processed, the transaction is completed on our side and the tickets are booked to you :)

Depending on the characteristics of your application the basket creation, adding tickets and submitting order can be done immediately one after another or anytime within the given expiration times. Either way, please note that you always have to make at least the three mentioned requests (in the correct order) - POST Baskets, POST Baskets/{basketId}/Tickets and POST Baskets/{basketId}/SubmitOrder.

During the booking process (including payment where applicable), two expiration timeouts are applied:

  • Reservation timeout (the default value is 10 minutes) starts running when the ticket is added to basket. Each basket item has its own reservation timeout (and therefore can expire at different time). When the reservation expires, the ticket is removed from the basket, marked as Available and can be therefore booked by another customer.
  • Payment timeout (the default value is 20 minutes) starts when the basket is submitted (a SubmitOrder request) and gives the customer the time necessary to process the payment on the payment gateway. When the payment timeout expires, the whole basket is canceled and all the tickets are released.

Please note that it’s necessary to include the header with API Key for all requests.