> 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
# QueryTicketDefinitions
# Package: eventManagement
# Namespace: TicketDefinitionManagement
# Method link: https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/ticket-definitions-v3/query-ticket-definitions.md
## Permission Scopes:
Manage Ticket Definitions: SCOPE.DC-EVENTS.MANAGE-TICKET-DEF
## Introduction
Retrieves a list of ticket definitions with the specified paging, filtering, and sorting.
Query Ticket Definitions runs with these defaults, which you can override:
- `createdDate` is sorted in `ASC` order
- `paging.limit` is `100`
- `paging.offset` is `0`
To learn about working with _Query_ methods, see [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language.md).
---
## REST API
### Schema
```
Method: queryTicketDefinitions
Description: Retrieves a list of ticket definitions with the specified paging, filtering, and sorting. Query Ticket Definitions runs with these defaults, which you can override: - `createdDate` is sorted in `ASC` order - `paging.limit` is `100` - `paging.offset` is `0`
To learn about working with _Query_ methods, see [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language.md).
URL: https://www.wixapis.com/events/v3/ticket-definitions/query
Method: POST
# Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
Required parameters: query
Method parameters:
param name: fields | type: array | description: Predefined sets of fields to return.
- enum:
- SALES_DETAILS: Returns `salesDetails` in the response.
- EVENT_DETAILS: Returns `eventDetails` in the response.
- SEATING_DETAILS: Returns `seatingDetails` with available seats in the response.
param name: query | type: QueryV2 | required: true
- name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort` parameters.
- name: limit | type: integer | description: Number of items to load per page.
- name: cursor | type: string | description: Pointer to the next or previous page in the list of results. You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.
- name: filter | type: object | description: Filter object in the following format:
`"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }`.
**Example:**
`"filter" : { "id": "2224a9d1-79e6-4549-a5c5-bf7ce5aac1a5", "revision": {"$ne":"1"} }`
- name: sort | type: array | description: Sort object in the following format:
`[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`
**Example:**
`[{"fieldName":"createdDate","direction":"DESC"}]`
See [supported fields](https://dev.wix.com/api/rest/wix-events/policy-v2/filter-and-sort) for more information.
- name: fieldName | type: string | description: Name of the field to sort by.
- name: order | type: SortOrder | description: Defaults to `ASC`
- enum: ASC, DESC
Return type: QueryTicketDefinitionsResponse
- name: ticketDefinitions | type: array | description: List of ticket definitions.
- name: id | type: string | description: Ticket definition GUID.
- name: eventId | type: string | description: Event GUID to which the ticket definition belongs.
- name: revision | type: string | description: Revision number, which increments by 1 each time the ticket definition is updated. To prevent conflicting changes, the existing `revision` must be used when updating a ticket definition.
- name: createdDate | type: string | description: Date and time the ticket definition was created.
- name: updatedDate | type: string | description: Date and time the ticket definition was updated.
- name: name | type: string | description: Ticket definition name.
- name: description | type: string | description: Ticket definition description.
- name: policyText | type: string | description: Ticket definition policy.
- name: hidden | type: boolean | description: Whether this ticket definition is hidden from site visitors and can't be purchased.
- name: limited | type: boolean | description: Whether the ticket has a limited maximum quantity.
- name: initialLimit | type: integer | description: The maximum number of tickets that can be sold for the event when first defining the event. If a seating map is defined after you created a ticket definition, this property is ignored and `actualLimit` is used instead. To create unlimited tickets, skip this field in the request.
- name: actualLimit | type: integer | description: The maximum number of tickets that can be sold for the event after adding a seating map to the event. If no seating map is defined, this property is the same as `initialLimit`.
- name: pricingMethod | type: PricingMethod | description: Ticket pricing method.
- ONE-OF:
- name: fixedPrice | type: Money | description: Same ticket price for everyone.
- name: value | type: string | description: Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative.
- name: currency | type: string | description: Currency code. Must be a valid [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) currency code (e.g., USD).
- name: guestPrice | type: Money | description: Guests choose how much they'd like to pay for the ticket. You can set the minimum price, or specify `"0"` in the request to make the ticket free. The price can be updated to a higher amount by a guest during the checkout.
- name: pricingOptions | type: PricingOptions | description: Sets of various ticket prices. For example, you can charge different prices for children and adults.
- name: optionDetails | type: array | description: Ticket price options.
- name: optionId | type: string | description: Ticket price option GUID.
- name: name | type: string | description: Ticket price option name, such as "Child Ticket".
- name: price | type: Money | description: Ticket price.
- name: pricingType | type: Type | description: Ticket price type.
- enum:
- STANDARD: All money goes to a seller. Applies to all ticket pricing methods except for `guestPrice`.
- DONATION: All collected money is a donation. This pricing type is automatically assigned when you select the `guestPrice` pricing method.
- name: free | type: boolean | description: Whether the ticket is free. To create a free ticket, enter `"0"` in `pricingMethod.fixedPrice.value`.
- name: feeType | type: Type | description: Type of ticket service fee to collect.
- enum:
- FEE_INCLUDED: The fee is deducted from the ticket price for a seller.
For example, if you're selling tickets for $10, then a ticket service fee of $0.25 will be deducted from the price and you'll get $9.75.
- FEE_ADDED_AT_CHECKOUT: The fee is shown in addition to the ticket price at checkout and a guest pays the fee.
For example, if you sell tickets for $10, a customer will see a ticket service fee of $0.25 and will pay $10.25 in total.
- NO_FEE: Ticket service fee isn't collected. Available only for free tickets and legacy Wix users.
- name: salePeriod | type: SalePeriod | description: Ticket sale period.
- name: startDate | type: string | description: Date and time the ticket sale starts. Rounded down to the nearest minute.
- name: endDate | type: string | description: Date and time the ticket sale ends. Rounded down to the nearest minute.
- name: displayNotOnSale | type: boolean | description: Whether to display the ticket if it's not available to buy.
- name: saleStatus | type: Status | description: Ticket sale status.
- enum:
- SALE_SCHEDULED: Tickets aren't on sale yet.
- SALE_STARTED: Tickets are on sale.
- SALE_ENDED: Tickets are no longer on sale.
- name: salesDetails | type: SalesDetails | description: Ticket sales information.
**Note:** This field is only returned when `SALES_DETAILS` is specified in `field` in the request.
- name: unsoldCount | type: integer | description: Number of tickets that haven't been purchased yet. The field is `null` if the ticket quantity is unlimited.
- name: soldCount | type: integer | description: Number of purchased tickets.
- name: reservedCount | type: integer | description: Number of reserved tickets.
- name: soldOut | type: boolean | description: Whether the tickets are sold out.
- name: limitPerCheckout | type: integer | description: Number of tickets that can be purchased per checkout.
**Note:** If the `actualLimit` or `salesDetails.unsoldCount` field value is smaller than `limitPerCheckout`, then it overrides this field.
- name: extendedFields | type: ExtendedFields | description: Data extensions.
- name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).
- name: eventDetails | type: EventDetails | description: Information about the even the ticket is for.
**Note:** This field is only returned when `EVENT_DETAILS` is specified in `field` in the request.
- name: title | type: string | description: Event title.
- name: shortDescription | type: string | description: Short description of the event.
- name: location | type: Location | description: Event location.
- name: name | type: string | description: Location name. This value is displayed instead of the address when the location is defined as TBD by setting the `locationTbd` property to `true`.
- name: type | type: LocationType | description: Location type.
- enum:
- VENUE: Event is on-site at a specific physical location.
- ONLINE: Event is online, such as a virtual video conference.
- name: address | type: Address | description: Exact location address.
- ONE-OF:
- name: streetAddress | type: StreetAddress | description: Street address.
- name: number | type: string | description: Street number.
- name: name | type: string | description: Street name.
- name: addressLine | type: string | description: Primary address information (street and building number).
- name: country | type: string | description: 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format.
- name: subdivision | type: string | description: Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2).
- name: city | type: string | description: City name.
- name: postalCode | type: string | description: Zip or postal code.
- name: addressLine2 | type: string | description: Secondary address information (suite or apartment number and room number).
- name: locationTbd | type: boolean | description: Whether the event location is TBD.
- name: dateAndTimeSettings | type: DateAndTimeSettings | description: Event date and time settings.
- name: dateAndTimeTbd | type: boolean | description: Whether the event date and time are TBD.
- name: dateAndTimeTbdMessage | type: string | description: Message that is displayed when time and date is TBD. **Note:** This field is only used when the `dateAndTimeTbd` field value is `true`.
- name: startDate | type: string | description: Event start date. **Note:** This field is only returned when the `dateAndTimeTbd` field value is `false`.
- name: endDate | type: string | description: Event end date. **Note:** This field is only returned when the `dateAndTimeTbd` field value is `false`.
- name: timeZoneId | type: string | description: Event time zone GUID in the [TZ database](https://www.iana.org/time-zones) format. **Note:** This field is only returned when the `dateAndTimeTbd` field value is `false`.
- name: hideEndDate | type: boolean | description: Whether the end date is hidden in the formatted date and time.
- name: showTimeZone | type: boolean | description: Whether the time zone is displayed in the formatted schedule.
- name: recurrenceStatus | type: Status | description: Repeating event status.
- enum:
- ONE_TIME: Event happens only once and can last multiple days.
- RECURRING: A series of events that repeat.
- RECURRING_UPCOMING: Next event in a schedule of recurring events.
- RECURRING_RECENTLY_ENDED: Latest event that ended in a schedule of recurring events.
- RECURRING_RECENTLY_CANCELED: Latest canceled event in a schedule of recurring events
- name: recurringEvents | type: Recurrences | description: Event repetitions.
- name: individualEventDates | type: array | description: Individual event dates for recurring events. *Note:** Each date must be manually calculated and provided. There is no support for automatic generation using recurrence rules or patterns (for example, "Weekly"). When you create a recurring event: - Each occurrence is created as an independent event with its own unique GUID. - All occurrences in the series share the same `categoryId`, which allows you to identify all events in the recurring series. - To retrieve all events in a recurring series, query events by `recurringEvents.categoryId`. - Each event in the series can be independently updated or deleted using its individual event GUID.
- name: startDate | type: string | description: Event start date.
- name: endDate | type: string | description: Event end date.
- name: timeZoneId | type: string | description: Event time zone GUID in the [TZ database](https://www.iana.org/time-zones) format.
- name: showTimeZone | type: boolean | description: Whether the time zone is displayed in a formatted schedule.
- name: categoryId | type: string | description: Recurring event category GUID. This read-only field is automatically generated and shared by all events in a recurring series. Use this GUID to query and retrieve all occurrences of a recurring event.
- name: formatted | type: Formatted | description: Formatted date and time settings.
- name: dateAndTime | type: string | description: Formatted date and time representation.
Example of formatting when an event lasts multiple days and is in the UTC time zone: `September 1, 2015 at 10:20 AM – September 5, 2015 at 12:14 PM`.
Example of formatting when an event lasts 1 day and is in the GMT+2 time zone: `February 1, 2018, 12:10 – 2:50 PM GMT+2`.
- name: startDate | type: string | description: Formatted start date of the event. Empty for TBD schedules.
- name: startTime | type: string | description: Formatted start time of the event. Empty for TBD schedules.
- name: endDate | type: string | description: Formatted end date of the event. Empty for TBD schedules or when the end date is hidden.
- name: endTime | type: string | description: Formatted end time of the event. Empty for TBD schedules or when the end date is hidden.
- name: eventPageUrl | type: PageUrl | description: Event page URL components.
- name: base | type: string | description: The base URL. For premium sites, the base is the domain. For free sites, the base is the Wix site URL (for example, `https://mysite.wixsite.com/mysite`).
- name: path | type: string | description: The path to the page. For example, `/product-page/a-product`.
- name: status | type: Status | description: Event status.
- enum:
- UPCOMING: Event is published and scheduled to start.
- STARTED: Event has started.
- ENDED: Event has ended.
- CANCELED: Event is canceled.
- DRAFT: Event is not public.
- name: seatingDetails | type: SeatingDetails | description: Seating information including available seats and areas for this ticket definition.
**Note:** This field is only returned when `SEATING_DETAILS` is specified in `field` in the request, and when the event has a [seating plan](https://support.wix.com/en/article/wix-events-creating-a-seating-map).
- name: places | type: array | description: List of available places.
- name: placeId | type: string | description: Place GUID in the format `{sectionId}-{elementId}-{label}`. For example, `0-1-A5`.
- name: label | type: string | description: Human-readable label for this place, such as `A1`, `12`, or `VIP1`.
- name: sectionLabel | type: string | description: High-level division of the venue, where the place is located, such as `Orchestra`, `Balcony`, or `VIP Section`.
- name: elementLabel | type: string | description: Seating element within the section, such as `Row`, `Table`, or `General Admission`.
- name: availableCapacity | type: integer | description: Available capacity at this place. For general seating type returns the number of remaining spots. For other types returns `1`. For example, if a table has 5 chairs, each chair is treated as a separate place, which has a capacity of 1.
- name: metadata | type: PagingMetadataV2 | description: Metadata for the paginated results.
- name: count | type: integer | description: Number of items returned in the response.
- name: offset | type: integer | description: Offset that was requested.
- name: total | type: integer | description: Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set.
- name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field.
- name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used.
- name: next | type: string | description: Cursor pointing to next page in the list of results.
- name: prev | type: string | description: Cursor pointing to previous page in the list of results.
```
### Examples
### Query ticket definitions by created date with sales details
```curl
curl -X POST 'https://www.wixapis.com/events/v3/ticket-definitions/query' \
-H 'Content-Type: application/json' \
-H 'Authorization: ' \
-d '{
"query": {
"filter": {
"createdDate": {
"$gt": "2023-05-25T00:00:00.000Z"
}
},
"fields": [ "SALES_DETAILS" ]
}
}'
```
---
## JavaScript SDK
### Schema
```
Method: wixClientAdmin.eventManagement.TicketDefinitionManagement.queryTicketDefinitions(query, options)
Description: Retrieves a list of ticket definitions with the specified paging, filtering, and sorting. Query Ticket Definitions runs with these defaults, which you can override: - `createdDate` is sorted in `ASC` order - `paging.limit` is `100` - `paging.offset` is `0`
To learn about working with _Query_ methods, see [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language.md).
# Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
Required parameters: query
Method parameters:
param name: options | type: QueryTicketDefinitionsOptions none
- name: fields | type: array | description: Predefined sets of fields to return.
- enum:
- SALES_DETAILS: Returns `salesDetails` in the response.
- EVENT_DETAILS: Returns `eventDetails` in the response.
- SEATING_DETAILS: Returns `seatingDetails` with available seats in the response.
param name: query | type: TicketDefinitionQuery | required: true
- name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort` parameters.
- name: limit | type: integer | description: Number of items to load per page.
- name: cursor | type: string | description: Pointer to the next or previous page in the list of results. You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.
- name: filter | type: object | description: Filter object in the following format:
`"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }`.
**Example:**
`"filter" : { "id": "2224a9d1-79e6-4549-a5c5-bf7ce5aac1a5", "revision": {"$ne":"1"} }`
- name: sort | type: array | description: Sort object in the following format:
`[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`
**Example:**
`[{"fieldName":"createdDate","direction":"DESC"}]`
See [supported fields](https://dev.wix.com/api/rest/wix-events/policy-v2/filter-and-sort) for more information.
- name: fieldName | type: string | description: Name of the field to sort by.
- name: order | type: SortOrder | description: Defaults to `ASC`
- enum: ASC, DESC
Return type: PROMISE
- name: ticketDefinitions | type: array | description: List of ticket definitions.
- name: _id | type: string | description: Ticket definition GUID.
- name: eventId | type: string | description: Event GUID to which the ticket definition belongs.
- name: revision | type: string | description: Revision number, which increments by 1 each time the ticket definition is updated. To prevent conflicting changes, the existing `revision` must be used when updating a ticket definition.
- name: _createdDate | type: Date | description: Date and time the ticket definition was created.
- name: _updatedDate | type: Date | description: Date and time the ticket definition was updated.
- name: name | type: string | description: Ticket definition name.
- name: description | type: string | description: Ticket definition description.
- name: policyText | type: string | description: Ticket definition policy.
- name: hidden | type: boolean | description: Whether this ticket definition is hidden from site visitors and can't be purchased.
- name: limited | type: boolean | description: Whether the ticket has a limited maximum quantity.
- name: initialLimit | type: integer | description: The maximum number of tickets that can be sold for the event when first defining the event. If a seating map is defined after you created a ticket definition, this property is ignored and `actualLimit` is used instead. To create unlimited tickets, skip this field in the request.
- name: actualLimit | type: integer | description: The maximum number of tickets that can be sold for the event after adding a seating map to the event. If no seating map is defined, this property is the same as `initialLimit`.
- name: pricingMethod | type: PricingMethod | description: Ticket pricing method.
- ONE-OF:
- name: fixedPrice | type: Money | description: Same ticket price for everyone.
- name: value | type: string | description: Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative.
- name: currency | type: string | description: Currency code. Must be a valid [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) currency code (e.g., USD).
- name: guestPrice | type: Money | description: Guests choose how much they'd like to pay for the ticket. You can set the minimum price, or specify `"0"` in the request to make the ticket free. The price can be updated to a higher amount by a guest during the checkout.
- name: pricingOptions | type: PricingOptions | description: Sets of various ticket prices. For example, you can charge different prices for children and adults.
- name: optionDetails | type: array | description: Ticket price options.
- name: optionId | type: string | description: Ticket price option GUID.
- name: name | type: string | description: Ticket price option name, such as "Child Ticket".
- name: price | type: Money | description: Ticket price.
- name: pricingType | type: Type | description: Ticket price type.
- enum:
- STANDARD: All money goes to a seller. Applies to all ticket pricing methods except for `guestPrice`.
- DONATION: All collected money is a donation. This pricing type is automatically assigned when you select the `guestPrice` pricing method.
- name: free | type: boolean | description: Whether the ticket is free. To create a free ticket, enter `"0"` in `pricingMethod.fixedPrice.value`.
- name: feeType | type: Type | description: Type of ticket service fee to collect.
- enum:
- FEE_INCLUDED: The fee is deducted from the ticket price for a seller.
For example, if you're selling tickets for $10, then a ticket service fee of $0.25 will be deducted from the price and you'll get $9.75.
- FEE_ADDED_AT_CHECKOUT: The fee is shown in addition to the ticket price at checkout and a guest pays the fee.
For example, if you sell tickets for $10, a customer will see a ticket service fee of $0.25 and will pay $10.25 in total.
- NO_FEE: Ticket service fee isn't collected. Available only for free tickets and legacy Wix users.
- name: salePeriod | type: SalePeriod | description: Ticket sale period.
- name: startDate | type: Date | description: Date and time the ticket sale starts. Rounded down to the nearest minute.
- name: endDate | type: Date | description: Date and time the ticket sale ends. Rounded down to the nearest minute.
- name: displayNotOnSale | type: boolean | description: Whether to display the ticket if it's not available to buy.
- name: saleStatus | type: Status | description: Ticket sale status.
- enum:
- SALE_SCHEDULED: Tickets aren't on sale yet.
- SALE_STARTED: Tickets are on sale.
- SALE_ENDED: Tickets are no longer on sale.
- name: salesDetails | type: SalesDetails | description: Ticket sales information.
**Note:** This field is only returned when `SALES_DETAILS` is specified in `field` in the request.
- name: unsoldCount | type: integer | description: Number of tickets that haven't been purchased yet. The field is `null` if the ticket quantity is unlimited.
- name: soldCount | type: integer | description: Number of purchased tickets.
- name: reservedCount | type: integer | description: Number of reserved tickets.
- name: soldOut | type: boolean | description: Whether the tickets are sold out.
- name: limitPerCheckout | type: integer | description: Number of tickets that can be purchased per checkout.
**Note:** If the `actualLimit` or `salesDetails.unsoldCount` field value is smaller than `limitPerCheckout`, then it overrides this field.
- name: extendedFields | type: ExtendedFields | description: Data extensions.
- name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).
- name: eventDetails | type: EventDetails | description: Information about the even the ticket is for.
**Note:** This field is only returned when `EVENT_DETAILS` is specified in `field` in the request.
- name: title | type: string | description: Event title.
- name: shortDescription | type: string | description: Short description of the event.
- name: location | type: Location | description: Event location.
- name: name | type: string | description: Location name. This value is displayed instead of the address when the location is defined as TBD by setting the `locationTbd` property to `true`.
- name: type | type: LocationType | description: Location type.
- enum:
- VENUE: Event is on-site at a specific physical location.
- ONLINE: Event is online, such as a virtual video conference.
- name: address | type: Address | description: Exact location address.
- name: city | type: string | description: none
- name: subdivision | type: string | description: none
- name: country | type: string | description: none
- name: postalCode | type: string | description: none
- name: addressLine1 | type: string | description: none
- name: addressLine2 | type: string | description: none
- name: locationTbd | type: boolean | description: Whether the event location is TBD.
- name: dateAndTimeSettings | type: DateAndTimeSettings | description: Event date and time settings.
- name: dateAndTimeTbd | type: boolean | description: Whether the event date and time are TBD.
- name: dateAndTimeTbdMessage | type: string | description: Message that is displayed when time and date is TBD. **Note:** This field is only used when the `dateAndTimeTbd` field value is `true`.
- name: startDate | type: Date | description: Event start date. **Note:** This field is only returned when the `dateAndTimeTbd` field value is `false`.
- name: endDate | type: Date | description: Event end date. **Note:** This field is only returned when the `dateAndTimeTbd` field value is `false`.
- name: timeZoneId | type: string | description: Event time zone GUID in the [TZ database](https://www.iana.org/time-zones) format. **Note:** This field is only returned when the `dateAndTimeTbd` field value is `false`.
- name: hideEndDate | type: boolean | description: Whether the end date is hidden in the formatted date and time.
- name: showTimeZone | type: boolean | description: Whether the time zone is displayed in the formatted schedule.
- name: recurrenceStatus | type: Status | description: Repeating event status.
- enum:
- ONE_TIME: Event happens only once and can last multiple days.
- RECURRING: A series of events that repeat.
- RECURRING_UPCOMING: Next event in a schedule of recurring events.
- RECURRING_RECENTLY_ENDED: Latest event that ended in a schedule of recurring events.
- RECURRING_RECENTLY_CANCELED: Latest canceled event in a schedule of recurring events
- name: recurringEvents | type: Recurrences | description: Event repetitions.
- name: individualEventDates | type: array | description: Individual event dates for recurring events. *Note:** Each date must be manually calculated and provided. There is no support for automatic generation using recurrence rules or patterns (for example, "Weekly"). When you create a recurring event: - Each occurrence is created as an independent event with its own unique GUID. - All occurrences in the series share the same `categoryId`, which allows you to identify all events in the recurring series. - To retrieve all events in a recurring series, query events by `recurringEvents.categoryId`. - Each event in the series can be independently updated or deleted using its individual event GUID.
- name: startDate | type: Date | description: Event start date.
- name: endDate | type: Date | description: Event end date.
- name: timeZoneId | type: string | description: Event time zone GUID in the [TZ database](https://www.iana.org/time-zones) format.
- name: showTimeZone | type: boolean | description: Whether the time zone is displayed in a formatted schedule.
- name: categoryId | type: string | description: Recurring event category GUID. This read-only field is automatically generated and shared by all events in a recurring series. Use this GUID to query and retrieve all occurrences of a recurring event.
- name: formatted | type: Formatted | description: Formatted date and time settings.
- name: dateAndTime | type: string | description: Formatted date and time representation.
Example of formatting when an event lasts multiple days and is in the UTC time zone: `September 1, 2015 at 10:20 AM – September 5, 2015 at 12:14 PM`.
Example of formatting when an event lasts 1 day and is in the GMT+2 time zone: `February 1, 2018, 12:10 – 2:50 PM GMT+2`.
- name: startDate | type: string | description: Formatted start date of the event. Empty for TBD schedules.
- name: startTime | type: string | description: Formatted start time of the event. Empty for TBD schedules.
- name: endDate | type: string | description: Formatted end date of the event. Empty for TBD schedules or when the end date is hidden.
- name: endTime | type: string | description: Formatted end time of the event. Empty for TBD schedules or when the end date is hidden.
- name: eventPageUrl | type: string | description: Event page URL components.
- name: status | type: Status | description: Event status.
- enum:
- UPCOMING: Event is published and scheduled to start.
- STARTED: Event has started.
- ENDED: Event has ended.
- CANCELED: Event is canceled.
- DRAFT: Event is not public.
- name: seatingDetails | type: SeatingDetails | description: Seating information including available seats and areas for this ticket definition.
**Note:** This field is only returned when `SEATING_DETAILS` is specified in `field` in the request, and when the event has a [seating plan](https://support.wix.com/en/article/wix-events-creating-a-seating-map).
- name: places | type: array | description: List of available places.
- name: placeId | type: string | description: Place GUID in the format `{sectionId}-{elementId}-{label}`. For example, `0-1-A5`.
- name: label | type: string | description: Human-readable label for this place, such as `A1`, `12`, or `VIP1`.
- name: sectionLabel | type: string | description: High-level division of the venue, where the place is located, such as `Orchestra`, `Balcony`, or `VIP Section`.
- name: elementLabel | type: string | description: Seating element within the section, such as `Row`, `Table`, or `General Admission`.
- name: availableCapacity | type: integer | description: Available capacity at this place. For general seating type returns the number of remaining spots. For other types returns `1`. For example, if a table has 5 chairs, each chair is treated as a separate place, which has a capacity of 1.
- name: metadata | type: PagingMetadataV2 | description: Metadata for the paginated results.
- name: count | type: integer | description: Number of items returned in the response.
- name: offset | type: integer | description: Offset that was requested.
- name: total | type: integer | description: Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set.
- name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field.
- name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used.
- name: next | type: string | description: Cursor pointing to next page in the list of results.
- name: prev | type: string | description: Cursor pointing to previous page in the list of results.
```
### Examples
### queryTicketDefinitions
```javascript
import { ticketDefinitionsV2 } from '@wix/events';
async function queryTicketDefinitions(query,options) {
const response = await ticketDefinitionsV2.queryTicketDefinitions(query,options);
};
```
### queryTicketDefinitions (with elevated permissions)
```javascript
import { ticketDefinitionsV2 } from '@wix/events';
import { auth } from '@wix/essentials';
async function myQueryTicketDefinitionsMethod(query,options) {
const elevatedQueryTicketDefinitions = auth.elevate(ticketDefinitionsV2.queryTicketDefinitions);
const response = await elevatedQueryTicketDefinitions(query,options);
}
```
### queryTicketDefinitions (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 queryTicketDefinitions(query,options) {
const response = await myWixClient.ticketDefinitionsV2.queryTicketDefinitions(query,options);
};
```
---