> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# ListTickets

# Package: ticketing

# Namespace: TicketManagement

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/events/registration/ticketing/tickets/list-tickets.md

## Permission Scopes:
Read Event Tickets and Guest List: SCOPE.DC-EVENTS.READ-GUEST-LIST

## Introduction

Retrieves a list of up to 100 tickets, with the specified paging, filtering & sorting.

---

## REST API

### Schema

```
 Method: listTickets
 Description: Retrieves a list of up to 100 tickets, with the specified paging, filtering & sorting.
 URL: https://www.wixapis.com/events/v1/tickets
 Method: GET
 Method parameters:
   query param name: contactId | type: array<contactId> | description: Guest contact GUIDs.  | validation: maxItems 100, format GUID
   query param name: eventId | type: array<eventId> | description: Event GUIDs to which the tickets belong.  | validation: format GUID
   query param name: facet | type: array<facet> | description: Filter facets. For supported facets, see [Events Schema for Wix Search](https://dev.wix.com/docs/api-reference/business-solutions/events/events-schema-for-wix-search.md).  | validation: maxItems 20, maxLength 100
   query param name: fieldset | type: array<fieldset> | description: Set of fields to return in the response. See [Fieldsets](https://dev.wix.com/api/rest/wix-events/wix-events/fieldset#wix-events_wix-events_fieldset_ticket-fieldset).  | validation: maxItems 20
                 - enum:
                 -     GUEST_DETAILS: Include guest details in the ticket response.
                 -     TICKET_DETAILS: Include ticket details in the ticket response.
                 -     GUEST_FORM: Include individual guest form in the ticket response.
   query param name: limit | type: limit | description: Number of items to load per page.  | validation: minimum 0, maximum 100
   query param name: memberId | type: array<memberId> | description: Site member GUIDs.  | validation: maxItems 500, format GUID
   query param name: offset | type: offset | description: Paging offset.  | validation: minimum 0
   query param name: orderNumber | type: array<orderNumber> | description: Order numbers.  | validation: maxItems 20, minLength 1, maxLength 36
   query param name: orderStatus | type: array<orderStatus> | description: Order statuses.  | validation: maxItems 20
                 - enum:
                 -     NA_ORDER_STATUS: Order status isn't available for this request fieldset.
                 -     FREE: Order is confirmed, no payment is required.
                 -     PENDING: Order was paid, but the payment gateway suspended the payment.
                 -     PAID: Order is paid.
                 -     OFFLINE_PENDING: Order is confirmed but must be paid via offline payment. Status needs to be manually updated to `"PAID"`.
                 -     INITIATED: Order is waiting for payment at the cashier.
                 -     CANCELED: Order is canceled.
                 -     DECLINED: Order payment is declined.
                 -     AUTHORIZED: Order payment is authorized.
                 -     VOIDED: Order payment is voided.
                 -     PARTIALLY_PAID: Order is partially paid with less than the total amount.
   query param name: searchPhrase | type: searchPhrase | description: Textual search filter - search is performed on `"orderFullName"`, `"guestFullName"`, and `"ticketNumber"`.  | validation: maxLength 200
   query param name: seatId | type: array<seatId> | description: Seat GUIDs.  | validation: maxItems 50, maxLength 36
   query param name: sort | type: sort | description: Sort order. Defaults to `ticketNumber` in ascending order.  | validation: maxLength 100
   query param name: state | type: array<state> | description: Ticket states.  | validation: maxItems 20
                 - enum:
                 -     ORDER_ARCHIVED: Returns only archived orders' tickets.
                 -     ORDER_ACTIVE: Returns only non-archived orders' tickets.
                 -     TICKET_ARCHIVED: Returns only archived tickets.
                 -     TICKET_ACTIVE: Returns only non-archived tickets.
                 -     CHECKED_IN: Returns only checked-in tickets.
                 -     NON_CHECKED_IN: Returns only non-checked-in tickets.
                 -     FREE: Returns only free tickets.
                 -     PAID: Returns only paid tickets.
                 -     MEMBER: Returns only member tickets.
   query param name: ticketDefinitionId | type: array<ticketDefinitionId> | description: Ticket definition GUIDs.  | validation: maxItems 10, format GUID
   query param name: ticketNumber | type: array<ticketNumber> | description: Ticket numbers.  | validation: maxItems 50, minLength 1, maxLength 36
 Return type: ListTicketsResponse
  - name: total | type: integer | description: Total tickets matching the specified filters.  
  - name: offset | type: integer | description: Paging offset.  | validation: minimum 0
  - name: limit | type: integer | description: Limit.  | validation: minimum 0, maximum 100
  - name: tickets | type: array<Ticket> | description: Tickets.  
     - name: ticketNumber | type: string | description: Unique ticket number which is assigned automatically when creating a ticket.  
     - name: orderNumber | type: string | description: Associated order number.  
     - name: ticketDefinitionId | type: string | description: Ticket definition GUID. See the Ticket Definition API for additional information.  | validation: format GUID
     - name: name | type: string | description: Ticket type.  
     - 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`.  | validation: format CURRENCY
        - 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.  | validation: format DECIMAL_VALUE
     - name: free | type: boolean | description: Whether the ticket requires payment.  | read-only: true 
     - name: policy | type: string | description: Ticket and event policies.  
     - name: checkIn | type: CheckIn | description: Ticket check-in.  
        - name: created | type: string | description: Time of a ticket's check-in.  | validation: format date-time
     - name: orderStatus | type: OrderStatus | description: Associated order status.  
         - enum:
         -     NA_ORDER_STATUS: Order status isn't available for this request fieldset.
         -     FREE: Order is confirmed, no payment is required.
         -     PENDING: Order was paid, but the payment gateway suspended the payment.
         -     PAID: Order is paid.
         -     OFFLINE_PENDING: Order is confirmed but must be paid via offline payment. Status needs to be manually updated to `"PAID"`.
         -     INITIATED: Order is waiting for payment at the cashier.
         -     CANCELED: Order is canceled.
         -     DECLINED: Order payment is declined.
         -     AUTHORIZED: Order payment is authorized.
         -     VOIDED: Order payment is voided.
         -     PARTIALLY_PAID: Order is partially paid with less than the total amount.
     - name: orderArchived | type: boolean | description: Whether the order and ticket are archived. If set to `true`, they aren't visible in the order list.  
     - name: orderFullName | type: string | description: Buyer full name.  
     - name: guestFullName | type: string | description: Guest full name.  
     - name: guestDetails | type: GuestDetails | description: Guest personal details.  
        - name: guestAssigned | type: boolean | description: Whether ticket belongs to assigned guest.  
        - name: firstName | type: string | description: Guest first name.  
        - name: lastName | type: string | description: Guest last name.  
        - name: email | type: string | description: Guest email.  | validation: format EMAIL
        - name: form | type: FormResponse | description: Full form response.  
           - name: inputValues | type: array<InputValue> | description: Form field inputs.  | validation: maxItems 200
              - name: inputName | type: string | description: Form field input name.  | validation: maxLength 100
              - name: value | type: string | description: Form field value.  | validation: maxLength 5000
              - name: values | type: array<string> | description: Form field values.  | validation: maxItems 100, maxLength 5000
        - name: contactId | type: string | description: Contact GUID associated with this guest.  | validation: format GUID
        - name: phone | type: string | description: Guest phone number.  | validation: format PHONE
     - name: archived | type: boolean | description: Whether the ticket is visible in an order.  
     - name: memberId | type: string | description: Ticket owner member GUID.  | validation: format GUID
     - name: anonymized | type: boolean | description: Whether ticket was anonymized by GDPR delete. Anonymized tickets no longer contain personally identifiable information (PII).  
     - name: checkInUrl | type: string | description: Ticket check-in URL.  Shown as QR code image in PDF.  <br/> Format: `"https://www.wixevents.com/check-in/{ticket number},{event id}"`  <br/> Example: `"https://www.wixevents.com/check-in/AAAA-AAAA-BB021,00000000-0000-0000-0000-000000000000"`  
     - name: ticketPdfUrl | type: string | description: URL for ticket PDF download.  
     - name: channel | type: ChannelType | description: Associated order checkout channel type.  
         - enum:
         -     ONLINE: Buyer created the order via an online channel, such as a website or mobile app.
         -     OFFLINE_POS: Sales person created the order and collected the money.
     - name: walletPassUrl | type: string | description: URL to download a ticket in `.pkpass` format for Apple Wallet.  | read-only: true | validation: format WEB_URL
     - name: canceled | type: boolean | description: Whether ticket is canceled.  | read-only: true 
  - name: facets | type: Map<string,FacetCounts> | description: Facets.  | validation: format map
     - name: counts | type: object | description: Facet counts aggregated per value.  | validation: format map


