About the Wix Bookings Attendance API

With the Wix Bookings Attendance API, you can retrieve and manage a booked session's attendance information by:

  • Setting the attendance for a given booked session.
  • Getting the attendance information for a given booked session by ID.
  • Querying the attendance by given filters, sorting, and paging.

About the attendance object

The attendance object holds information about the attendance of a booked session, such as:

  • Did anyone attend the session?
  • How many people attended the session?

The number of session Attendance objects available depends on session types:

  • Appointment sessions have 1 Attendance object per appointment.
  • Class sessions have an Attendance object for each session of the class. The number of sessions for a class is defined in Schedule and Sessions' schedule.capacity property.
  • Course sessions have an Attendance object for each session of the course. The number of sessions for a class is defined in Schedule and Sessions' schedule.capacity property.

Use cases

Common business usages for this API include:

  • Set the attendance for a given booked session to reflect how many attendees checked in.
  • Query the attendance for a given participant in a course booking.
  • Query attendance for a particular booking's sessions over time to see if a particular session has frequent no-shows. You can compare the number of attendees to the number of participants that signed up for that booking's sessions.

Terminology

For a comprehensive glossary of Wix Bookings terms, see Terminology.

Before you begin

Validation capabilities are limited. Make sure your code validates that:

  • There is no mismatch between numberOfAttendees and attendanceStatus to make sure, for example, that attendanceStatus is not NOT_ATTENDED while numberOfAttendees is 5.
  • The attendance's numberOfAttendees and the booking's numberOfParticipants correspond. For example, the number of attendees usually should not exceed the booking's intended number of participants (unless perhaps you allow walk-ins that did not sign up in advance).
Was this helpful?
Yes
No

Supported Filters and Sorting

Query Attendance runs with these defaults:

  • sorted by id in ASC order
  • cursorPaging.limit is 50

The following table shows field support for filters for the Attendance object:

FieldSupported FiltersSortable
id$eq, $ne, $in, $nin, $hasSomeSortable
bookingId$eq, $ne, $in, $nin, $hasSomeSortable
sessionId$eq, $ne, $in, $nin, $hasSomeSortable
status$eq, $ne, $in, $nin, $hasSomeSortable
numberOfAttendees$eq, $ne, $in, $nin, $hasSome, $lt, $lte, $gt, $gteSortable

Notes:

  • Only 1 filter is supported per query. If you define multiple filters in the same query, only the first is processed.

To learn about working with query endpoints, see API Query Language, Sorting and Paging, and Field Projection.

Was this helpful?
Yes
No

Attendance Object

Attributes
idstringRead-onlyformat GUID
ID of the Attendance object.

bookingIdstringformat GUID
Corresponding booking ID.

sessionIdstring
Corresponding session ID.

statusstring
3 supported values:
NOT_SETATTENDEDNOT_ATTENDED
Status indicating if any particpants attended the session:
  • NOT_SET: There is no available attendance information.
  • ATTENDED: At least a single participant attended the session.
  • NOT_ATTENDED: No participants attended the session.

numberOfAttendeesinteger
Total number of participants that attended the session. By default, the number of attendees is set to 1, but you can set a number to greater than 1 if multiple participants attended. Do not set to 0 to indicate that no one attended the session. Instead, set the status field to NOT_ATTENDED. Default: 1
Was this helpful?
Yes
No

GetGet Attendance

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves attendance information by ID.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Bookings - Including Participants
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
GET
https://www.wixapis.com/_api/bookings-attendance/v2/attendance/{attendanceId}

Was this helpful?
Yes
No

PostSet Attendance

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Sets information about whether a booking's session was attended. This information is saved in an Attendance object.

If attendance was already set, meaning the Attendance object already exists, the existing attendance information is updated. Otherwise, a new Attendance object is created.

By default, the number of attendees is set to 1, but you can set a number to greater than 1 if multiple participants attended. Do not set to 0 to indicate that no one attended the session. Instead, set the status field to NOT_ATTENDED.

Note: Make sure your code validates that:

  • There is no mismatch between numberOfAttendees and attendanceStatus to make sure, for example, that attendanceStatus is not NOT_ATTENDED while numberOfAttendees is 5.
  • The attendance's numberOfAttendees and the booking's numberOfParticipants correspond. For example, the number of attendees usually should not exceed the booking's intended number of participants (unless perhaps you allow walk-ins that did not sign up in advance).

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/_api/bookings-attendance/v2/attendance/set

Was this helpful?
Yes
No

PostQuery Attendance

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves attendance information for booked sessions, given the provided paging, filtering, and sorting.

When querying attendance information, you can query from the perspective of:

  • A booking. Specify a booking ID to retrieve attendance information for all sessions related to that booking.
  • A session. Specify a session ID to retrieve attendance information for all bookings related to that session.

For example, query by a course's bookingId and status = "NOT_ATTENDED" to retrieve the attendance of a given participant in a course. For example, this query helps you determine if a participant booked the course but did not attend most of its sessions, taking away spots for other potential participants.

Query Attendance runs with the following defaults, which you can override:

  • id sorted in ASC order
  • cursorPaging.limit is 50

For field support, see supported filters.

Notes:

  • Another way to retrieve attendance information is to call Bookings Reader V2's Query Extended Bookings with withBookingAttendanceInfo as true.
  • Up to 100 results can be returned per request.
  • Only 1 filter is supported per query. If you define multiple filters in the same query, only the first is processed.

To learn about working with query endpoints, see API Query Language.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Bookings - Including Participants
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/_api/bookings-attendance/v2/attendance/query

Was this helpful?
Yes
No