Search.../

updateTicket( )

Developer Preview

Updates a ticket.

Description

Note: This function is restricted and only runs if you elevate permissions using the wix-auth.elevate() function.

Syntax

function updateTicket(identifiers: UpdateTicketIdentifiers, fields: Array<string>, options: UpdateTicketOptions): Promise<UpdateTicketResponse>

updateTicket Parameters

NAME
TYPE
DESCRIPTION
identifiers
UpdateTicketIdentifiers

Details for the ticket to update.

fields
Array<
string
>

Set of field paths, specifying which parts of this resource to update. When fields is empty, the request is interpreted as a full update. Behavior follows google.protobuf.FieldMask semantics.

options
Optional
UpdateTicketOptions

Ticket details to update.

Returns

Return Type:

Promise<
UpdateTicketResponse
>
NAME
TYPE
DESCRIPTION
ticket
TicketingTicket

Updated ticket.

Was this helpful?

updateTicket example

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