Search.../

getTicket( )

Developer Preview

Retrieves a ticket by unique ticket number.

Description

Note: The fieldsets in this function are restricted and only run if you elevate permissions using the wix-auth.elevate() function.

Syntax

function getTicket(identifiers: GetTicketIdentifiers, options: GetTicketOptions): Promise<GetTicketResponse>

getTicket Parameters

NAME
TYPE
DESCRIPTION
identifiers
GetTicketIdentifiers

Details for the ticket to retrieve.

options
Optional
GetTicketOptions

Options for the returned ticket data.

Returns

Return Type:

Promise<
GetTicketResponse
>
NAME
TYPE
DESCRIPTION
ticket
TicketingTicket

Ticket.

Was this helpful?

getTicket example

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