Setup
To use the TicketDefinitionsV2 API, install the @wix/events
package using npm or Yarn:
Copy
1npm install @wix/events
or
Copy
1yarn add @wix/events
Then import { ticketDefinitionsV2 }
from @wix/events
:
Copy
1import { ticketDefinitionsV2 } from '@wix/events'
Was this helpful?
Yes
No
createTicketDefinition( )
Creates a ticket definition.
It is allowed to create up to 100 definitions per event.
Permission Scopes
For app development, you must have one of the following permission scopes:Learn more about permission scopes.
Copy
function createTicketDefinition(ticketDefinition: TicketDefinition, options: CreateTicketDefinitionOptions): Promise<TicketDefinition>
Method Parameters
ticketDefinitionTicketDefinitionRequired
Ticket definition info.
optionsCreateTicketDefinitionOptions
Optional fields.
Returns
Return Type:Promise<TicketDefinition>
Was this helpful?
Yes
No
getTicketDefinition( )
Retrieves a ticket definition.
Permission Scopes
For app development, you must have one of the following permission scopes:Learn more about permission scopes.
Copy
function getTicketDefinition(ticketDefinitionId: string, options: GetTicketDefinitionOptions): Promise<TicketDefinition>
Method Parameters
ticketDefinitionIdstringRequired
Ticket definition ID.
optionsGetTicketDefinitionOptions
Optional fields.
Returns
Return Type:Promise<TicketDefinition>
Was this helpful?
Yes
No
queryTicketDefinitions( )
Retrieves a list of ticket definitions, given the provided paging, filtering, and sorting. Query Ticket Definitions runs with these defaults, which you can override:
createdDate
is sorted inASC
orderpaging.limit
is100
paging.offset
is0
For field support for filters and sorting, see Ticket Definitions: Supported Filters and Sorting. To learn about working with Query endpoints, see API Query Language, Sorting and Paging, and Field Projection.
Permission Scopes
For app development, you must have one of the following permission scopes:Learn more about permission scopes.
Copy
function queryTicketDefinitions(query: QueryV2, options: QueryTicketDefinitionsOptions): Promise<QueryTicketDefinitionsResponse>
Method Parameters
queryQueryV2Required
Query options. See API Query Language for more details.
optionsQueryTicketDefinitionsOptions
Optional fields.
Returns
Return Type:Promise<QueryTicketDefinitionsResponse>
Was this helpful?
Yes
No