getTicketDefinition( )
Retrieves a ticket definition.
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<TicketDefinition>
getTicketDefinition Parameters
NAME
TYPE
DESCRIPTION
Ticket definition ID.
Details for the ticket to retrieve.
Returns
Retrieved ticket definition.
Return Type:
NAME
TYPE
DESCRIPTION
Ticket definition ID.
Sensitive dashboard data.
Ticket description.
Event ID associated with the ticket.
Whether the ticket is free (read only).
Limit of tickets that can be purchased per checkout. Set to 20 for unlimited ticket definition.
Ticket name.
Custom sort index.
Policy information plain text block, as printed on the ticket.
Ticket price.
Ticket pricing.
Ticket sale period.
Ticket sale status.
Ticket state.
Configuration of the fixed-rate Wix service fee that is applied at checkout to each ticket sold.
Was this helpful?
getTicketDefinition example
1import { ticketDefinitions } from 'wix-events.v2';23 async function getTicketDefinition(definitionId, options) {4 try {5 const result = await ticketDefinitions.getTicketDefinition(definitionId, options);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13