Search.../

queryTicketDefinitions( )

Developer Preview

Retrieves a list of up to 100 ticket definitions, supporting structurized queries.

Admin Method

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

Syntax

function queryTicketDefinitions(options: QueryTicketDefinitionsOptions): Promise<QueryTicketDefinitionsResponse>

queryTicketDefinitions Parameters

NAME
TYPE
DESCRIPTION
options
Optional
QueryTicketDefinitionsOptions

Returns

Return Type:

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

Ticket definitions.

facets
Record<
string

FacetCounts
>

Filter facets.

limit
number

Limit.

offset
number

Offset.

total
number

Total ticket definitions matching the given filters.

Was this helpful?

queryTicketDefinitions example

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