> 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 # Method name: updateTicketDefinition(_id: string, ticketDefinition: UpdateTicketDefinition, options: UpdateTicketDefinitionOptions) # Method package: wixEventsV2 # Method menu location: wixEventsV2 --> ticketDefinitionsV2 --> updateTicketDefinition # Method Link: https://dev.wix.com/docs/velo/apis/wix-events-v2/ticket-definitions-v2/update-ticket-definition.md # Method Description: > **Note:** This function replaces the deprecated `updateTicketDefinition()` function. The deprecated function will continue to work until November 8, 2024, but it will not receive updates. To keep any existing code compatible with future changes, see the [migration instructions](https://www.wix.com/velo/reference/wix-events-v2/ticketdefinitions/updateticketdefinition). Updates a ticket definition. Each time the ticket definition is updated, `revision` increments by 1. The existing `revision` must be included when updating the ticket definition. This ensures you're working with the latest ticket definition and prevents unintended overwrites. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## updateTicketDefinition example for dashboard page code ```javascript import { ticketDefinitionsV2 } from 'wix-events.v2'; async function updateTicketDefinition(id, ticketDefinition, options) { try { const result = await ticketDefinitionsV2.updateTicketDefinition(id, ticketDefinition, options); return result; } catch (error) { console.error(error); // Handle the error } } ``` ## updateTicketDefinition example for exporting from backend code ```javascript import { ticketDefinitionsV2 } from 'wix-events.v2'; import { webMethod, Permissions } from 'wix-web-module'; import { elevate } from 'wix-auth'; const elevatedUpdateTicketDefinition = elevate(ticketDefinitionsV2.updateTicketDefinition); export const updateTicketDefinition = webMethod( Permissions.Anyone, async (id, ticketDefinition, options) => { try { const result = await elevatedUpdateTicketDefinition(id, ticketDefinition, options); return result; } catch (error) { console.error(error); // Handle the error } } ); ``` ---