> 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

# QueryEventGuests

# Package: registration

# Namespace: EventGuestsService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/events/registration/event-guests/query-event-guests?apiView=SDK.md

## Permission Scopes:
Read Event Tickets and Guest List: SCOPE.DC-EVENTS.READ-GUEST-LIST

## Introduction

Retrieves a list of guests given the provided paging, filtering, and sorting.
Query Event Guests runs with these defaults, which you can override:
- `createdDate` is sorted in `ASC` order
- `paging.limit` is `100`
- `paging.offset` is `0`
To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language), [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination), and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).

---

## REST API

### Schema

```
 Method: queryEventGuests
 Description: Retrieves a list of guests given the provided paging, filtering, and sorting. Query Event Guests runs with these defaults, which you can override: - `createdDate` is sorted in `ASC` order - `paging.limit` is `100` - `paging.offset` is `0` To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language), [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination), and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
 URL: https://www.wixapis.com/events/v2/guests/query
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  query
 Method parameters: 
   param name: fields | type: array<fields> | description: Predefined sets of fields to return.  | validation: maxItems 3
                 - enum:
                 -     GUEST_DETAILS: Returns `guestDetails` and `tickets`.
                 -     GUEST_TOTAL: Returns `totalGuests`.
   param name: query | type: QueryV2   | required: true 
     - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.  
        - name: limit | type: integer | description: Maximum number of items to return in the results.  | validation: minimum 0, maximum 1000, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
        - name: filter | type: object | description: Filter object in the following format: <br/> `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }`. <br/> <br/> **Example:** <br/> `"filter" : { "eventId": "sd3f-jhds-4fs77", "ticketNumber": {"$startsWith":"478"} }` <br/> <br/> See [supported fields and operators](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort) for more information.  
        - name: sort | type: array<Sorting> | description: Sort object in the following format: <br/> `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]` <br/> <br/> **Example:** <br/> `[{"fieldName":"createdDate","direction":"DESC"}]` <br/> <br/> See [supported fields](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort) for more information.  
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
 Query fields:
   - field: id | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: eventId | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: rsvpId | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: contactId | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: memberId | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: secondaryLanguageCode | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: ticketNumber | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: orderNumber | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: attendanceStatus | operators: $eq, $ne, $in | sort: none | aggregatable: undefined | searchable: undefined
   - field: guestType | operators: $eq, $ne, $in | sort: none | aggregatable: undefined | searchable: undefined
   - field: guestDetails.checkedIn | operators: $eq, $ne, $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: tickets | operators: $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: createdDate | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: updatedDate | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: attendanceStatusUpdatedDate | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: QueryEventGuestsResponse
  - name: guests | type: array<EventGuest> | description: List of guests.  
     - name: id | type: string | description: Guest GUID.  | validation: format GUID
     - name: eventId | type: string | description: Event GUID.  | validation: format GUID
     - name: rsvpId | type: string | description: RSVP GUID. <br/> <br/> **Note:** Only applicable when `guestType` is `"RSVP"`.  | validation: format GUID
     - name: orderNumber | type: string | description: Order number. <br/> <br/> **Note:** Only applicable when `guestType` is `"BUYER"` or `"TICKET_HOLDER"`.  | validation: maxLength 36
     - name: ticketNumber | type: string | description: Ticket number. <br/> <br/> **Note:** Only applicable when `guestType` is `"TICKET_HOLDER"`.  | validation: maxLength 36
     - name: tickets | type: array<TicketDetails> | description: List of names, numbers, and definition GUIDs for each ticket.  | validation: maxItems 50
        - name: number | type: string | description: Ticket number.  | validation: maxLength 36
        - name: definitionId | type: string | description: Ticket definition GUID.  | validation: format GUID
        - name: name | type: string | description: Ticket name.  | validation: minLength 1, maxLength 30
     - name: contactId | type: string | description: Guest's contact GUID. See the Contacts API for more details.  | validation: format GUID
     - name: guestDetails | type: GuestDetails | description: Guest details. <br/> <br/> Returned only when the `guestDetails` fieldset is sent in the request.  
        - name: email | type: string | description: Email.  | validation: format EMAIL
        - name: firstName | type: string | description: First name.  | validation: maxLength 255
        - name: lastName | type: string | description: Last name.  | validation: maxLength 255
        - name: formResponse | type: FormResponse | description: Form response.  
           - name: inputValues | type: array<InputValue> | description: Form field inputs.  | validation: maxItems 200
              - name: inputName | type: string | description: Form field input name.  | validation: maxLength 100
              - name: value | type: string | description: Form field value.  | validation: maxLength 5000
              - name: values | type: array<string> | description: Form field values.  | validation: maxItems 100, maxLength 5000
        - name: checkedIn | type: boolean | description: Whether the guest has checked into the event.  
        - name: onlineConferencingLogin | type: OnlineConferencingLogin | description: The login details for the guest to access the online conference event.  
           - name: link | type: string | description: Link URL to the online conference.  | read-only: true | validation: format WEB_URL
           - name: password | type: string | description: Password for the online conference.  | read-only: true 
        - name: phone | type: string | description: Phone extracted from form response. If multiples phone inputs are present, first one is returned.  | validation: maxLength 200
        - name: address | type: string | description: Address extracted from form response. If multiples address inputs are present, first one is returned.  | validation: maxLength 200
        - name: checkInDetails | type: array<GuestCheckInDetails> | description: Per-guest check-in details. Only present for guests that have check-in history.  | validation: maxItems 50
           - name: checkedIn | type: boolean | description: Whether this guest is checked in.  
           - name: checkInDate | type: string | description: Date and time the guest checked in.  | validation: format date-time
           - name: checkInCanceledDate | type: string | description: Date and time the guest canceled check-in.  | validation: format date-time
           - name: checkedInBy | type: string | description: GUID of the user who last performed check-in.  | validation: format GUID
           - name: checkInCanceledBy | type: string | description: GUID of the user who last canceled check-in.  | validation: format GUID
           - name: checkedInByStaffMember | type: string | description: GUID of the staff member who last performed check-in.  | validation: format GUID
           - name: checkInCanceledByStaffMember | type: string | description: GUID of the staff member who last canceled check-in.  | validation: format GUID
           - name: fullName | type: string | description: Full name of the guest. Only set for RSVP guests.  | validation: maxLength 101
     - name: attendanceStatus | type: AttendanceStatus | description: Attendance status. The attendance status updates based on status values in an RSVP object (for RSVP events) or in an Order object (for ticketed events). For more information, see [Guest Attendance Status Mapping](https://dev.wix.com/docs/api-reference/business-solutions/events/registration/event-guests/guest-attendance-status-mapping.md). <br/> <br/> **Note:** For `guestType` of `"BUYER"` or `"TICKET_HOLDER"` the `"IN_WAITLIST"` value is not applicable.  
         - enum:
         -     NOT_ATTENDING: Not attending.
         -     ATTENDING: Attending.
         -     IN_WAITLIST: In a waiting list.
     - name: secondaryLanguageCode | type: string | description: Secondary language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Used when the event ticket should be translated into another language.  | validation: format LANGUAGE
     - name: createdDate | type: string | description: Date and time the guest was created in `yyyy-mm-ddThh:mm:sssZ` format.  | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the guest was updated in `yyyy-mm-ddThh:mm:sssZ` format.  | validation: format date-time
     - name: attendanceStatusUpdatedDate | type: string | description: Date and time of guest's latest attendance status update.  | validation: format date-time
     - name: memberId | type: string | description: Site member GUID.  | validation: format GUID
     - name: guestType | type: GuestType | description: Guest type.  
         - enum:
         -     RSVP: An invited guest, no ticket necessary.
         -     BUYER: The guest who bought the ticket.
         -     TICKET_HOLDER: The guest for whom the ticket was bought.
     - name: locale | type: string | description: Locale in [IETF BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) format. Used when the event date and time on a ticket should be formatted into another locale.  | validation: format LANGUAGE_TAG
     - name: totalGuests | type: integer | description: Number of total guests in an event (registered guests + additional ones).  | read-only: true | validation: format int32
     - name: revision | type: string | description: Revision number, which increments by 1 each time the guest is updated.  | read-only: true | validation: format int64
     - name: additionalDetails | type: AdditionalDetails | description: Additional Details  | read-only: true 
        - name: createdDate | type: string | description: Date and time the source entity (RSVP or Order) was created.  | validation: format date-time
        - name: updatedDate | type: string | description: Date and time the source entity (RSVP or Order) was updated.  | validation: format date-time
        - name: rsvpStatus | type: RsvpStatus | description: Rsvp Status  
             - enum:
             -     YES: Guest is attending the event.
             -     NO: Guest isn't attending the event.
             -     WAITLIST: Guest is on a waitlist.
        - name: orderStatus | type: OrderStatus | description: Order Status  
             - enum:
             -     UNKNOW_ORDER_STATUS: Order status is not available for this request fieldset.
             -     FREE: Order is confirmed, no payment is required.
             -     PENDING: Order was paid, but the payment gateway suspended the payment.
             -     PAID: Order is paid.
             -     OFFLINE_PENDING: Order is confirmed but has be paid via offline payment. Status needs to be manually updated to `"PAID"`.
             -     INITIATED: Order is awaiting for payment at the cashier.
             -     CANCELED: Order is canceled.
             -     DECLINED: Order payment is declined.
             -     AUTHORIZED: Order payment is authorized.
             -     VOIDED: Order payment is voided.
             -     PARTIALLY_PAID: Order is partially paid with less than the total amount.
  - name: pagingMetadata | type: PagingMetadataV2 | description: Metadata for the paginated results.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: offset | type: integer | description: Offset that was requested.  | validation: format int32
     - name: total | type: integer | description: Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set.  | validation: format int32
     - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field.  
     - name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000


```

