Search.../

getTicket( )

Retrieves a ticket by the unique ticket number.

Admin Method

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

Syntax

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

getTicket Parameters

NAME
TYPE
DESCRIPTION
identifiers
GetTicketIdentifiers

Details for the ticket to retrieve.

options
Optional
GetTicketOptions

Options for the returned ticket data.

Returns

Ticket.

Return Type:

Promise<
TicketingTicket
>
NAME
TYPE
DESCRIPTION
anonymized
boolean

Whether ticket was anonymized by GDPR delete. Anonymized tickets no longer contain personally identifiable information (PII).

archived
boolean

Whether the ticket is visible in an order.

channel
string

Associated order checkout channel type.

checkIn
CheckIn

Ticket check-in.

checkInUrl
string

Ticket check-in URL. Shown as QR code image in PDF.

Format: https://www.wixevents.com/check-in/{ticket number},{event id}

Example: https://www.wixevents.com/check-in/AAAA-AAAA-BB021,00000000-0000-0000-0000-000000000000

free
boolean

Whether ticket requires payment.

guestDetails
GuestDetails

Guest personal details.

guestFullName
string

Guest full name.

memberId
string

Ticket owner member ID.

name
string

Ticket name.

orderArchived
boolean

Whether order and ticket are visible in order list.

orderFullName
string

Buyer full name.

orderNumber
string

Associated order number.

orderStatus
string

Associated order status. Possible values:

  • FREE: The order is confirmed, no payment is required.
  • PENDING: The order was paid, but the payment gateway suspended the payment.
  • PAID: The order is paid.
  • OFFLINE_PENDING: The order is confirmed but has to be paid in cash and the status is manually updated to PAID.
  • INITIATED: The order is awaiting for payment.
  • CANCELED: The order is canceled.
  • DECLINED: The order is declined.
policy
string

Ticket and event policies.

price
Money

Ticket price.

ticketDefinitionId
string

Ticket definition ID.

ticketNumber
string

A unique ticket number which is assigned automatically when creating a ticket.

ticketPdfUrl
string

URL for ticket PDF download.

walletPassUrl
string

An URL to download a ticket in the .pkpass format for Apple Wallet.

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