queryExtendedBookings( )
Retrieves a list of bookings, including additional extended information, given the provided paging, filtering, and sorting.
Description
Up to 100 extended bookings can be returned per request.
queryExtendedBookings()
runs with these defaults, which you can override:
createdDate
sorted inDESC
ordercursorPaging.limit
is50
You can retrieve information about which actions the customer can perform
for the bookings. To do so, pass withBookingAllowedActions
as true
.
For field support, see supported filters for more information.
You can specify a filter only once per query. If you specify a filter more than once, only the first filter determines the extended bookings that are returned.
When filtering by date, you must use UTC time.
Note: This function is restricted and only runs if you elevate permissions using the
wix-auth.elevate()
function.
Syntax
function queryExtendedBookings(query: CommonQueryV2, options: QueryExtendedBookingsOptions): Promise<QueryExtendedBookingsResponse>
queryExtendedBookings Parameters
NAME
TYPE
DESCRIPTION
Information about filters, paging, and sorting.
Additional options for performing the query.
Returns
Return Type:
NAME
TYPE
DESCRIPTION
Retrieved bookings and additional information, such as information about about the attendance or actions the customer can perform.
Paging metadata.
Was this helpful?
queryExtendedBookings example
1import { extendedBookings } from 'wix-bookings.v2';23 async function queryExtendedBookings(query, options) {4 try {5 const result = await extendedBookings.queryExtendedBookings(query, options);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13