Skip to main content

7. Book selected seats

So you've shown your ticket buyer a floor plan, they selected the seats they wish. Now it's time to actually book them, so that they become unavailable for selection for the next ticket buyer that comes along.

You do this by calling the book objects endpoint of the Seats API. Here are some examples using the respective API Client libraries you can use:

use Seatsio\Region;
use Seatsio\SeatsioClient;

$seatsioClient = new SeatsioClient(Region::EU(), <WORKSPACE SECRET KEY>); // You can find this key at
$seatsioClient->events->book("event1", ["A-3", "A-5", "A-7"]);

Seats held by the ticket buyer

If the seats are held (i.e. you passed in session when rendering the chart), you need to include the hold token when booking the seats. verifies whether the seats were held by that token, to prevent other ticket buyers from snatching them.

$seatsioClient->events->book("event1", ["A-3", "A-5", "A-7"], "8AWOqZZTz5");

When should I book?

The answer is simple and complex at the same time: "whenever is appropriate in your sales flow".

For example, you could call the API to book seats right before you collect their payment. Or you could pre-book some seats for VIPs before you even open up ticket sales.

For a more in-depth discussion on this topic, check this page.

Live updates

Whenever you change availability for a seat, we will push out this change to everyone who has the floor plan for your event open in their browser, in near real-time.

In other words: you can look at the seats on a floor plan as a collection of on/off switches, controllable via the REST API. You decide when you switch seats on and off, and by doing so, everyone who is looking at the floor plan will see the availability changes happening live.

Custom statuses

There's more than just 'booking' a seat. You can use your own statuses (i.e. other than BOOKED) as well, read more here.