Search.../

deleteTicketDefinition( )

Developer Preview

Deletes a ticket definition.

Description

Does not affect tickets that were already ordered.

Note: Only visitors with Manage Ticket Definitions permissions can delete 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 deleteTicketDefinition(eventId: string, options: DeleteTicketDefinitionOptions): Promise<void>

deleteTicketDefinition Parameters

NAME
TYPE
DESCRIPTION
eventId
string

Event ID.

options
Optional
DeleteTicketDefinitionOptions

Details of tickets to delete.

Returns

Return Type:

Promise<
void
>

Was this helpful?

deleteTicketDefinition example

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