Search.../

getAttendance( )

Developer Preview

Retrieves attendance information by ID.

Syntax

function getAttendance(attendanceId: string): Promise<Attendance>

getAttendance Parameters

NAME
TYPE
DESCRIPTION
attendanceId
string

ID of the object that contains the attendance information that you want to retrieve.

Returns

The retrieved attendance information for the booked session.

Return Type:

Promise<
Attendance
>
NAME
TYPE
DESCRIPTION
_id
string

ID of the Attendance object.

bookingId
string

Corresponding booking ID.

numberOfAttendees
number

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

sessionId
string

Corresponding session ID.

status
string

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.

Was this helpful?

getAttendance example

Copy Code
1import { attendance } from 'wix-bookings.v2';
2
3 async function getAttendance(attendanceId) {
4 try {
5 const result = await attendance.getAttendance(attendanceId);
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13