### Examples

### Query Ticket holder-type guests with guest details
```curl
curl -X POST 'https://www.wixapis.com/events/v2/guests/query' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH TOKEN>' \
--data-binary '{
  "query": {
    "filter": {
      "guestType": "TICKET_HOLDER"
    },
    "fieldsets": [
      "guestDetails"
    ]
  }
}'
```

### Query buyer-type guests with guest details
```curl
curl -X POST 'https://www.wixapis.com/events/v2/guests/query' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH TOKEN>' \
--data-binary
'{
  "query": {
    "filter": {
      "guestType": "BUYER"
    },
    "fieldsets": [
      "guestDetails"
    ],
    "paging": {
      "limit": 1
    }
  }
}'
```

### Query RSVP-type guests without guest details
```curl
curl -X POST 'https://www.wixapis.com/events/v2/guests/query' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH TOKEN>' \
--data-binary '{
  "query": {
    "filter": {
      "guestType": "RSVP"
    }
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.events.guests.queryGuests(query, options)
 Description: Retrieves a list of guests given the provided paging, filtering, and sorting. Query Event Guests runs with these defaults, which you can override: - `createdDate` is sorted in `ASC` order - `paging.limit` is `100` - `paging.offset` is `0` To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language), [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination), and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  query
 Method parameters: 
   param name: query | type: GuestQuery   | required: true 
     - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.  
        - name: limit | type: integer | description: Maximum number of items to return in the results.  | validation: minimum 0, maximum 1000, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
        - name: filter | type: object | description: Filter object in the following format: <br/> `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }`. <br/> <br/> **Example:** <br/> `"filter" : { "eventId": "sd3f-jhds-4fs77", "ticketNumber": {"$startsWith":"478"} }` <br/> <br/> See [supported fields and operators](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort) for more information.  
        - name: sort | type: array<Sorting> | description: Sort object in the following format: <br/> `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]` <br/> <br/> **Example:** <br/> `[{"fieldName":"createdDate","direction":"DESC"}]` <br/> <br/> See [supported fields](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort) for more information.  
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
   param name: options | type: QueryEventGuestsOptions  none  
        - name: fields | type: array<RequestedFields> | description: Predefined sets of fields to return.  | validation: maxItems 3
             - enum:
             -     GUEST_DETAILS: Returns `guestDetails` and `tickets`.
             -     GUEST_TOTAL: Returns `totalGuests`.
 Query fields:
   - field: _id | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: eventId | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: rsvpId | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: contactId | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: memberId | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: secondaryLanguageCode | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: ticketNumber | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: orderNumber | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: attendanceStatus | operators: $eq, $ne, $in | sort: none | aggregatable: undefined | searchable: undefined
   - field: guestType | operators: $eq, $ne, $in | sort: none | aggregatable: undefined | searchable: undefined
   - field: guestDetails.checkedIn | operators: $eq, $ne, $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: tickets | operators: $exists | sort: none | aggregatable: undefined | searchable: undefined
   - field: _createdDate | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: _updatedDate | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: attendanceStatusUpdatedDate | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: PROMISE<QueryEventGuestsResponse>
  - name: guests | type: array<EventGuest> | description: List of guests.  
     - name: _id | type: string | description: Guest GUID.  | validation: format GUID
     - name: eventId | type: string | description: Event GUID.  | validation: format GUID
     - name: rsvpId | type: string | description: RSVP GUID. <br/> <br/> **Note:** Only applicable when `guestType` is `"RSVP"`.  | validation: format GUID
     - name: orderNumber | type: string | description: Order number. <br/> <br/> **Note:** Only applicable when `guestType` is `"BUYER"` or `"TICKET_HOLDER"`.  | validation: maxLength 36
     - name: ticketNumber | type: string | description: Ticket number. <br/> <br/> **Note:** Only applicable when `guestType` is `"TICKET_HOLDER"`.  | validation: maxLength 36
     - name: tickets | type: array<TicketDetails> | description: List of names, numbers, and definition GUIDs for each ticket.  | validation: maxItems 50
        - name: number | type: string | description: Ticket number.  | validation: maxLength 36
        - name: definitionId | type: string | description: Ticket definition GUID.  | validation: format GUID
        - name: name | type: string | description: Ticket name.  | validation: minLength 1, maxLength 30
     - name: contactId | type: string | description: Guest's contact GUID. See the Contacts API for more details.  | validation: format GUID
     - name: guestDetails | type: GuestDetails | description: Guest details. <br/> <br/> Returned only when the `guestDetails` fieldset is sent in the request.  
        - name: email | type: string | description: Email.  | validation: format EMAIL
        - name: firstName | type: string | description: First name.  | validation: maxLength 255
        - name: lastName | type: string | description: Last name.  | validation: maxLength 255
        - name: formResponse | type: FormResponse | description: Form response.  
           - name: inputValues | type: array<InputValue> | description: Form field inputs.  | validation: maxItems 200
              - name: inputName | type: string | description: Form field input name.  | validation: maxLength 100
              - name: value | type: string | description: Form field value.  | validation: maxLength 5000
              - name: values | type: array<string> | description: Form field values.  | validation: maxItems 100, maxLength 5000
        - name: checkedIn | type: boolean | description: Whether the guest has checked into the event.  
        - name: onlineConferencingLogin | type: OnlineConferencingLogin | description: The login details for the guest to access the online conference event.  
           - name: link | type: string | description: Link URL to the online conference.  | read-only: true | validation: format WEB_URL
           - name: password | type: string | description: Password for the online conference.  | read-only: true 
        - name: phone | type: string | description: Phone extracted from form response. If multiples phone inputs are present, first one is returned.  | validation: maxLength 200
        - name: address | type: string | description: Address extracted from form response. If multiples address inputs are present, first one is returned.  | validation: maxLength 200
        - name: checkInDetails | type: array<GuestCheckInDetails> | description: Per-guest check-in details. Only present for guests that have check-in history.  | validation: maxItems 50
           - name: checkedIn | type: boolean | description: Whether this guest is checked in.  
           - name: checkInDate | type: Date | description: Date and time the guest checked in.  
           - name: checkInCanceledDate | type: Date | description: Date and time the guest canceled check-in.  
           - name: checkedInBy | type: string | description: GUID of the user who last performed check-in.  | validation: format GUID
           - name: checkInCanceledBy | type: string | description: GUID of the user who last canceled check-in.  | validation: format GUID
           - name: checkedInByStaffMember | type: string | description: GUID of the staff member who last performed check-in.  | validation: format GUID
           - name: checkInCanceledByStaffMember | type: string | description: GUID of the staff member who last canceled check-in.  | validation: format GUID
           - name: fullName | type: string | description: Full name of the guest. Only set for RSVP guests.  | validation: maxLength 101
     - name: attendanceStatus | type: AttendanceStatus | description: Attendance status. The attendance status updates based on status values in an RSVP object (for RSVP events) or in an Order object (for ticketed events). For more information, see [Guest Attendance Status Mapping](https://dev.wix.com/docs/api-reference/business-solutions/events/registration/event-guests/guest-attendance-status-mapping.md). <br/> <br/> **Note:** For `guestType` of `"BUYER"` or `"TICKET_HOLDER"` the `"IN_WAITLIST"` value is not applicable.  
         - enum:
         -     NOT_ATTENDING: Not attending.
         -     ATTENDING: Attending.
         -     IN_WAITLIST: In a waiting list.
     - name: secondaryLanguageCode | type: string | description: Secondary language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Used when the event ticket should be translated into another language.  | validation: format LANGUAGE
     - name: _createdDate | type: Date | description: Date and time the guest was created in `yyyy-mm-ddThh:mm:sssZ` format.  
     - name: _updatedDate | type: Date | description: Date and time the guest was updated in `yyyy-mm-ddThh:mm:sssZ` format.  
     - name: attendanceStatusUpdatedDate | type: Date | description: Date and time of guest's latest attendance status update.  
     - name: memberId | type: string | description: Site member GUID.  | validation: format GUID
     - name: guestType | type: GuestType | description: Guest type.  
         - enum:
         -     RSVP: An invited guest, no ticket necessary.
         -     BUYER: The guest who bought the ticket.
         -     TICKET_HOLDER: The guest for whom the ticket was bought.
     - name: locale | type: string | description: Locale in [IETF BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) format. Used when the event date and time on a ticket should be formatted into another locale.  | validation: format LANGUAGE_TAG
     - name: totalGuests | type: integer | description: Number of total guests in an event (registered guests + additional ones).  | read-only: true | validation: format int32
     - name: revision | type: string | description: Revision number, which increments by 1 each time the guest is updated.  | read-only: true | validation: format int64
     - name: additionalDetails | type: AdditionalDetails | description: Additional Details  | read-only: true 
        - name: _createdDate | type: Date | description: Date and time the source entity (RSVP or Order) was created.  
        - name: _updatedDate | type: Date | description: Date and time the source entity (RSVP or Order) was updated.  
        - name: rsvpStatus | type: RsvpStatus | description: Rsvp Status  
             - enum:
             -     YES: Guest is attending the event.
             -     NO: Guest isn't attending the event.
             -     WAITLIST: Guest is on a waitlist.
        - name: orderStatus | type: OrderStatus | description: Order Status  
             - enum:
             -     UNKNOW_ORDER_STATUS: Order status is not available for this request fieldset.
             -     FREE: Order is confirmed, no payment is required.
             -     PENDING: Order was paid, but the payment gateway suspended the payment.
             -     PAID: Order is paid.
             -     OFFLINE_PENDING: Order is confirmed but has be paid via offline payment. Status needs to be manually updated to `"PAID"`.
             -     INITIATED: Order is awaiting for payment at the cashier.
             -     CANCELED: Order is canceled.
             -     DECLINED: Order payment is declined.
             -     AUTHORIZED: Order payment is authorized.
             -     VOIDED: Order payment is voided.
             -     PARTIALLY_PAID: Order is partially paid with less than the total amount.
  - name: pagingMetadata | type: PagingMetadataV2 | description: Metadata for the paginated results.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: offset | type: integer | description: Offset that was requested.  | validation: format int32
     - name: total | type: integer | description: Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set.  | validation: format int32
     - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field.  
     - name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000


```

