Search.../

updateTicketDefinition( )

Developer Preview

Updates a ticket definition.

Description

Note: Only visitors with Manage Ticket Definitions permissions can update 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 updateTicketDefinition(identifiers: UpdateTicketDefinitionIdentifiers, options: UpdateTicketDefinitionOptions): Promise<UpdateTicketDefinitionResponse>

updateTicketDefinition Parameters

NAME
TYPE
DESCRIPTION
identifiers
UpdateTicketDefinitionIdentifiers

Details of the ticket definition to update.

options
Optional
UpdateTicketDefinitionOptions

Ticket definition details to update.

Returns

Return Type:

Promise<
UpdateTicketDefinitionResponse
>
NAME
TYPE
DESCRIPTION
definition
TicketDefinition

Updated ticket definition.

Was this helpful?

updateTicketDefinition example

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