queryBookingPolicies( )


Creates a query to retrieve a list of bookingPolicy objects.

The queryBookingPolicies() function builds a query to retrieve a list of bookingPolicy objects and returns a BookingPoliciesQueryBuilder object.

The returned object contains the query definition, which is typically used to run the query using the find() function.

You can refine the query by chaining BookingPoliciesQueryBuilder functions onto the query. BookingPoliciesQueryBuilder functions enable you to sort, filter, and control the results that queryBookingPolicies() returns.

queryBookingPolicies() runs with the following BookingPoliciesQueryBuilder defaults that you can override:

  • limit is 50.
  • Sorted by createdDate in ascending order.

The functions that are chained to queryBookingPolicies() are applied in the order they are called. For example, if you apply ascending("waitlistPolicy.capacity") and then ascending("name"), the results are sorted first by waitlistPolicy.capacity, and then, if there are multiple results with the same waitlistPolicy.capacity, the items are sorted by name.

The following BookingPoliciesQueryBuilder functions are supported for the queryBookingPolicies() function. For a full description of the bookingPolicy object, see the object returned for the items property in BookingPoliciesQueryResult.

PROPERTYSUPPORTED FILTERS & SORTING
_ideq(),in(),ne(),ascending(),descending()
nameeq(),ne(),startsWith(),ascending(),descending()
customPolicyDescription.enabledeq(),ne(),ascending(),descending()
customPolicyDescription.descriptioneq(),ne(),startsWith(),ascending(),descending()
defaulteq(),ne(),ascending(),descending()
limitEarlyBookingPolicy.enabledeq(),ne(),ascending(),descending()
limitEarlyBookingPolicy.earliestBookingInMinuteseq(),ne(),in(),lt(),le(),gt(),ge(),ascending(),descending()
limitLateBookingPolicy.enabledeq(),ne(),ascending(),descending()
limitLateBookingPolicy.latestBookingInMinuteseq(),ne(),in(),lt(),le(),gt(),ge(),ascending(),descending()
bookAfterStartPolicy.enabledeq(),ne(),ascending(),descending()
cancellationPolicy.enabledeq(),ne(),ascending(),descending()
cancellationPolicy.limitLatestCancellationeq(),ne(),ascending(),descending()
cancellationPolicy.latestCancellationInMinuteseq(),ne(),in(),lt(),le(),gt(),ge(),ascending(),descending()
reschedulePolicy.enabledeq(),ne(),ascending(),descending()
reschedulePolicy.limitLatestRescheduleeq(),ne(),ascending(),descending()
reschedulePolicy.latestRescheduleInMinuteseq(),ne(),in(),lt(),le(),gt(),ge(),ascending(),descending()
waitlistPolicy.enabledeq(),ne(),ascending(),descending()
waitlistPolicy.capacityeq(),ne(),in(),lt(),le(),gt(),ge(),ascending(),descending()
waitlistPolicy.reservationTimeInMinuteseq(),ne(),in(),lt(),le(),gt(),ge(),ascending(),descending()
participantsPolicy.maxParticipantsPerBookingeq(),ne(),in(),lt(),le(),gt(),ge(),ascending(),descending()
resourcesPolicy.enabledeq(),ne(),ascending(),descending()
resourcesPolicy.autoAssignAllowedeq(),ne(),ascending(),descending()
Permissions
Manage Bookings Services and Settings
Manage Bookings - all permissions
Read Bookings - all read permissions
Manage Bookings
Read Bookings - Public Data
Read Bookings - Including Participants
Manage Stores
Learn more about app permissions.
Method Declaration
Copy
Request
This method does not take any parameters
Returns
Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?