listTicketDefinitions( )


Deprecated. This function will continue to work until November 8, 2024, but a substitute is available. Use the queryTicketDefinitions() function instead.

Migration Instructions. If this function is already in your code, it will continue to work. To stay compatible with future changes, migrate to queryTicketDefinitions(). To migrate to the new function:

  1. Add the new import statement:
Copy
import { ticketDefinitionsV2 } from "wix-events.v2";
  1. Look for any code that uses ticketDefinitions.queryTicketDefinitions(), and replace it with ticketDefinitionsV2.queryTicketDefinitions(). Update your code to work with the new queryTicketDefinition() response properties.
  2. Test your changes to make sure your code behaves as expected.

Retrieves a list of up to 100 ticket definitions, with basic filter support.

Authentication

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

Permissions
Manage Events - all permissions
Manage Orders
Manage Ticket Definitions
Learn more about app permissions.
Method Declaration
Copy
function listTicketDefinitions(
  options: ListTicketDefinitionsOptions,
): Promise<ListTicketDefinitionsResponse>;
Method Parameters
optionsListTicketDefinitionsOptions

Details for the tickets to retrieve.

Returns
Return Type:Promise<ListTicketDefinitionsResponse>

This example uses a deprecated function.

JavaScript
import { ticketDefinitions } from "wix-events.v2"; async function listTicketDefinitions(options) { try { const result = await ticketDefinitions.listTicketDefinitions(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?