> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # QueryScheduleItems # Package: eventManagement # Namespace: ScheduleManagement # Method link: https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/schedule-items/query-schedule-items.md ## Permission Scopes: Manage Events: SCOPE.EVENTS.MANAGE-EVENTS ## Introduction Retrieves a list of up to 100 schedule items given the provided paging, filtering, and sorting. Query Schedule Items runs with these defaults, which you can override: - `timeSlotStart` and `timeSlotEnd` in `ASC` order To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/rest/articles/getting-started/field-projection.md). --- ## REST API ### Schema ``` Method: queryScheduleItems Description: Retrieves a list of up to 100 schedule items given the provided paging, filtering, and sorting. Query Schedule Items runs with these defaults, which you can override: - `timeSlotStart` and `timeSlotEnd` in `ASC` order To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/rest/articles/getting-started/field-projection.md). URL: https://www.wixapis.com/events/v1/schedule/query Method: POST Method parameters: param name: query | type: QueryV2 - name: paging | type: Paging | description: Pointer to page of results using offset. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). - name: limit | type: integer | description: Number of items to load per page. - name: offset | type: integer | description: Number of items to skip in the current sort order. - name: filter | type: object | description: Filter. See [supported fields and operators](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_list-query-events). - name: sort | type: array | description: Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] See [supported fields](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_list-query-events). - name: fieldName | type: string | description: Name of the field to sort by - name: order | type: SortOrder | description: Sort order (ASC/DESC). Defaults to ASC - enum: ASC, DESC Return type: QueryScheduleItemsResponse - name: pagingMetadata | type: PagingMetadataV2 | description: - name: count | type: integer | description: Number of items returned in the response. - name: offset | type: integer | description: Offset that was requested. - name: total | type: integer | description: Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field. - name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. - name: next | type: string | description: Cursor string pointing to the next page in the list of results. - name: prev | type: string | description: Cursor pointing to the previous page in the list of results. - name: items | type: array | description: Schedule items. - name: id | type: string | description: Schedule item GUID. - name: hidden | type: boolean | description: Whether a schedule item is hidden from guests. - name: name | type: string | description: Schedule item name. - name: timeSlot | type: TimeInterval | description: Time slot of a schedule item. - name: start | type: string | description: Start of the time slot interval, inclusive. - name: end | type: string | description: End of the time slot interval, exclusive. - name: timeZoneId | type: string | description: Time zone GUID in TZ database format, e.g., `"EST"`, `"America/Los_Angeles"`. Defaults to `"Etc/UTC"` when not set. - name: description | type: string | description: Rich text schedule item description. - name: stageName | type: string | description: Stage or room name in which a session takes place. - name: tags | type: array | description: Schedule item tags. Used to organize the items by a theme. - name: status | type: ScheduleStatus | description: Schedule item status. - enum: - SCHEDULED: Item is scheduled for a future date. - CANCELED: Item is canceled. - name: createdDate | type: string | description: Date and time the schedule item was created. - name: updatedDate | type: string | description: Date and time the schedule item was updated. - name: eventId | type: string | description: Event GUID to which the schedule item belongs. - name: draft | type: boolean | description: Whether the schedule item is a draft. Possible Errors: HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: FILTER_PARSER_ERROR | Description: The filter expression can't be parsed. ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.eventManagement.ScheduleManagement.queryScheduleItems(query) Description: Retrieves a list of up to 100 schedule items given the provided paging, filtering, and sorting. Query Schedule Items runs with these defaults, which you can override: - `timeSlotStart` and `timeSlotEnd` in `ASC` order To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/rest/articles/getting-started/field-projection.md). # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: query Method parameters: param name: query | type: ScheduleItemQuery | required: true - name: paging | type: Paging | description: Pointer to page of results using offset. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). - name: limit | type: integer | description: Number of items to load per page. - name: offset | type: integer | description: Number of items to skip in the current sort order. - name: filter | type: object | description: Filter. See [supported fields and operators](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_list-query-events). - name: sort | type: array | description: Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] See [supported fields](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_list-query-events). - name: fieldName | type: string | description: Name of the field to sort by - name: order | type: SortOrder | description: Sort order (ASC/DESC). Defaults to ASC - enum: ASC, DESC Return type: PROMISE - name: pagingMetadata | type: PagingMetadataV2 | description: - name: count | type: integer | description: Number of items returned in the response. - name: offset | type: integer | description: Offset that was requested. - name: total | type: integer | description: Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field. - name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. - name: next | type: string | description: Cursor string pointing to the next page in the list of results. - name: prev | type: string | description: Cursor pointing to the previous page in the list of results. - name: items | type: array | description: Schedule items. - name: _id | type: string | description: Schedule item GUID. - name: hidden | type: boolean | description: Whether a schedule item is hidden from guests. - name: name | type: string | description: Schedule item name. - name: timeSlot | type: TimeInterval | description: Time slot of a schedule item. - name: start | type: Date | description: Start of the time slot interval, inclusive. - name: end | type: Date | description: End of the time slot interval, exclusive. - name: timeZoneId | type: string | description: Time zone GUID in TZ database format, e.g., `"EST"`, `"America/Los_Angeles"`. Defaults to `"Etc/UTC"` when not set. - name: description | type: string | description: Rich text schedule item description. - name: stageName | type: string | description: Stage or room name in which a session takes place. - name: tags | type: array | description: Schedule item tags. Used to organize the items by a theme. - name: status | type: ScheduleStatus | description: Schedule item status. - enum: - SCHEDULED: Item is scheduled for a future date. - CANCELED: Item is canceled. - name: _createdDate | type: Date | description: Date and time the schedule item was created. - name: _updatedDate | type: Date | description: Date and time the schedule item was updated. - name: eventId | type: string | description: Event GUID to which the schedule item belongs. - name: draft | type: boolean | description: Whether the schedule item is a draft. Possible Errors: HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: FILTER_PARSER_ERROR | Description: The filter expression can't be parsed. ``` ### Examples ### queryScheduleItems ```javascript import { schedule } from '@wix/events'; async function queryScheduleItems(query) { const response = await schedule.queryScheduleItems(query); }; ``` ### queryScheduleItems (with elevated permissions) ```javascript import { schedule } from '@wix/events'; import { auth } from '@wix/essentials'; async function myQueryScheduleItemsMethod(query) { const elevatedQueryScheduleItems = auth.elevate(schedule.queryScheduleItems); const response = await elevatedQueryScheduleItems(query); } ``` ### queryScheduleItems (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { schedule } from '@wix/events'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { schedule }, // Include the auth strategy and host as relevant }); async function queryScheduleItems(query) { const response = await myWixClient.schedule.queryScheduleItems(query); }; ``` ---