Search.../

items

Returns an array of guests items that match the query.

Description

items contains the current page of results retrieved by the query. If no results match the query, items is an empty array. The page size is defined by the limit() function and can be retrieved using the pageSize property. You can use the next() and prev() functions returned by guests to navigate the pages of a query result.

Type:

Array<
EventGuest
>
NAME
TYPE
DESCRIPTION
_createdDate
Date

Date and time the guest was created in yyyy-mm-ddThh:mm:sssZ format.

_id
string

Guest ID.

_updatedDate
Date

Date and time the guest was updated in yyyy-mm-ddThh:mm:sssZ format.

attendanceStatus
string

Attendance status.

Note: For guestType BUYER or TICKET_HOLDER the IN_WAITLIST value is not applicable.

attendanceStatusUpdatedDate
Date

Date and time of guest's latest attendance status update.

contactId
string

Guest's contact ID. See Contacts API for more details.

eventId
string

Event ID.

guestDetails
GuestDetails

Guest details.

Returned only when the guestDetails fieldset is sent in the request.

guestType
string

Guest type:

RSVP: An invited guest, no ticket necessary.

BUYER: The guest who bought the tickets.

TICKET_HOLDER: The guest for whom the ticket was bought.

locale
string

Locale in IETF BCP 47 format. Used when the event date and time on a ticket should be formatted into another locale.

memberId
string

Site member ID.

orderNumber
string

Order number.

Note: Only applicable when guestType is BUYER or TICKET_HOLDER.

rsvpId
string

RSVP ID.

Note: Only applicable when guestType is RSVP.

secondaryLanguageCode
string

Secondary language code in ISO 639-1 format. Used when the event ticket should be translated into another language.

ticketNumber
string

Ticket number.

Note: Only applicable when guestType is TICKET_HOLDER.

tickets
Array<
TicketDetails
>

List of names, numbers, and definition IDs for each ticket.

Was this helpful?

Get items from a query result

Copy Code
1const returnedItems = results.items;
2
Perform a query and get items from the result

Copy Code
1import { guests } from 'wix-events.v2';
2
3export async function myQueryFunction() {
4 const results = await guests.queryGuests().find();
5
6 const returnedItems = results.items;
7
8 if (returnedItems.length > 0) {
9 return items;
10 } else {
11 // Handle if no matching items found
12 }
13}
14