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

Update Service

Developer Preview

Updated a service

Authorization

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

Permissions

This endpoint requires the Manage Bookings permission scope.

PUT

https://www.wixapis.com/bookings/v1/services/{service.id}

Path Params

NAME
TYPE
DESCRIPTION
service.id
Required

string

Service ID.

Body Params

NAME
TYPE
DESCRIPTION
scheduleActions

object

Actions to perform on the service's schedules. Can contain schedules to create, update, and cancel. Either the 'schedules' or 'schedule_actions' should be specified but not both.

schedules

Array<object>

List of schedules to be updated for that service. These schedules should be an updated schedules of schedules which already associated to this service. Either the 'schedules' or 'schedule_actions' should be specified but not both.

service
Required

object

The service entity to update.

notifyParticipants
Deprecated

boolean

Whether to notify participants about changed sessions. deprecated, use participant_notification

participantNotification

object

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

Response Object

Returns an empty object.

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Update course service

Update a course service and its schedule

Request

curl

Copy Code
1curl -X PUT \
2 'https://www.wixapis.com/bookings/v1/services/19ab8b27-2cf5-4f79-b92d-2ec24285e6c7' \
3 -H "Content-Type: application/json" \
4 -H 'Authorization: <AUTH>' \
5 --data '{
6 "service": {
7 "info": {
8 "name": "Updated Car Advanced Driving",
9 "description": "You will learn to drive here",
10 "images": [
11 {
12 "id": "d31c400996334a829a5be50d8600e8db.jpg",
13 "url": "d31c400996334a829a5be50d8600e8db.jpg",
14 "height": 2726,
15 "width": 4104
16 }
17 ],
18 "tagLine": "A Long Driving Course"
19 },
20 "policy": {
21 "maxParticipantsPerBooking": 1,
22 "bookUpToXMinutesBefore": 1440,
23 "cancelRescheduleUpToXMinutesBefore": 61,
24 "isBookOnlineAllowed": true,
25 "isCancelAllowed": true,
26 "isRescheduleAllowed": true,
27 "futureBookingsPolicy": {
28 "shouldLimit": false,
29 "limitXMinutesToTheFuture": 1440
30 },
31 "waitingListPolicy": {
32 "isEnabled": false,
33 "capacity": 10,
34 "timeWindowMinutes": 10
35 }
36 },
37 "paymentOptions": {
38 "wixPayOnline": true,
39 "wixPayInPerson": false,
40 "custom": false,
41 "wixPaidPlan": false
42 },
43 "categoryId": "77dff5ea-792a-4a3c-a49d-8b19124083d1",
44 "bookingFormId": "00000000-0000-0000-0000-000000000000",
45 "scheduleIds": [
46 "337cfb7a-f194-4bdf-8e89-ce1562172a37"
47 ],
48 "customProperties": {
49 "uouHidden": "false",
50 "order": "13"
51 },
52 "sortOrder": 13
53 },
54 "schedules": [
55 {
56 "id": "337cfb7a-f194-4bdf-8e89-ce1562172a37",
57 "scheduleOwnerId": "534e8a81-0110-46f3-a920-4a4e7fcd7454",
58 "firstSessionStart": "2020-03-23T07:00:00Z",
59 "lastSessionEnd": "2020-04-22T15:00:00Z",
60 "timeZone": "Asia/Jerusalem",
61 "intervals": [
62 {
63 "id": "4207fd9f-b0c1-4b1e-b98b-1077bf4d0d34",
64 "start": "2020-03-22T22:00:00Z",
65 "end": "2020-04-23T20:59:59.999Z",
66 "interval": {
67 "daysOfWeek": "MON",
68 "hourOfDay": 9,
69 "minuteOfHour": 0,
70 "duration": 540
71 },
72 "frequency": {
73 "repetition": 1
74 },
75 "affectedSchedules": [
76 {
77 "scheduleId": "71286e3b-8391-47ed-a78b-cf3be0e4db1b",
78 "transparency": "BUSY",
79 "scheduleOwnerId": "b48faa02-2f23-4253-85e2-55cd27deef97"
80 }
81 ]
82 },
83 {
84 "id": "492122aa-aeec-486e-924a-4e150a39b8ec",
85 "start": "2020-03-22T22:00:00Z",
86 "end": "2020-04-23T20:59:59.999Z",
87 "interval": {
88 "daysOfWeek": "WED",
89 "hourOfDay": 9,
90 "minuteOfHour": 0,
91 "duration": 540
92 },
93 "frequency": {
94 "repetition": 1
95 },
96 "affectedSchedules": [
97 {
98 "scheduleId": "71286e3b-8391-47ed-a78b-cf3be0e4db1b",
99 "transparency": "BUSY",
100 "scheduleOwnerId": "b48faa02-2f23-4253-85e2-55cd27deef97"
101 }
102 ]
103 },
104 {
105 "id": "20ceef74-137d-43f0-8414-2ecb21e2bbc7",
106 "start": "2020-03-22T22:00:00Z",
107 "end": "2020-04-23T20:59:59.999Z",
108 "interval": {
109 "daysOfWeek": "FRI",
110 "hourOfDay": 9,
111 "minuteOfHour": 0,
112 "duration": 540
113 },
114 "frequency": {
115 "repetition": 1
116 },
117 "affectedSchedules": [
118 {
119 "scheduleId": "71286e3b-8391-47ed-a78b-cf3be0e4db1b",
120 "transparency": "BUSY",
121 "scheduleOwnerId": "b48faa02-2f23-4253-85e2-55cd27deef97"
122 }
123 ]
124 }
125 ],
126 "title": "Car Advanced Driving",
127 "tags": [
128 "COURSE"
129 ],
130 "location": {
131 "locationType": "OWNER_BUSINESS"
132 },
133 "capacity": 50,
134 "rate": {
135 "labeledPriceOptions": {
136 "general": {
137 "amount": "199.99",
138 "currency": "USD",
139 "downPayAmount": "0"
140 }
141 },
142 "priceText": ""
143 },
144 "availability": {
145 "start": "2020-03-22T22:00:00Z",
146 "end": "2020-04-23T20:59:59.999Z"
147 },
148 "status": "CREATED"
149 }
150 ]
151
152 }
153 '

Response

json

1
2{}
Update appointment service
Update class service