> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetAttendance

# Package: bookings

# Namespace: AttendanceService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/attendance/get-attendance?apiView=SDK.md

## Permission Scopes:
Read Bookings - Including Participants: SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE

## Introduction

Retrieves attendance information.

---

## REST API

### Schema

```
 Method: getAttendance
 Description: Retrieves attendance information.
 URL: https://www.wixapis.com/bookings/bookings-attendance/{attendanceId}
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  attendanceId
 Method parameters: 
   param name: attendanceId | type:   none | required: true 
 Return type: GetAttendanceResponse
  - name: attendance | type: Attendance | description: Retrieved attendance.  
     - name: id | type: string | description: GUID of the `attendance` object.  | read-only: true | validation: format GUID
     - name: bookingId | type: string | description: Corresponding booking GUID.  | validation: format GUID
     - name: status | type: AttendanceStatus | description: Status indicating if any participants attended the session.  
         - enum:
         -     NOT_SET: There is no available attendance information.
         -     ATTENDED: At least a single participant attended the session.
         -     NOT_ATTENDED: No participants attended the session.
     - name: numberOfAttendees | type: integer | description: 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  
     - name: eventId | type: string | description: Corresponding [event GUID](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/event-object.md). Use this field instead of the deprecated `sessionId`. You can retrieve the event GUID from the booking's slot `booking.bookedEntity.slot.eventId`.  | validation: minLength 36, maxLength 250

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: ATTENDANCE_NOT_FOUND | Description: Couldn't find the attendance record.


```

### Examples

### Retrieve attendance information
Retrieve attendance information for a booked session by attendance ID.

```curl
curl -X GET \
'https://www.wixapis.com/bookings/v2/attendance/9fc7a1cc-55ba-4943-afac-5849f1a3cdd9' \
-H 'Authorization: <AUTH>' \
-d '{
  "attendanceId": "9fc7a1cc-55ba-4943-afac-5849f1a3cdd9"
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.bookings.attendance.getAttendance(attendanceId)
 Description: Retrieves attendance information.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  attendanceId
 Method parameters: 
   param name: attendanceId | type: string | description: GUID of the attendance object to retrieve. | required: true | validation: format GUID
 Return type: PROMISE<Attendance>
  - name: _id | type: string | description: GUID of the `attendance` object.  | read-only: true | validation: format GUID
  - name: bookingId | type: string | description: Corresponding booking GUID.  | validation: format GUID
  - name: status | type: AttendanceStatus | description: Status indicating if any participants attended the session.  
     - enum:
     -     NOT_SET: There is no available attendance information.
     -     ATTENDED: At least a single participant attended the session.
     -     NOT_ATTENDED: No participants attended the session.
  - name: numberOfAttendees | type: integer | description: 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  
  - name: eventId | type: string | description: Corresponding [event GUID](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/event-object.md). Use this field instead of the deprecated `sessionId`. You can retrieve the event GUID from the booking's slot `booking.bookedEntity.slot.eventId`.  | validation: minLength 36, maxLength 250

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: ATTENDANCE_NOT_FOUND | Description: Couldn't find the attendance record.


```

### Examples

### Get an attendance by ID
```javascript
import { attendance } from "@wix/bookings";

const attendanceId = "f3197ab6-4900-4533-a765-f0c719fe00b9";

async function getAttendance() {
  const response = await attendance.getAttendance(attendanceId);
  return response;
}

/* Promise resolves to:
 * {
 *   _id: "f3197ab6-4900-4533-a765-f0c719fe00b9",
 *   bookingId: "12345678-1234-1234-1234-123456789abc",
 *   status: "ATTENDED",
 *   numberOfAttendees: 2,
 *   eventId: "11111111-1111-1111-1111-111111111111"
 * }
 */

```

### getAttendance (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { attendance } from '@wix/bookings';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { attendance },
  // Include the auth strategy and host as relevant
});


async function getAttendance(attendanceId) {
  const response = await myWixClient.attendance.getAttendance(attendanceId);
};
```

---