### Examples

### Retrieve all guests (with elevated permissions)
```javascript
import { guests } from "@wix/events";
import { auth } from "@wix/essentials";

const elevatedQueryGuests = auth.elevate(guests.queryGuests);

export async function myQueryGuestsFunction() {
  try {
    const items = await elevatedQueryGuests({ fields: ["GUEST_DETAILS"] }).find();
    console.log('Success! Guests: ', items);
    return items;
  } catch (error) {
    console.error(error);
    // Handle the error
  }
}

/* Promise resolves to:
 * {
 * "_items": [
 *  {
 *     "eventId": "3a80a30c-643d-4b11-b38f-1150dbe7c538",
 *     "orderNumber": "2SVV-RH7C-P3D",
 *     "tickets": [],
 *     "contactId": "c64c558f-ed41-4395-b820-f8dd66c31702",
 *     "guestDetails": {
 *      "email": "johndoe@mail.com",
 *       "firstName": "John",
 *       "lastName": "Doe",
 *       "formResponse": {
 *         "inputValues": [
 *          {
 *            "inputName": "firstName",
 *             "value": "John",
 *             "values": []
 *           },
 *           {
 *             "inputName": "lastName",
 *            "value": "Doe",
 *             "values": []
 *           },
 *           {
 *             "inputName": "email",
 *             "value": "johndoe@mail.com",
 *             "values": []
 *          }
 *         ]
 *       },
 *       "checkedIn": true
 *     }
 * ],
 * "_originQuery": {
 *   "filterTree": {
 *     "$and": []
 *   },
 *  "invalidArguments": [],
 *   "encoder": {},
 *   "transformationPaths": {},
 *   "sort": [],
 *   "paging": {},
 *   "pagingMethod": "CURSOR",
 *   "builderOptions": {
 *     "cursorWithEmptyFilterAndSort": true
 *   }
 * },
 * "_limit": 50,
 * "_nextCursor": "",
 * "_prevCursor": "",
 * "cursors": {
 *   "next": "",
 *   "prev": ""
 * }
 * }
 * } 
 */

```

