How to get the list attendees of a Booking

Hey,

I’m digging into the updated Bookings API and I 'm wondering how to get the list of attendees for a booking ?

I looked at https://www.wix.com/velo/reference/wix-bookings-backend/bookings/bookingsqueryresult/items but it only provides the number of attendees

Context

We created a space for users to watch replays of previous classes. In order to get access to a replay, the member must have participated in the class. At the moment, we use the booking dashboard to export email all class attendees and then use the email to check if the user is an attendee of a replay.

This is really cumbersome for the team has there are multiple classes per day to update

Hi
This is Koby from Wix Bookings team.

In the described use case I understand there are class sessions, each session has multiple bookings, and a booking represents a registration of at least one customer.

To better understand your request - do you need the list of participants per session? Or do you need the list of participants that booked the session and were marked as “Checked-in” (Under “Attendance”)?

Either way, I would start by calling queryBookings (let’s say for a specific whole day) and group the bookings by the session id. The session id is a unique identifier of the class. You can find it under booking.bookedEntity.singleSession.sessionId (see image below).
You can then apply any logic per the list of bookings per class session.

  • If you need the email of the customer, you have it under booking.formInfo.contactDetails.email
  • If you need the attendance information, that is, if this customer was marked to be “checked-in” or “no-show” you can get it from the booking.attendanceInfo.attendanceStatus

Hope this answers your question - if not please let me know what else is missing.

Thx @kobym , I believe I’ve got everything I need to start working on that.