Search.../

listOrders( )

Developer Preview

Retrieves a list of orders, including ticket data, with basic filter support.

Note: This function is restricted and only runs if you elevate permissions using the wix-auth.elevate() function.

Syntax

function listOrders(options: ListOrdersOptions): Promise<ListOrdersResponse>

listOrders Parameters

NAME
TYPE
DESCRIPTION
options
Optional
ListOrdersOptions

An object representing the available options for retrieving a list of orders.

Returns

Return Type:

Promise<
ListOrdersResponse
>
NAME
TYPE
DESCRIPTION
facets
Record<
string

FacetCounts
>

Filter facets.

limit
number

Limit.

offset
number

Offset.

orderFacets
OrderFacets

Order data enriched facets.

orders
Array<
Order
>

Orders.

searchMetaData
SearchMetaData

Meta data of search results.

total
number

Total orders matching the given filters.

Was this helpful?

listOrders example

Copy Code
1import { orders } from 'wix-events.v2';
2
3 async function listOrders(options) {
4 try {
5 const result = await orders.listOrders(options);
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13