### Retrieve all guests
```javascript
import { guests } from "@wix/events";

export async function myQueryGuestsFunction() {
  try {
    const items = await guests.queryGuests({ fields: ["GUEST_DETAILS"] }).find();
    console.log('Success! Guests: ', items);
    return items;
  } catch (error) {
    console.error(error);
    // Handle the error
  }
}

/* Promise resolves to:
 * {
 * "_items": [
 *  {
 *     "eventId": "3a80a30c-643d-4b11-b38f-1150dbe7c538",
 *     "orderNumber": "2SVV-RH7C-P3D",
 *     "tickets": [],
 *     "contactId": "c64c558f-ed41-4395-b820-f8dd66c31702",
 *     "guestDetails": {
 *      "email": "johndoe@mail.com",
 *       "firstName": "John",
 *       "lastName": "Doe",
 *       "formResponse": {
 *         "inputValues": [
 *          {
 *            "inputName": "firstName",
 *             "value": "John",
 *             "values": []
 *           },
 *           {
 *             "inputName": "lastName",
 *            "value": "Doe",
 *             "values": []
 *           },
 *           {
 *             "inputName": "email",
 *             "value": "johndoe@mail.com",
 *             "values": []
 *          }
 *         ]
 *       },
 *       "checkedIn": true
 *     }
 * ],
 * "_originQuery": {
 *   "filterTree": {
 *     "$and": []
 *   },
 *  "invalidArguments": [],
 *   "encoder": {},
 *   "transformationPaths": {},
 *   "sort": [],
 *   "paging": {},
 *   "pagingMethod": "CURSOR",
 *   "builderOptions": {
 *     "cursorWithEmptyFilterAndSort": true
 *   }
 * },
 * "_limit": 50,
 * "_nextCursor": "",
 * "_prevCursor": "",
 * "cursors": {
 *   "next": "",
 *   "prev": ""
 * }
 * }
 * } 
 */

```

### Query guests for an event
```javascript
import { guests } from "@wix/events";

const eventId = "201037a0-3ecc-4ee4-976b-a1c931c42a6b";

async function queryGuests() {
  const response = await guests
    .queryGuests()
    .eq("eventId", eventId)
    .limit(10)
    .find();
}

```

### queryGuests (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 { guests } from '@wix/events';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function queryGuests(query,options) {
  const response = await myWixClient.guests.queryGuests(query,options);
};
```

---