Search.../

Availability Calendar: Supported Fields, Filters, and Sorting

Query endpoints allow you to filter and sort results based on slot availability properties. This article covers field support for filtering and sorting.

Filtering

Specify the filter object in the following format:

"filter" : {
"fieldName": "value"
}
json | Copy Code

filter does not support the API Query Language comparison operators.

Note: Only the implied equal operator is supported. This means you can use the format above, but you cannot use the format below, even if $operator is $eq:

"filter" : {
"fieldName":{"$operator":"value"}
}
json | Copy Code

The following table shows field support for filtering with the slotAvailability object:

FieldRequiredFilterableSortableNotes
startDateRequiredNot filterableSortableReturns slots that start at, or after, this date. If timezone is specified, the startDate for the query is according to the local date and time, which means that the timezone offset in the format is ignored.
endDateRequiredReturns slots that end at, or before, this date. If the timezone is specified, the endDate for the query is according to the local date and time, which means that the timezone offset in the format is ignored.
serviceIdSupports multiple values, returned if slot is provided.
resourceId
scheduleIdNot filterableReturned if slot is provided.
sessionIdNot filterable
timezoneNot filterable
resourceNot filterable
bookableWhen filtered by true, returns only available slots. Otherwise, returns both available and non-available slots. This field is always returned.
bookingPolicyViolations.tooEarlyToBook
bookingPolicyViolations.tooLateToBook
location.businessLocation.idSupports multiple values.
openSpotsReturns slots with at least this number of open spots.
totalSpotsNot filterable
waitingListNot filterable
bookingPolicyViolationsNot filterable

Sorting

Currently, only sorting by slot.startDate is supported.

Specify the sort object in the following format:

"sort" : {
"fieldName":"sortField1",
"order":"ASC"
}
json | Copy Code

Related content: API Query Language, queryAvailability( )

Was this helpful?

In This Article
  1. Filtering
  2. Sorting