Search.../
  1. Home
  2. Getting Started
  3. Overview
Generate a test token to explore our APIs

Cancel Schedule

Developer Preview

Cancels a schedule. Equivalent to batch cancel of sessions linked to a single schedule.
The schedule changes to status = CANCELED - all sessions up until the time of cancellation are kept, and all future sessions are removed.

Permissions
This endpoint requires the Manage Bookings permissions scope

Authorization

This endpoint requires an authorization header - pass the access token from the OAuth installation flow.

POST

https://www.wixapis.com/bookings/v1/calendar/schedules/{scheduleId}/cancel

Path Params

NAME
TYPE
DESCRIPTION
scheduleId
Required

string

Schedule ID.

Body Params

NAME
TYPE
DESCRIPTION
preserveFutureSessionsWithParticipants

boolean

Whether to preserve future sessions with reservations. Defaults to false.

notifyParticipants
Deprecated

boolean

Deprecated, use participant_notification

from

string

Time to cancel the sessions from. Optional. If this field is empty, all of this schedule's sessions will be canceled.

participantNotification

object

Whether to notify participants about the change, and an optional custom message.

Response Object

NAME
TYPE
DESCRIPTION
schedule

object

Schedule.

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Cancel Schedule without notifying.

Cancel a schedule without notifying participants

Request

curl

Copy Code
1curl -X POST \
2 'https://www.wixapis.com/bookings/v1/calendar/schedules/03d67e9c-5ba9-4e73-ad9e-7fddc57c6c4e' \
3 -H 'Authorization: <AUTH>'

Response

json

1
2{"schedule": {
3 "id": "03d67e9c-5ba9-4e73-ad9e-7fddc57c6c4e",
4 "scheduleOwnerId": "9b33d0b6-bcd2-408b-ac9d-f164504a16e2",
5 "firstSessionStart": "2019-08-19T11:00:00Z",
6 "lastSessionEnd": "2019-08-26T12:00:00Z",
7 "timeZone": "America/Denver",
8 "intervals": [ {
9 "id": "41f2f68b-9543-42b2-911b-cd98e5463ec1",
10 "start": "2019-08-18T21:00:00Z",
11 "end": "2019-08-26T20:59:59.999Z",
12 "interval": {
13 "daysOfWeek": "MON",
14 "hourOfDay": 14,
15 "minuteOfHour": 0,
16 "duration": 60
17 },
18 "frequency": {"repetition": 1},
19 "affectedSchedules": [ {
20 "scheduleId": "dc9585a4-a613-46fc-a229-59923efe08c6",
21 "transparency": "BUSY",
22 "scheduleOwnerId": "5460647f-ff8f-45f7-8311-a3aef2d8e9e8"
23 }]
24 }],
25 "title": "Intermediate Ski Lesson (members only)",
26 "tags": ["GROUP"],
27 "location": {"locationType": "OWNER_BUSINESS"},
28 "capacity": 50,
29 "rate": {
30 "labeledPriceOptions": {},
31 "priceText": "Free"
32 },
33 "availability": {
34 "start": "2019-08-19T00:00:00Z",
35 "end": "2019-08-26T00:00:00Z",
36 "linkedSchedules": []
37 },
38 "totalNumberOfParticipants": 0,
39 "participants": [],
40 "status": "CANCELLED",
41 "created": "2019-08-05T08:14:18.187Z",
42 "updated": "2020-04-29T05:46:27.589Z",
43 "version": 30,
44 "inheritedFields": ["timeZone"]
45}}
Cancel Schedule.