Deletes multiple ticket definitions.
All ticket definitions that meet the specified filter
criteria are deleted.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
function bulkDeleteTicketDefinitionsByFilter(
filter: Record<string, any>,
): Promise<void>;
Filter object in the following format:
"filter" : { "fieldName1": "value1" }
.
Example:
"filter" : { "eventId": "3d3d5c04-ece0-45a8-85f0-11a58edaa192" }
import { ticketDefinitionsV2 } from "wix-events.v2";
async function bulkDeleteTicketDefinitionsByFilter(filter) {
try {
const result =
await ticketDefinitionsV2.bulkDeleteTicketDefinitionsByFilter(filter);
return result;
} catch (error) {
console.error(error);
// Handle the error
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.