> 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 # DeleteTicketDefinition # Package: eventManagement # Namespace: TicketDefinitionManagement # Method link: https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/ticket-definitions-v3/delete-ticket-definition.md ## Permission Scopes: Manage Ticket Definitions: SCOPE.DC-EVENTS.MANAGE-TICKET-DEF ## Introduction Deletes a ticket definition. --- ## REST API ### Schema ``` Method: deleteTicketDefinition Description: Deletes a ticket definition. URL: https://www.wixapis.com/events/v3/ticket-definitions/{ticketDefinitionId} Method: DELETE # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: ticketDefinitionId Method parameters: param name: ticketDefinitionId | type: none | required: true Return type: DeleteTicketDefinitionResponse EMPTY-OBJECT {} ``` ### Examples ### Delete ticket definition ```curl curl -X DELETE 'https://www.wixapis.com/events/v3/ticket-definitions/625115fd-31cb-4f64-b7bd-06c3137486c0' \ -H 'Authorization: ' \ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.eventManagement.TicketDefinitionManagement.deleteTicketDefinition(ticketDefinitionId) Description: Deletes a ticket definition. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: ticketDefinitionId Method parameters: param name: ticketDefinitionId | type: string | description: GUID of the ticket definition to delete. | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### deleteTicketDefinition ```javascript import { ticketDefinitionsV2 } from '@wix/events'; async function deleteTicketDefinition(ticketDefinitionId) { const response = await ticketDefinitionsV2.deleteTicketDefinition(ticketDefinitionId); }; ``` ### deleteTicketDefinition (with elevated permissions) ```javascript import { ticketDefinitionsV2 } from '@wix/events'; import { auth } from '@wix/essentials'; async function myDeleteTicketDefinitionMethod(ticketDefinitionId) { const elevatedDeleteTicketDefinition = auth.elevate(ticketDefinitionsV2.deleteTicketDefinition); const response = await elevatedDeleteTicketDefinition(ticketDefinitionId); } ``` ### deleteTicketDefinition (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 { ticketDefinitionsV2 } from '@wix/events'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { ticketDefinitionsV2 }, // Include the auth strategy and host as relevant }); async function deleteTicketDefinition(ticketDefinitionId) { const response = await myWixClient.ticketDefinitionsV2.deleteTicketDefinition(ticketDefinitionId); }; ``` ---