> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # UpdateTicket # Package: ticketing # Namespace: TicketManagement # Method link: https://dev.wix.com/docs/api-reference/business-solutions/events/registration/ticketing/tickets/update-ticket.md ## Permission Scopes: Manage Guest List: SCOPE.DC-EVENTS.MANAGE-GUEST-LIST ## Introduction Updates a ticket. --- ## REST API ### Schema ``` Method: updateTicket Description: Updates a ticket. URL: https://www.wixapis.com/events/v1/tickets/{ticketNumber} Method: PATCH Method parameters: param name: archived | type: archived | description: Whether to archive the ticket. param name: eventId | type: eventId | description: Event GUID to which the ticket belongs. param name: fields | type: fields | description: 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](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask) semantics. param name: guestDetails | type: GuestDetailsUpdate - name: form | type: FormResponse | description: Form of a guest assigned to a ticket. To update the form of a guest not assigned to a ticket, call Update Order. Doesn't support partial updates, the entire form object will be replaced when `guestDetails.form` is masked. - name: inputValues | type: array | description: Form field inputs. - name: inputName | type: string | description: Form field input name. - name: value | type: string | description: Form field value. - name: values | type: array | description: Form field values. Return type: UpdateTicketResponse - name: ticket | type: Ticket | description: Updated ticket. - name: ticketNumber | type: string | description: Unique ticket number which is assigned automatically when creating a ticket. - name: orderNumber | type: string | description: Associated order number. - name: ticketDefinitionId | type: string | description: Ticket definition GUID. See the Ticket Definition API for additional information. - name: name | type: string | description: Ticket type. - name: price | type: Money | description: Ticket price. - name: currency | type: string | description: 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `USD`. - name: value | type: string | description: Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, starts with a single (-), to indicate that the amount is negative. - name: free | type: boolean | description: Whether the ticket requires payment. - name: policy | type: string | description: Ticket and event policies. - name: checkIn | type: CheckIn | description: Ticket check-in. - name: created | type: string | description: Time of a ticket's check-in. - name: orderStatus | type: OrderStatus | description: Associated order status. - enum: - NA_ORDER_STATUS: Order status isn't available for this request fieldset. - FREE: Order is confirmed, no payment is required. - PENDING: Order was paid, but the payment gateway suspended the payment. - PAID: Order is paid. - OFFLINE_PENDING: Order is confirmed but must be paid via offline payment. Status needs to be manually updated to `"PAID"`. - INITIATED: Order is waiting for payment at the cashier. - CANCELED: Order is canceled. - DECLINED: Order payment is declined. - AUTHORIZED: Order payment is authorized. - VOIDED: Order payment is voided. - PARTIALLY_PAID: Order is partially paid with less than the total amount. - name: orderArchived | type: boolean | description: Whether the order and ticket are archived. If set to `true`, they aren't visible in the order list. - name: orderFullName | type: string | description: Buyer full name. - name: guestFullName | type: string | description: Guest full name. - name: guestDetails | type: GuestDetails | description: Guest personal details. - name: guestAssigned | type: boolean | description: Whether ticket belongs to assigned guest. - name: firstName | type: string | description: Guest first name. - name: lastName | type: string | description: Guest last name. - name: email | type: string | description: Guest email. - name: form | type: FormResponse | description: Full form response. - name: inputValues | type: array | description: Form field inputs. - name: inputName | type: string | description: Form field input name. - name: value | type: string | description: Form field value. - name: values | type: array | description: Form field values. - name: contactId | type: string | description: Contact GUID associated with this guest. - name: phone | type: string | description: Guest phone number. - name: archived | type: boolean | description: Whether the ticket is visible in an order. - name: memberId | type: string | description: Ticket owner member GUID. - name: anonymized | type: boolean | description: Whether ticket was anonymized by GDPR delete. Anonymized tickets no longer contain personally identifiable information (PII). - name: checkInUrl | type: string | description: 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"` - name: ticketPdfUrl | type: string | description: URL for ticket PDF download. - name: channel | type: ChannelType | description: Associated order checkout channel type. - enum: - ONLINE: Buyer created the order via an online channel, such as a website or mobile app. - OFFLINE_POS: Sales person created the order and collected the money. - name: walletPassUrl | type: string | description: URL to download a ticket in `.pkpass` format for Apple Wallet. - name: canceled | type: boolean | description: Whether ticket is canceled. ``` ### Examples ### Archive ticket Ticket can be archived and unarchived through ticket update. ```curl curl -X PATCH 'https://www.wixapis.com/events/v1/tickets/FNVL-NIJT-WP021' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d @- << EOF { "eventId": "ad18d12e-a6a9-4c17-abfa-6ff119479be2", "archived": true, "fields": { "paths": [ "archived" ] } } EOF ``` ### Update form of ticket guest Ticket guest form can be updated if a guest is assigned to the ticket. ```curl curl -X PATCH 'https://www.wixapis.com/events/v1/tickets/FNVL-NIJT-WP021' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d @- << EOF { "eventId": "ad18d12e-a6a9-4c17-abfa-6ff119479be2", "guestDetails": { "form": { "inputValues": [ { "inputName": "custom", "values": [ "Red", "green" ] }, { "inputName": "email", "value": "john.doe@example.com" }, { "inputName": "lastName", "value": "Doe" }, { "inputName": "firstName", "value": "Jonh" } ] } }, "fields": { "paths": [ "guestDetails.form" ] } } EOF ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.ticketing.TicketManagement.updateTicket(ticketNumber, options) Description: Updates a ticket. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: ticketNumber Method parameters: param name: options | type: UpdateTicketOptions none - name: eventId | type: string | description: Event GUID to which the ticket belongs. - name: fields | type: array | description: 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](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask) semantics. - name: archived | type: boolean | description: Whether to archive the ticket. - name: guestDetails | type: GuestDetailsUpdate | description: Assigned guest details. - name: form | type: FormResponse | description: Form of a guest assigned to a ticket. To update the form of a guest not assigned to a ticket, call Update Order. Doesn't support partial updates, the entire form object will be replaced when `guestDetails.form` is masked. - name: inputValues | type: array | description: Form field inputs. - name: inputName | type: string | description: Form field input name. - name: value | type: string | description: Form field value. - name: values | type: array | description: Form field values. param name: ticketNumber | type: string | description: Unique ticket number. | required: true Return type: PROMISE - name: ticket | type: Ticket | description: Updated ticket. - name: ticketNumber | type: string | description: Unique ticket number which is assigned automatically when creating a ticket. - name: orderNumber | type: string | description: Associated order number. - name: ticketDefinitionId | type: string | description: Ticket definition GUID. See the Ticket Definition API for additional information. - name: name | type: string | description: Ticket type. - name: price | type: Money | description: Ticket price. - name: currency | type: string | description: 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `USD`. - name: value | type: string | description: Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, starts with a single (-), to indicate that the amount is negative. - name: free | type: boolean | description: Whether the ticket requires payment. - name: policy | type: string | description: Ticket and event policies. - name: checkIn | type: CheckIn | description: Ticket check-in. - name: created | type: Date | description: Time of a ticket's check-in. - name: orderStatus | type: OrderStatus | description: Associated order status. - enum: - NA_ORDER_STATUS: Order status isn't available for this request fieldset. - FREE: Order is confirmed, no payment is required. - PENDING: Order was paid, but the payment gateway suspended the payment. - PAID: Order is paid. - OFFLINE_PENDING: Order is confirmed but must be paid via offline payment. Status needs to be manually updated to `"PAID"`. - INITIATED: Order is waiting for payment at the cashier. - CANCELED: Order is canceled. - DECLINED: Order payment is declined. - AUTHORIZED: Order payment is authorized. - VOIDED: Order payment is voided. - PARTIALLY_PAID: Order is partially paid with less than the total amount. - name: orderArchived | type: boolean | description: Whether the order and ticket are archived. If set to `true`, they aren't visible in the order list. - name: orderFullName | type: string | description: Buyer full name. - name: guestFullName | type: string | description: Guest full name. - name: guestDetails | type: GuestDetails | description: Guest personal details. - name: guestAssigned | type: boolean | description: Whether ticket belongs to assigned guest. - name: firstName | type: string | description: Guest first name. - name: lastName | type: string | description: Guest last name. - name: email | type: string | description: Guest email. - name: form | type: FormResponse | description: Full form response. - name: inputValues | type: array | description: Form field inputs. - name: inputName | type: string | description: Form field input name. - name: value | type: string | description: Form field value. - name: values | type: array | description: Form field values. - name: contactId | type: string | description: Contact GUID associated with this guest. - name: phone | type: string | description: Guest phone number. - name: archived | type: boolean | description: Whether the ticket is visible in an order. - name: memberId | type: string | description: Ticket owner member GUID. - name: anonymized | type: boolean | description: Whether ticket was anonymized by GDPR delete. Anonymized tickets no longer contain personally identifiable information (PII). - name: checkInUrl | type: string | description: 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"` - name: ticketPdfUrl | type: string | description: URL for ticket PDF download. - name: channel | type: ChannelType | description: Associated order checkout channel type. - enum: - ONLINE: Buyer created the order via an online channel, such as a website or mobile app. - OFFLINE_POS: Sales person created the order and collected the money. - name: walletPassUrl | type: string | description: URL to download a ticket in `.pkpass` format for Apple Wallet. - name: canceled | type: boolean | description: Whether ticket is canceled. ``` ### Examples ### updateTicket ```javascript import { tickets } from '@wix/events'; async function updateTicket(ticketNumber,options) { const response = await tickets.updateTicket(ticketNumber,options); }; ``` ### updateTicket (with elevated permissions) ```javascript import { tickets } from '@wix/events'; import { auth } from '@wix/essentials'; async function myUpdateTicketMethod(ticketNumber,options) { const elevatedUpdateTicket = auth.elevate(tickets.updateTicket); const response = await elevatedUpdateTicket(ticketNumber,options); } ``` ### updateTicket (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { tickets } from '@wix/events'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { tickets }, // Include the auth strategy and host as relevant }); async function updateTicket(ticketNumber,options) { const response = await myWixClient.tickets.updateTicket(ticketNumber,options); }; ``` ---