> 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 # Package: eventManagement # Namespace: ticketDefinitionsV3 # Webhook link: https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/ticket-definitions-v3/ticket-definition-sale-ended.md ## Introduction Triggered when a ticket sale ends. Sales details aren't included in the response. --- ## REST API ### Schema ``` Webhook: Ticket Definition Sale Ended Description: Triggered when a ticket sale ends. Sales details aren't included in the response. Event body: - name: id | type: string | description: Unique event ID. Allows clients to ignore duplicate events. - name: entityFqdn | type: string | description: Fully qualified domain name of the entity associated with the event. - name: slug | type: string | description: Event name. - name: entityId | type: string | description: ID of the entity associated with the event. - name: eventTime | type: string (date-time) | description: Event timestamp. - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application such as GDPR. - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event. - name: actionEvent | type: object | description: Custom action event details. - name: body | type: TicketDefinitionSaleEnded | description: The event body. - name: ticketDefinition | type: TicketDefinition | description: Ticket definition. - 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. ``` ### Examples ```curl { "id": "7cf9dc1b-be64-4394-b748-21de6bed31f1", "entityFqdn": "wix.events.ticketdef.v3.ticket_definition", "slug": "sale_ended", "entityId": "aaf51c30-a61c-473e-96be-a42dfa5064c0", "actionEvent": { "body": { "ticketDefinition": { "id": "aaf51c30-a61c-473e-96be-a42dfa5064c0", "eventId": "9d720f99-1b5a-4141-9877-d32985391e18", "revision": "1", "createdDate": "2023-05-25T11:39:26.108Z", "updatedDate": "2023-05-25T11:39:26.108Z", "name": "Leather Workshop", "description": "Step into the world of fine craftsmanship and explore the artistry of handcrafted leather goods at our captivating Leather Workshop. Join us for a hands-on experience that delves into the intricate process of transforming raw leather into exquisite creations. Immerse yourself in a creative atmosphere where seasoned leather artisans will guide you through the journey of mastering age-old techniques and unlocking your inner artisan.", "policyText": "This is your event ticket. Ticket holders must present their tickets on entry. You can either print your ticket or present this digital version. You can find all the details about this event on our website. If you have any questions, issues or wish to get a refund, contact the event host. If you can’t attend the event, please get in touch. Looking forward to seeing you there!", "hidden": false, "limited": true, "initialLimit": 3, "actualLimit": 3, "pricingMethod": { "fixedPrice": { "value": "200.00", "currency": "USD" }, "pricingType": "STANDARD", "free": false }, "feeType": "FEE_INCLUDED", "salePeriod": { "startDate": "2023-06-07T10:00:00Z", "endDate": "2023-06-30T00:00:00Z", "displayNotOnSale": false }, "saleStatus": "SALE_ENDED" } } }, "eventTime": "2023-05-25T13:44:59.129216Z", "triggeredByAnonymizeRequest": false } ``` --- ## JavaScript SDK ### Schema ``` Webhook: onTicketDefinitionSaleEnded Description: Triggered when a ticket sale ends. Sales details aren't included in the response. Payload: TicketDefinitionSaleEndedEnvelope - name: data | type: TicketDefinitionSaleEnded | description: none - name: ticketDefinition | type: TicketDefinition | description: Ticket definition. - 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: EventMetadata | description: none - name: instanceId | type: string | description: App instance GUID. - name: eventType | type: string | description: Event type. - name: identity | type: IdentificationData | description: The identification type and identity data. - ONE-OF: - name: anonymousVisitorId | type: string | description: GUID of a site visitor that has not logged in to the site. - name: memberId | type: string | description: GUID of a site visitor that has logged in to the site. - name: wixUserId | type: string | description: GUID of a Wix user (site owner, contributor, etc.). - name: appId | type: string | description: GUID of an app. - name: identityType | type: WebhookIdentityType | description: - enum: UNKNOWN, ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP - name: accountInfo | type: AccountInfo | description: Details related to the account - name: accountId | type: string | description: GUID of the Wix account associated with the event. - name: parentAccountId | type: string | description: GUID of the parent Wix account. Only included when accountId belongs to a child account. - name: siteId | type: string | description: GUID of the Wix site associated with the event. Only included when the event is tied to a specific site. - name: _id | type: string | description: Event GUID. With this GUID you can easily spot duplicated events and ignore them. - name: entityFqdn | type: string | description: Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. - name: slug | type: string | description: Event action name, placed at the top level to make it easier for users to dispatch messages. For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. - name: entityId | type: string | description: GUID of the entity associated with the event. - name: eventTime | type: Date | description: Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application (for example, GDPR). - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event. - name: entityEventSequence | type: string | description: A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. ``` ### Examples ```javascript import { ticketDefinitionsV2 } from '@wix/events'; ticketDefinitionsV2.onTicketDefinitionSaleEnded((event) => { // handle your event here }); ``` ```javascript import { createClient, AppStrategy } from '@wix/sdk'; import { ticketDefinitionsV2 } from '@wix/events'; const wixClient = createClient({ auth: AppStrategy({ appId: 'MY-APP-ID', publicKey: 'YOUR_APP_PUBLIC_KEY', }), modules: { ticketDefinitionsV2, }, }); wixClient.ticketDefinitionsV2.onTicketDefinitionSaleEnded((event) => { // handle your event here }); ``` ---