reorderTicketDefinitions( )


Changes ticket definitions order in an event dashboard and the list of available tickets in the ticket picker.

Note: It is possible to use both beforeTicketDefinitionId and afterTicketDefinitionId at the same time but only the last one defined will be executed.

Authentication

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permissions
Manage Events - all permissions
Manage Ticket Definitions
Learn more about app permissions.
Method Declaration
Copy
function reorderTicketDefinitions(
  eventId: string,
  options: ReorderTicketDefinitionsOptions,
): Promise<void>;
Method Parameters
eventIdstringRequired

Event ID.


optionsReorderTicketDefinitionsOptions

Optional fields.

JavaScript
import { ticketDefinitionsV2 } from "wix-events.v2"; async function reorderTicketDefinitions(eventId, options) { try { const result = await ticketDefinitionsV2.reorderTicketDefinitions( eventId, options, ); return result; } catch (error) { console.error(error); // Handle the error } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?