```

### Examples

### ListTickets
```curl
~~~cURL
curl -X GET 'https://www.wixapis.com/events/v1/tickets?eventId=ad18d12e-a6a9-4c17-abfa-6ff119479be2&limit=10&fieldset=GUEST_DETAILS&fieldset=TICKET_DETAILS&state=PAID' \
-H 'Authorization: <AUTH TOKEN>'
~~~
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.events.tickets.listTickets(options)
 Description: Retrieves a list of up to 100 tickets, with the specified paging, filtering & sorting.
 Method parameters:
   param name: options | type: ListTicketsOptions  none  
        - name: eventId | type: array<string> | description: Event GUIDs to which the tickets belong.  | validation: format GUID
        - name: offset | type: integer | description: Paging offset.  | validation: minimum 0
        - name: limit | type: integer | description: Number of items to load per page.  | validation: minimum 0, maximum 100
        - name: orderNumber | type: array<string> | description: Order numbers.  | validation: maxItems 20, minLength 1, maxLength 36
        - name: ticketNumber | type: array<string> | description: Ticket numbers.  | validation: maxItems 50, minLength 1, maxLength 36
        - name: searchPhrase | type: string | description: Textual search filter - search is performed on `"orderFullName"`, `"guestFullName"`, and `"ticketNumber"`.  | validation: maxLength 200
        - name: orderStatus | type: array<OrderStatus> | description: Order statuses.  | validation: maxItems 20
             - enum:
             -     NA_ORDER_STATUS: Order status isn't available for this request fieldset.
             -     FREE: Order is confirmed, no payment is required.
             -     PENDING: Order was paid, but the payment gateway suspended the payment.
             -     PAID: Order is paid.
             -     OFFLINE_PENDING: Order is confirmed but must be paid via offline payment. Status needs to be manually updated to `"PAID"`.
             -     INITIATED: Order is waiting for payment at the cashier.
             -     CANCELED: Order is canceled.
             -     DECLINED: Order payment is declined.
             -     AUTHORIZED: Order payment is authorized.
             -     VOIDED: Order payment is voided.
             -     PARTIALLY_PAID: Order is partially paid with less than the total amount.
        - name: fieldset | type: array<TicketFieldset> | description: Set of fields to return in the response. See [Fieldsets](https://dev.wix.com/api/rest/wix-events/wix-events/fieldset#wix-events_wix-events_fieldset_ticket-fieldset).  | validation: maxItems 20
             - enum:
             -     GUEST_DETAILS: Include guest details in the ticket response.
             -     TICKET_DETAILS: Include ticket details in the ticket response.
             -     GUEST_FORM: Include individual guest form in the ticket response.
        - name: state | type: array<State> | description: Ticket states.  | validation: maxItems 20
             - enum:
             -     ORDER_ARCHIVED: Returns only archived orders' tickets.
             -     ORDER_ACTIVE: Returns only non-archived orders' tickets.
             -     TICKET_ARCHIVED: Returns only archived tickets.
             -     TICKET_ACTIVE: Returns only non-archived tickets.
             -     CHECKED_IN: Returns only checked-in tickets.
             -     NON_CHECKED_IN: Returns only non-checked-in tickets.
             -     FREE: Returns only free tickets.
             -     PAID: Returns only paid tickets.
             -     MEMBER: Returns only member tickets.
        - name: memberId | type: array<string> | description: Site member GUIDs.  | validation: maxItems 500, format GUID
        - name: facet | type: array<string> | description: Filter facets. For supported facets, see [Events Schema for Wix Search](https://dev.wix.com/docs/api-reference/business-solutions/events/events-schema-for-wix-search.md).  | validation: maxItems 20, maxLength 100
        - name: sort | type: string | description: Sort order. Defaults to `ticketNumber` in ascending order.  | validation: maxLength 100
        - name: contactId | type: array<string> | description: Guest contact GUIDs.  | validation: maxItems 100, format GUID
        - name: ticketDefinitionId | type: array<string> | description: Ticket definition GUIDs.  | validation: maxItems 10, format GUID
        - name: seatId | type: array<string> | description: Seat GUIDs.  | validation: maxItems 50, maxLength 36
 Return type: PROMISE<ListTicketsResponse>
  - name: total | type: integer | description: Total tickets matching the specified filters.  
  - name: offset | type: integer | description: Paging offset.  | validation: minimum 0
  - name: limit | type: integer | description: Limit.  | validation: minimum 0, maximum 100
  - name: tickets | type: array<Ticket> | description: Tickets.  
     - name: ticketNumber | type: string | description: Unique ticket number which is assigned automatically when creating a ticket.  
     - name: orderNumber | type: string | description: Associated order number.  
     - name: ticketDefinitionId | type: string | description: Ticket definition GUID. See the Ticket Definition API for additional information.  | validation: format GUID
     - name: name | type: string | description: Ticket type.  
     - 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`.  | validation: format CURRENCY
        - 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.  | validation: format DECIMAL_VALUE
     - name: free | type: boolean | description: Whether the ticket requires payment.  | read-only: true 
     - name: policy | type: string | description: Ticket and event policies.  
     - name: checkIn | type: CheckIn | description: Ticket check-in.  
        - name: created | type: Date | description: Time of a ticket's check-in.  
     - name: orderStatus | type: OrderStatus | description: Associated order status.  
         - enum:
         -     NA_ORDER_STATUS: Order status isn't available for this request fieldset.
         -     FREE: Order is confirmed, no payment is required.
         -     PENDING: Order was paid, but the payment gateway suspended the payment.
         -     PAID: Order is paid.
         -     OFFLINE_PENDING: Order is confirmed but must be paid via offline payment. Status needs to be manually updated to `"PAID"`.
         -     INITIATED: Order is waiting for payment at the cashier.
         -     CANCELED: Order is canceled.
         -     DECLINED: Order payment is declined.
         -     AUTHORIZED: Order payment is authorized.
         -     VOIDED: Order payment is voided.
         -     PARTIALLY_PAID: Order is partially paid with less than the total amount.
     - name: orderArchived | type: boolean | description: Whether the order and ticket are archived. If set to `true`, they aren't visible in the order list.  
     - name: orderFullName | type: string | description: Buyer full name.  
     - name: guestFullName | type: string | description: Guest full name.  
     - name: guestDetails | type: GuestDetails | description: Guest personal details.  
        - name: guestAssigned | type: boolean | description: Whether ticket belongs to assigned guest.  
        - name: firstName | type: string | description: Guest first name.  
        - name: lastName | type: string | description: Guest last name.  
        - name: email | type: string | description: Guest email.  | validation: format EMAIL
        - name: form | type: FormResponse | description: Full form response.  
           - name: inputValues | type: array<InputValue> | description: Form field inputs.  | validation: maxItems 200
              - name: inputName | type: string | description: Form field input name.  | validation: maxLength 100
              - name: value | type: string | description: Form field value.  | validation: maxLength 5000
              - name: values | type: array<string> | description: Form field values.  | validation: maxItems 100, maxLength 5000
        - name: contactId | type: string | description: Contact GUID associated with this guest.  | validation: format GUID
        - name: phone | type: string | description: Guest phone number.  | validation: format PHONE
     - name: archived | type: boolean | description: Whether the ticket is visible in an order.  
     - name: memberId | type: string | description: Ticket owner member GUID.  | validation: format GUID
     - name: anonymized | type: boolean | description: Whether ticket was anonymized by GDPR delete. Anonymized tickets no longer contain personally identifiable information (PII).  
     - name: checkInUrl | type: string | description: Ticket check-in URL.  Shown as QR code image in PDF.  <br/> Format: `"https://www.wixevents.com/check-in/{ticket number},{event id}"`  <br/> Example: `"https://www.wixevents.com/check-in/AAAA-AAAA-BB021,00000000-0000-0000-0000-000000000000"`  
     - name: ticketPdfUrl | type: string | description: URL for ticket PDF download.  
     - name: channel | type: ChannelType | description: Associated order checkout channel type.  
         - enum:
         -     ONLINE: Buyer created the order via an online channel, such as a website or mobile app.
         -     OFFLINE_POS: Sales person created the order and collected the money.
     - name: walletPassUrl | type: string | description: URL to download a ticket in `.pkpass` format for Apple Wallet.  | read-only: true | validation: format WEB_URL
     - name: canceled | type: boolean | description: Whether ticket is canceled.  | read-only: true 
  - name: facets | type: Map<string,FacetCounts> | description: Facets.  | validation: format map
     - name: counts | type: object | description: Facet counts aggregated per value.  | validation: format map


```

### Examples

### listTickets
```javascript
import { tickets } from '@wix/events';

async function listTickets(options) {
  const response = await tickets.listTickets(options);
};
```

### listTickets (with elevated permissions)
```javascript
import { tickets } from '@wix/events';
import { auth } from '@wix/essentials';

async function myListTicketsMethod(options) {
  const elevatedListTickets = auth.elevate(tickets.listTickets);
  const response = await elevatedListTickets(options);
}
```

### listTickets (self-managed)
Self-managed 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 { tickets } from '@wix/events';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { tickets },
  // Include the auth strategy and host as relevant
});


async function listTickets(options) {
  const response = await myWixClient.tickets.listTickets(options);
};
```

---