> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: setAttendance(attendance: Attendance, options: SetAttendanceOptions) # Method package: wixBookingsV2 # Method menu location: wixBookingsV2 --> attendance --> setAttendance # Method Link: https://dev.wix.com/docs/velo/apis/wix-bookings-v2/attendance/set-attendance.md # Method Description: 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). # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## setAttendance example for dashboard page code ```javascript import { attendance } from 'wix-bookings.v2'; async function setAttendance(attendance, options) { try { const result = await attendance.setAttendance(attendance, options); return result; } catch (error) { console.error(error); // Handle the error } } ``` ## setAttendance example for exporting from backend code ```javascript import { attendance } from 'wix-bookings.v2'; import { webMethod, Permissions } from 'wix-web-module'; import { elevate } from 'wix-auth'; const elevatedSetAttendance = elevate(attendance.setAttendance); export const setAttendance = webMethod( Permissions.Anyone, async (attendance, options) => { try { const result = await elevatedSetAttendance(attendance, options); return result; } catch (error) { console.error(error); // Handle the error } } ); ``` ---