Search.../

getTicketDefinition( )

Developer Preview

Retrieves a ticket definition.

Description

Note: Only visitors with Manage Orders or Manage Ticket Definitions permissions can get a ticket definition. 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 getTicketDefinition(definitionId: string, options: GetTicketDefinitionOptions): Promise<GetTicketDefinitionResponse>

getTicketDefinition Parameters

NAME
TYPE
DESCRIPTION
definitionId
string

Ticket definition ID.

options
Optional
GetTicketDefinitionOptions

Details for the ticket to retrieve.

Returns

Return Type:

Promise<
GetTicketDefinitionResponse
>
NAME
TYPE
DESCRIPTION
definition
TicketDefinition

Retrieved ticket definition.

Was this helpful?

getTicketDefinition example

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