Post

Query Sessions


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves a list of sessions, given the provided time range, filtering, and paging.

To query for event instances within a specified time range of up to 1 year, provide a startDate and endDate.

Query Sessions runs with these defaults, which you can override:

  • Only sessions of type EVENT are returned. An event is a single or recurring session that appears in a calendar, for example an appointment or a class.
  • instances is true. This means only single session instances and instances of recurring sessions are returned.
  • includeExternal is false. This means that sessions imported from connected external calendars are not returned.
  • Session objects are returned with the fields specified in the NO_PI fieldset. This means they don't contain personal information.
  • query.cursorPaging.limit is 100.

Note the following limitations, which you can't override:

  • Sessions are always sorted by start.timestamp in ASC order.
  • The maximum time range you can query for session instances is 1 year. If you are querying for recurring session definitions, rather than session instances, this limit doesn't apply.
  • Pagination is not supported for recurring session definition queries.

To query only for working hours sessions, set type to WORKING_HOURS. A working hours session is a single or recurring session that defines availability in a schedule.

To query for all session types, including events and working hours sessions, set type to ALL.

To query for recurring session pattern definitions, set instances to false. In this case, fromDate and toDate may be more than 1 year apart.

To return session objects including personal information, use the ALL_PI fieldset. This requires the Read Bookings Calendar - Including Participants or the Manage Bookings Services and Settings or the Manage Business Calendar permission scope.

For details on fieldsets, see Sessions: Supported Fieldsets.

For field support for filters, see Sessions: Supported Filters.

To learn about working with Query endpoints in general, see API Query Language and Field Projection.

Permissions
Manage Bookings - all permissions
Read Bookings - all read permissions
Manage Bookings
Read Bookings - Public Data
Read Bookings - Including Participants
Read Bookings Calendar Availability
Read bookings calendar - including participants
Read Bookings Calendar
Manage Bookings Services and Settings
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/bookings/v2/calendar/sessions/query

Did this help?