Search.../

queryAttendance( )

Developer Preview

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

Description

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 set to 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.

PROPERTYSUPPORTED FILTERS & SORTING
_ideq(),ne(),in(),ascending()
bookingIdeq(),ne(),in(),ascending()
sessionIdeq(),ne(),in(),ascending()
statuseq(),ne(),in(),ascending()
numberOfAttendeeseq(),ne(),in(),lt(),le(),gt(),ge(),ascending(),descending()

Syntax

function queryAttendance(): AttendancesQueryBuilder

queryAttendance Parameters

This function does not take any parameters.

Returns

Was this helpful?

queryAttendance example

Copy Code
1import { attendance } from 'wix-bookings.v2';
2
3 async function queryAttendance() {
4 const { items } = attendance.queryAttendance().find();
5 }
6