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

Create Session

Developer Preview

Creates a session (adds a session to a schedule).

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/sessions

Body Params

NAME
TYPE
DESCRIPTION
session
Required

object

Session.

deleted

object

Session fields to revert to empty, in order to revert to the data inherited from the schedule.

Response Object

NAME
TYPE
DESCRIPTION
session

object

Session.

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Create Sessions

Create a session on a a given schedule.

Request

curl

Copy Code
1curl -X POST \
2 'https://www.wixapis.com/bookings/v1/calendar/sessions' \
3 -H "Content-Type: application/json" \
4 -H 'Authorization: <AUTH>' \
5 --data '{
6 "session": {
7 "scheduleId": "03d67e9c-5ba9-4e73-ad9e-7fddc57c6c4e",
8 "affectedSchedules": [
9 {
10 "transparency": "BUSY",
11 "scheduleId": "06be0abc-8a6a-4b7b-93c1-70d053ffd97f"
12 }
13 ],
14 "start": {
15 "timestamp": "2020-04-16T11:00:00.000-07:00"
16 },
17 "end": {
18 "timestamp": "2020-04-16T12:00:00.000-07:00"
19 }
20 }
21 }'

Response

json

1
2{"session": {
3 "id": "2mmoW0vwKcSFyxtOfCdMr5jzNtbCs62lQ62AcLzRcPOZFywzW4Ei3WJC79mkE1rRreylI1FCRYfP3MB36naHxEou7NieV8Cfdbu1",
4 "scheduleId": "03d67e9c-5ba9-4e73-ad9e-7fddc57c6c4e",
5 "scheduleOwnerId": "9b33d0b6-bcd2-408b-ac9d-f164504a16e2",
6 "start": {
7 "timestamp": "2020-04-16T18:00:00Z",
8 "timeZone": "America/Denver"
9 },
10 "end": {
11 "timestamp": "2020-04-16T19:00:00Z",
12 "timeZone": "America/Denver"
13 },
14 "affectedSchedules": [ {
15 "scheduleId": "06be0abc-8a6a-4b7b-93c1-70d053ffd97f",
16 "transparency": "BUSY",
17 "scheduleOwnerId": "1d6a2248-34e7-4bbc-a6e3-bf0ce71f594f"
18 }],
19 "title": "Intermediate Ski Lesson (members only)",
20 "tags": ["GROUP"],
21 "location": {"locationType": "OWNER_BUSINESS"},
22 "capacity": 50,
23 "rate": {
24 "labeledPriceOptions": {},
25 "priceText": "Free"
26 },
27 "notes": "",
28 "totalNumberOfParticipants": 0,
29 "participants": [],
30 "inheritedFields": [
31 "rate",
32 "location",
33 "tags",
34 "externalCalendarOverrides",
35 "title",
36 "capacity"
37 ],
38 "status": "CONFIRMED",
39 "type": "EVENT"
40}}