Search.../

listTicketDefinitions( )

Developer Preview

Retrieves a list of up to 100 ticket definitions, with basic filter support.

Description

Note: Only visitors with Manage Orders or Manage Ticket Definitions permissions can retrieve a list of ticket definitions. You can override the permissions with the wix-auth elevate() function.

Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Syntax

function listTicketDefinitions(options: ListTicketDefinitionsOptions): Promise<ListTicketDefinitionsResponse>

listTicketDefinitions Parameters

NAME
TYPE
DESCRIPTION
options
Optional
ListTicketDefinitionsOptions

Details for the tickets to retrieve.

Returns

Return Type:

Promise<
ListTicketDefinitionsResponse
>
NAME
TYPE
DESCRIPTION
definitions
Array<
TicketDefinition
>

Retrieved ticket definitions.

facets
Record<
string

FacetCounts
>

Filter facets.

metaData
ResponseMetaData

Meta data.

Was this helpful?

listTicketDefinitions example

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