> 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 # GetScheduleTimeFrame # Package: calendar # Namespace: ScheduleTimeFramesService # Method link: https://dev.wix.com/docs/api-reference/business-management/calendar/schedule-time-frames-v3/get-schedule-time-frame.md ## Permission Scopes: Read Calendar: SCOPE.DC-CALENDAR.READ-PUBLIC ## Introduction Retrieves a schedule time frame by schedule ID. --- ## REST API ### Schema ``` Method: getScheduleTimeFrame Description: Retrieves a schedule time frame by schedule GUID. URL: https://www.wixapis.com/calendar/v3/schedules/timeframe/{id} Method: GET # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: id Method parameters: param name: id | type: none | required: true query param name: timeZone | type: timeZone | description: Time zone for adjusting the times of the returned schedule time frame. Default: `timeZone` of the [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/properties-object.md) Return type: GetScheduleTimeFrameResponse - name: scheduleTimeFrame | type: ScheduleTimeFrame | description: Retrieved schedule time frame. - name: id | type: string | description: GUID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object.md) to which the time frame belongs. - name: status | type: Status | description: Information about the presence of recurring events within the schedule. Supported values: + `NONE`: No [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) are scheduled within the schedule. + `FINITE`: All recurring events within the schedule have a defined end date, or there are no recurring events. + `INFINITE`: At least one recurring event within the schedule has no end date, meaning it follows an unlimited repetition pattern. - enum: - NONE: No [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) that belong to the schedule. - FINITE: There are no recurring events or all recurring events belonging to the schedule have a defined end date. - INFINITE: At least one recurring event belonging to the schedule has an unlimited repetition pattern (no end date). - name: firstEventStartDate | type: ZonedDate | description: Start date of the first [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) within the schedule. Identical to `event.start.localDate`. Available only if `status` is set to `FINITE` or `INFINITE`. - name: localDate | type: string | description: Local date time in [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601). For example, `2024-01-30T13:30:00`. Wix Calendar APIs ignore seconds. - name: timeZone | type: string | description: Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database). For example, `America/New_York`. - name: utcDate | type: string | description: UTC date time in [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601). For example, `2024-01-30T13:30:00`. Not available for adjusted date fields. - name: lastEventEndDate | type: ZonedDate | description: End date of the last [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) belonging to the schedule. Identical to `event.end.localDate`. Available only if `status` is set to `FINITE`. - name: adjustedFirstEventStartDate | type: ZonedDate | description: Start date of the first [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) belonging to the schedule, adjusted to `timeZone` of the [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/properties-object.md) or the `timeZone` specified in the request. Identical to `event.adjustedStart.localDate`. - name: adjustedLastEventEndDate | type: ZonedDate | description: End date of the last [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) belonging to the schedule, adjusted to `timeZone` of the [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/properties-object.md) or the `timeZone` specified in the request. Identical to `event.adjustedEnd.localDate`. - name: revision | type: string | description: Revision number, which increments by 1 each time the schedule time frame is updated. ``` ### Examples ### Get Schedule Time Frame ```curl curl -X GET \ 'https://www.wixapis.com/calendar/v3/schedules/timeframe/05279386-2859-49d6-9727-0096ad74e014' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.calendar.ScheduleTimeFramesService.getScheduleTimeFrame(_id, options) Description: Retrieves a schedule time frame by schedule GUID. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: _id Method parameters: param name: _id | type: string | description: [Schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object.md) GUID for which to retrieve the schedule time frame. | required: true param name: options | type: GetScheduleTimeFrameOptions none - name: timeZone | type: string | description: Time zone for adjusting the times of the returned schedule time frame. Default: `timeZone` of the [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/properties-object.md) Return type: PROMISE - name: _id | type: string | description: GUID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object.md) to which the time frame belongs. - name: status | type: Status | description: Information about the presence of recurring events within the schedule. Supported values: + `NONE`: No [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) are scheduled within the schedule. + `FINITE`: All recurring events within the schedule have a defined end date, or there are no recurring events. + `INFINITE`: At least one recurring event within the schedule has no end date, meaning it follows an unlimited repetition pattern. - enum: - NONE: No [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) that belong to the schedule. - FINITE: There are no recurring events or all recurring events belonging to the schedule have a defined end date. - INFINITE: At least one recurring event belonging to the schedule has an unlimited repetition pattern (no end date). - name: firstEventStartDate | type: ZonedDate | description: Start date of the first [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) within the schedule. Identical to `event.start.localDate`. Available only if `status` is set to `FINITE` or `INFINITE`. - name: localDate | type: string | description: Local date time in [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601). For example, `2024-01-30T13:30:00`. Wix Calendar APIs ignore seconds. - name: timeZone | type: string | description: Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database). For example, `America/New_York`. - name: utcDate | type: Date | description: UTC date time in [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601). For example, `2024-01-30T13:30:00`. Not available for adjusted date fields. - name: lastEventEndDate | type: ZonedDate | description: End date of the last [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) belonging to the schedule. Identical to `event.end.localDate`. Available only if `status` is set to `FINITE`. - name: adjustedFirstEventStartDate | type: ZonedDate | description: Start date of the first [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) belonging to the schedule, adjusted to `timeZone` of the [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/properties-object.md) or the `timeZone` specified in the request. Identical to `event.adjustedStart.localDate`. - name: adjustedLastEventEndDate | type: ZonedDate | description: End date of the last [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) belonging to the schedule, adjusted to `timeZone` of the [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/properties-object.md) or the `timeZone` specified in the request. Identical to `event.adjustedEnd.localDate`. - name: revision | type: string | description: Revision number, which increments by 1 each time the schedule time frame is updated. ``` ### Examples ### getScheduleTimeFrame ```javascript import { scheduleTimeFrames } from '@wix/calendar'; async function getScheduleTimeFrame(_id,options) { const response = await scheduleTimeFrames.getScheduleTimeFrame(_id,options); }; ``` ### getScheduleTimeFrame (with elevated permissions) ```javascript import { scheduleTimeFrames } from '@wix/calendar'; import { auth } from '@wix/essentials'; async function myGetScheduleTimeFrameMethod(_id,options) { const elevatedGetScheduleTimeFrame = auth.elevate(scheduleTimeFrames.getScheduleTimeFrame); const response = await elevatedGetScheduleTimeFrame(_id,options); } ``` ### getScheduleTimeFrame (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 { scheduleTimeFrames } from '@wix/calendar'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { scheduleTimeFrames }, // Include the auth strategy and host as relevant }); async function getScheduleTimeFrame(_id,options) { const response = await myWixClient.scheduleTimeFrames.getScheduleTimeFrame(_id,options); }; ``` ---