Was this helpful?
Yes
No

Setup

To use the Attendance API, install the @wix/bookings package using npm or Yarn:

Copy
1
npm install @wix/bookings

or

Copy
1
yarn add @wix/bookings

Then import { attendance } from @wix/bookings:

Copy
1
import { attendance } from '@wix/bookings'
Was this helpful?
Yes
No

bulkSetAttendance( )

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 for multiple bookings

See SetAttendance documentation for more information.

If any of the attendance list required fields were not passed on the request or if the caller doesn't have the required permissions to set the attendance, the call fails. If the request contains attendance info for unavailable sessions, the call completes successfully but the attendance info for the unavailable sessions are not created and are not considered as failures in the response.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings
Manage Bookings - all permissions
Learn more about permission scopes.
Copy
function bulkSetAttendance(attendanceList: Array<Attendance>, options: BulkSetAttendanceOptions): Promise<BulkSetAttendanceResponse>
Method Parameters
attendanceListArray<Attendance>Required
The attendance information for a booked sessions that you want to create or update.

optionsBulkSetAttendanceOptions
Returns
Return Type:Promise<BulkSetAttendanceResponse>
Was this helpful?
Yes
No

getAttendance( )

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:
Manage Bookings Services and Settings
Manage Bookings
Read Bookings - Including Participants
Read Bookings - all read permissions
Manage Bookings - all permissions
Learn more about permission scopes.
Copy
function getAttendance(attendanceId: string): Promise<Attendance>
Method Parameters
attendanceIdstringRequired
ID of the object that contains the attendance information that you want to retrieve.
Returns
Return Type:Promise<Attendance>
Was this helpful?
Yes
No

queryAttendance( )

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.

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()

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Manage Bookings
Read Bookings - Including Participants
Read Bookings - all read permissions
Manage Bookings - all permissions
Learn more about permission scopes.
Copy
function queryAttendance(): AttendancesQueryBuilder
Request
This method does not take any parameters
Returns
Was this helpful?
Yes
No

setAttendance( )

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
Manage Bookings - all permissions
Learn more about permission scopes.
Copy
function setAttendance(attendance: Attendance): Promise<SetAttendanceResponse>
Method Parameters
attendanceAttendanceRequired
The attendance information for a booked session that you want to create or update.
Returns
Return Type:Promise<SetAttendanceResponse>
Was this helpful?
Yes
No