Hapio Logo

Booking groups: Handle multiple bookings in one request

26 April 2024 - New features

When you want to handle multiple bookings in one go, you can utilize booking groups.

A booking group acts as a container for multiple bookings, allowing you to create, update, or delete multiple bookings in one single API request, instead of handling each booking individually through separate API requests.The booking group itself can also contain metadata, in addition to the metadata that can be stored on the individual bookings within the group.

Booking groups can be useful in multiple ways. For example, let’s say you run a sports facility where you have four tennis courts, and three tennis coaches available. When a customer is interested in booking an hour with a tennis coach, both a coach and a tennis court should be booked for that hour. In this scenario, a booking group can be created to contain both of these bookings: one booking for the court, and one booking for the coach, each being a separate resource in Hapio. Information about the customer, such as name and contact information, can be stored in the metadata for the booking group. Another example could be a customer at a hotel that is interested in booking a conference room for the entire day, and four tables for lunch at the hotel restaurant. In this example, the conference room would be one resource that is booked through one booking for the entire day, and the tables in the restaurant would be four other resources that are booked through four bookings for an hour during lunch.

Bookings within a booking group follow the same rules as if they were regular bookings created individually. In fact, they are regular bookings, with the addition that they belong to a booking group. You can take any existing regular booking, and add it to a booking group by setting the property booking_group_id on the booking. Similarly, you can remove a booking from a booking group but keep it as a regular booking by setting the property to null.

Read more