Search.../

listTickets( )

Developer Preview

Retrieves a list of up to 100 tickets.

Description

Note: This function is restricted and only runs if you elevate permissions using the wix-auth.elevate() function.

Syntax

function listTickets(eventId: Array<string>, options: ListTicketsOptions): Promise<ListTicketsResponse>

listTickets Parameters

NAME
TYPE
DESCRIPTION
eventId
Array<
string
>

Event IDs.

options
Optional
ListTicketsOptions

Options for defining the returned list of tickets.

Returns

Return Type:

Promise<
ListTicketsResponse
>
NAME
TYPE
DESCRIPTION
facets
Record<
string

FacetCounts
>

Facets.

limit
number

Limit.

offset
number

Offset.

tickets
Array<
TicketingTicket
>

Tickets.

total
number

Total tickets matching the given filters.

Was this helpful?

listTickets example

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