> 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 # ListAvailableTickets # Package: ticketing # Namespace: CheckoutService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/events/registration/ticketing/orders/list-available-tickets.md ## Permission Scopes: Events Checkout: SCOPE.EVENTS.EVENTS-CHECKOUT ## Introduction Retrieves tickets available to reserve. --- ## REST API ### Schema ``` Method: listAvailableTickets Description: Retrieves tickets available to reserve. URL: https://www.wixapis.com/events/v1/checkout/available-tickets Method: GET Method parameters: query param name: eventId | type: eventId | description: Event GUID to list tickets for. If not specified, available tickets for all events on a site will be returned. query param name: limit | type: limit | description: Limit. **Default:** `0`. If you don't pass this field in the request, only `metadata` is returned. query param name: offset | type: offset | description: Offset. query param name: sort | type: sort | description: Sort order. Default: `created:asc`. query param name: state | type: array - enum: INCLUDE_HIDDEN_NOT_ON_SALE Return type: ListAvailableTicketsResponse - name: metaData | type: ResponseMetaData | description: Ticket definitions meta data. - name: count | type: integer | description: Number of items in the response. - name: offset | type: integer | description: Offset of items. - name: total | type: integer | description: Total number of matching items. - name: definitions | type: array | description: Ticket definitions. - name: id | type: string | description: Ticket definition GUID. - name: price | type: Money | description: Ticket price. - name: currency | type: string | description: 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `USD`. - name: value | type: string | description: Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, starts with a single (-), to indicate that the amount is negative. - name: free | type: boolean | description: Whether the ticket is free (read only). - name: name | type: string | description: Ticket name. - name: description | type: string | description: Ticket description. - name: limitPerCheckout | type: integer | description: Limit of tickets that can be purchased per checkout. Set to 20 for unlimited ticket definition. - name: orderIndex | type: integer | description: Custom sort index. - name: policy | type: string | description: Policy information plain text block, as printed on the ticket. - name: dashboard | type: Dashboard | description: Sensitive dashboard data. - name: hidden | type: boolean | description: Whether ticket is hidden and cannot be sold. - name: limited | type: boolean | description: Whether the ticket has limited quantity. - name: quantity | type: integer | description: Ticket limit. `NULL` for unlimited ticket definitions. - name: unsold | type: integer | description: Number of unsold tickets. `NULL` for unlimited ticket definitions. - name: ticketsSold | type: integer | description: Number of tickets sold. - name: ticketsReserved | type: integer | description: Number of tickets reserved. - name: eventId | type: string | description: Event GUID associated with the ticket. - name: wixFeeConfig | type: WixFeeConfig | description: Configuration of the fixed-rate Wix service fee that is applied at checkout to each ticket sold. - name: type | type: FeeType | description: Fee calculation method. - enum: - FEE_ADDED: Fee is added to the ticket price at checkout. - FEE_INCLUDED: Seller absorbs the fee. It's deducted from the ticket price. - FEE_ADDED_AT_CHECKOUT: Fee is added to the ticket price at checkout. - name: salePeriod | type: TicketSalePeriod | description: Ticket sale period. - name: startDate | type: string | description: Ticket sale start timestamp. - name: endDate | type: string | description: Ticket sale end timestamp. - name: hideNotOnSale | type: boolean | description: Whether to hide this ticket if it isn't on sale. - name: saleStatus | type: TicketSaleStatus | description: Ticket sale status. - enum: - SALE_SCHEDULED: Ticket sale is scheduled to start. - SALE_STARTED: Ticket sale has started. - SALE_ENDED: Ticket sale has ended. - name: state | type: array | description: Ticket state. - enum: INCLUDE_HIDDEN_NOT_ON_SALE - name: pricing | type: TicketPricing | description: Ticket pricing. - ONE-OF: - name: fixedPrice | type: Money | description: Ticket price which is read only. - name: minPrice | type: Money | description: Min price per ticket, customizable. - name: pricingOptions | type: PricingOptions | description: Ticket pricing options. - name: options | type: array | description: Multiple ticket pricing options. - name: id | type: string | description: Ticket pricing option GUID. - name: name | type: string | description: Ticket pricing option name. - name: price | type: Money | description: Ticket pricing option price. - name: pricingType | type: Type | description: Ticket pricing type. - enum: STANDARD, DONATION ``` ### Examples ### ListAvailableTickets ```curl ~~~cURL curl -X GET 'https://www.wixapis.com/events/v1/tickets/available?limit=100&eventId=fd56076c-38f4-4705-b9eb-ec322b85c745&order=orderIndex:asc' \ -H 'Authorization: ' ~~~ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.ticketing.CheckoutService.listAvailableTickets(options) Description: Retrieves tickets available to reserve. Method parameters: param name: options | type: ListAvailableTicketsOptions none - name: eventId | type: string | description: Event GUID to list tickets for. If not specified, available tickets for all events on a site will be returned. - name: offset | type: integer | description: Offset. - name: limit | type: integer | description: Limit. **Default:** `0`. If you don't pass this field in the request, only `metadata` is returned. - name: sort | type: string | description: Sort order. Default: `created:asc`. - name: state | type: array | description: - enum: INCLUDE_HIDDEN_NOT_ON_SALE Return type: PROMISE - name: metaData | type: ResponseMetaData | description: Ticket definitions meta data. - name: count | type: integer | description: Number of items in the response. - name: offset | type: integer | description: Offset of items. - name: total | type: integer | description: Total number of matching items. - name: definitions | type: array | description: Ticket definitions. - name: _id | type: string | description: Ticket definition GUID. - name: price | type: Money | description: Ticket price. - name: currency | type: string | description: 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `USD`. - name: value | type: string | description: Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, starts with a single (-), to indicate that the amount is negative. - name: free | type: boolean | description: Whether the ticket is free (read only). - name: name | type: string | description: Ticket name. - name: description | type: string | description: Ticket description. - name: limitPerCheckout | type: integer | description: Limit of tickets that can be purchased per checkout. Set to 20 for unlimited ticket definition. - name: orderIndex | type: integer | description: Custom sort index. - name: policy | type: string | description: Policy information plain text block, as printed on the ticket. - name: dashboard | type: Dashboard | description: Sensitive dashboard data. - name: hidden | type: boolean | description: Whether ticket is hidden and cannot be sold. - name: limited | type: boolean | description: Whether the ticket has limited quantity. - name: quantity | type: integer | description: Ticket limit. `NULL` for unlimited ticket definitions. - name: unsold | type: integer | description: Number of unsold tickets. `NULL` for unlimited ticket definitions. - name: ticketsSold | type: integer | description: Number of tickets sold. - name: ticketsReserved | type: integer | description: Number of tickets reserved. - name: eventId | type: string | description: Event GUID associated with the ticket. - name: wixFeeConfig | type: WixFeeConfig | description: Configuration of the fixed-rate Wix service fee that is applied at checkout to each ticket sold. - name: type | type: FeeType | description: Fee calculation method. - enum: - FEE_ADDED: Fee is added to the ticket price at checkout. - FEE_INCLUDED: Seller absorbs the fee. It's deducted from the ticket price. - FEE_ADDED_AT_CHECKOUT: Fee is added to the ticket price at checkout. - name: salePeriod | type: TicketSalePeriod | description: Ticket sale period. - name: startDate | type: Date | description: Ticket sale start timestamp. - name: endDate | type: Date | description: Ticket sale end timestamp. - name: hideNotOnSale | type: boolean | description: Whether to hide this ticket if it isn't on sale. - name: saleStatus | type: TicketSaleStatus | description: Ticket sale status. - enum: - SALE_SCHEDULED: Ticket sale is scheduled to start. - SALE_STARTED: Ticket sale has started. - SALE_ENDED: Ticket sale has ended. - name: state | type: array | description: Ticket state. - enum: INCLUDE_HIDDEN_NOT_ON_SALE - name: pricing | type: TicketPricing | description: Ticket pricing. - ONE-OF: - name: fixedPrice | type: Money | description: Ticket price which is read only. - name: minPrice | type: Money | description: Min price per ticket, customizable. - name: pricingOptions | type: PricingOptions | description: Ticket pricing options. - name: options | type: array | description: Multiple ticket pricing options. - name: _id | type: string | description: Ticket pricing option GUID. - name: name | type: string | description: Ticket pricing option name. - name: price | type: Money | description: Ticket pricing option price. - name: pricingType | type: Type | description: Ticket pricing type. - enum: STANDARD, DONATION ``` ### Examples ### listAvailableTickets ```javascript import { orders } from '@wix/events'; async function listAvailableTickets(options) { const response = await orders.listAvailableTickets(options); }; ``` ### listAvailableTickets (with elevated permissions) ```javascript import { orders } from '@wix/events'; import { auth } from '@wix/essentials'; async function myListAvailableTicketsMethod(options) { const elevatedListAvailableTickets = auth.elevate(orders.listAvailableTickets); const response = await elevatedListAvailableTickets(options); } ``` ### listAvailableTickets (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 { orders } from '@wix/events'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { orders }, // Include the auth strategy and host as relevant }); async function listAvailableTickets(options) { const response = await myWixClient.orders.listAvailableTickets(options); }; ``` ---