> 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 # Package: calendar # Namespace: scheduleTimeFramesV3 # Webhook link: https://dev.wix.com/docs/api-reference/business-management/calendar/schedule-time-frames-v3/schedule-time-frame-updated.md ## Introduction Triggered when a schedule's time frame is updated, indicating a new first or last event or a change in the recurrence period, such as an extension or reduction. --- ## REST API ### Schema ``` Webhook: Schedule Time Frame Updated Description: Triggered when a schedule's time frame is updated, indicating a new first or last event or a change in the recurrence period, such as an extension or reduction. Event body: - name: id | type: string | description: Unique event ID. Allows clients to ignore duplicate events. - name: entityFqdn | type: string | description: Fully qualified domain name of the entity associated with the event. - name: slug | type: string | description: Event name. - name: entityId | type: string | description: ID of the entity associated with the event. - name: eventTime | type: string (date-time) | description: Event timestamp. - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application such as GDPR. - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event. - name: updatedEvent | type: object | description: Updated event details. - name: currentEntity | type: ScheduleTimeFrame | description: The entity after the update. - 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. - name: modifiedFields | type: Map | description: Fields that were updated and their values before the update. ``` ### Examples ```curl { "id": "11d69e2d-6eb2-4a47-9373-b61d0ab45ff1", "entityFqdn": "wix.calendar.v3.schedule_time_frame", "slug": "updated", "entityId": "66dffe8b-9215-4439-9b5c-50d9fb03bffc", "updatedEvent": { "currentEntity": { "id": "66dffe8b-9215-4439-9b5c-50d9fb03bffc", "status": "INFINITE", "firstEventStartDate": { "localDate": "2024-09-30T10:00:00", "timeZone": "America/Cayman", "utcDate": "2024-09-30T15:00:00Z" }, "revision": "2" } }, "eventTime": "2024-09-25T17:17:01.850049818Z", "triggeredByAnonymizeRequest": false, "entityEventSequence": "2" } ``` --- ## JavaScript SDK ### Schema ``` Webhook: onScheduleTimeFrameUpdated Description: Triggered when a schedule's time frame is updated, indicating a new first or last event or a change in the recurrence period, such as an extension or reduction. Payload: ScheduleTimeFrameUpdatedEnvelope - name: entity | type: ScheduleTimeFrame | description: none - 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. - name: modifiedFields | type: Map | description: Fields that were updated and their values before the update. - ONE-OF: - name: nullValue | type: | description: - name: numberValue | type: number | description: - name: stringValue | type: string | description: - name: boolValue | type: boolean | description: - name: structValue | type: object | description: - name: listValue | type: ListValue | description: - name: values | type: array | description: - name: metadata | type: EventMetadata | description: none - name: instanceId | type: string | description: App instance GUID. - name: eventType | type: string | description: Event type. - name: identity | type: IdentificationData | description: The identification type and identity data. - ONE-OF: - name: anonymousVisitorId | type: string | description: GUID of a site visitor that has not logged in to the site. - name: memberId | type: string | description: GUID of a site visitor that has logged in to the site. - name: wixUserId | type: string | description: GUID of a Wix user (site owner, contributor, etc.). - name: appId | type: string | description: GUID of an app. - name: identityType | type: WebhookIdentityType | description: - enum: UNKNOWN, ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP - name: accountInfo | type: AccountInfo | description: Details related to the account - name: accountId | type: string | description: GUID of the Wix account associated with the event. - name: parentAccountId | type: string | description: GUID of the parent Wix account. Only included when accountId belongs to a child account. - name: siteId | type: string | description: GUID of the Wix site associated with the event. Only included when the event is tied to a specific site. - name: _id | type: string | description: Event GUID. With this GUID you can easily spot duplicated events and ignore them. - name: entityFqdn | type: string | description: Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. - name: slug | type: string | description: Event action name, placed at the top level to make it easier for users to dispatch messages. For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. - name: entityId | type: string | description: GUID of the entity associated with the event. - name: eventTime | type: Date | description: Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application (for example, GDPR). - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event. - name: entityEventSequence | type: string | description: A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. ``` ### Examples ```javascript import { scheduleTimeFrames } from '@wix/calendar'; scheduleTimeFrames.onScheduleTimeFrameUpdated((event) => { // handle your event here }); ``` ```javascript import { createClient, AppStrategy } from '@wix/sdk'; import { scheduleTimeFrames } from '@wix/calendar'; const wixClient = createClient({ auth: AppStrategy({ appId: 'MY-APP-ID', publicKey: 'YOUR_APP_PUBLIC_KEY', }), modules: { scheduleTimeFrames, }, }); wixClient.scheduleTimeFrames.onScheduleTimeFrameUpdated((event) => { // handle your event here }); ``` ---