@wix/auto_sdk_bookings_multi-service-availability-time-slots 1.0.156 → 1.0.158
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +52 -123
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +324 -560
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +145 -216
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +52 -123
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +324 -560
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +145 -216
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +52 -123
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +324 -560
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +145 -216
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +52 -123
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +324 -560
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +145 -216
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
@@ -1,193 +1,185 @@
|
|
1
1
|
import { NonNullablePaths } from '@wix/sdk-types';
|
2
2
|
|
3
3
|
/**
|
4
|
-
*
|
5
|
-
*
|
4
|
+
* A time slot represents a specific time period when a service is available for booking.
|
5
|
+
* It provides all the information needed to display availability to customers, including whether customers can actually book it, the remaining capacity, and which staff members or resources are available.
|
6
|
+
* Available time slots may not always be bookable due to service booking policies - when this occurs, the time slot includes information about the specific booking restrictions.
|
6
7
|
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
* 2. In what location the service is available for this slot?
|
10
|
-
*
|
11
|
-
* 3. Which available resources can provide the service for this slot?
|
12
|
-
*
|
13
|
-
* 4. Does booking the slot for the service violates any of the service booking policies?
|
14
|
-
*
|
15
|
-
* 5. What is the total capacity and remaining capacity of the service at the time of the calculation of the `TimeSlot`?
|
16
|
-
*
|
17
|
-
* > __Note:__
|
18
|
-
* > When the `TimeSlot` has a non empty `NestedTimeSlots`, it represents the availability information
|
19
|
-
* > for a given list of `Appointment` services within a specific time slot.
|
8
|
+
* For multi-service bookings, the top-level time slot acts as a container spanning the entire service sequence (from the start of the first service to the end of the last service). Individual service details are provided in nested time slots.
|
20
9
|
*/
|
21
10
|
interface TimeSlot {
|
22
11
|
/**
|
23
|
-
* Service ID.
|
12
|
+
* Service ID ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction)).
|
24
13
|
*
|
25
|
-
*
|
26
|
-
* > Instead, each nested time slot has its own serviceId.
|
14
|
+
* Available only for single-service bookings. For multi-service bookings, this field is empty and individual service IDs are provided in `nestedTimeSlots`.
|
27
15
|
* @format GUID
|
28
16
|
*/
|
29
17
|
serviceId?: string | null;
|
30
18
|
/**
|
31
|
-
* Local start date of the time slot in ISO-8601 format.
|
32
|
-
* For example,
|
19
|
+
* Local start date of the time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
20
|
+
* For example, `2026-01-30T13:30:00`.
|
21
|
+
*
|
22
|
+
* For multi-service bookings, this represents the start time of the first service in the sequence.
|
33
23
|
* @format LOCAL_DATE_TIME
|
34
24
|
*/
|
35
25
|
localStartDate?: string | null;
|
36
26
|
/**
|
37
|
-
* Local end date of the time slot in ISO-8601 format.
|
38
|
-
* For example,
|
27
|
+
* Local end date of the time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
28
|
+
* For example, `2026-01-30T14:00:00`.
|
29
|
+
*
|
30
|
+
* For multi-service bookings, this represents the end time of the last service in the sequence.
|
39
31
|
* @format LOCAL_DATE_TIME
|
40
32
|
*/
|
41
33
|
localEndDate?: string | null;
|
42
34
|
/**
|
43
|
-
* Whether the slot
|
35
|
+
* Whether customers can book the slot according to the service's booking policies ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction)).
|
44
36
|
*
|
45
|
-
*
|
46
|
-
* the returned value is `true`. Otherwise, returns `false`.
|
37
|
+
* For multi-service bookings, this is `true` only when all services in the sequence comply with their respective booking policies.
|
47
38
|
*/
|
48
39
|
bookable?: boolean | null;
|
49
|
-
/**
|
40
|
+
/** Information about where the business provides the service to the customer. */
|
50
41
|
location?: Location;
|
51
|
-
/**
|
42
|
+
/**
|
43
|
+
* Information about the event ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)) related to the slot.
|
44
|
+
* Available only for classes. Not available for appointment-based services and courses.
|
45
|
+
*/
|
52
46
|
eventInfo?: EventInfo;
|
53
47
|
/**
|
54
48
|
* Total number of spots for the slot.
|
49
|
+
*
|
50
|
+
* For multi-service bookings, this is always `1` because customers book the entire service sequence as a single unit.
|
55
51
|
* @min 1
|
56
52
|
* @max 1000
|
57
53
|
*/
|
58
54
|
totalCapacity?: number | null;
|
59
55
|
/**
|
60
56
|
* Remaining number of spots for the slot.
|
61
|
-
*
|
57
|
+
* This is calculated as total capacity minus booked spots, but doesn't account for waitlist reservations.
|
58
|
+
*
|
59
|
+
* If the service has a waitlist enabled, use `bookableCapacity` instead to get the accurate number of spots customers can actually book.
|
60
|
+
*
|
61
|
+
* For single-service bookings: An appointment service with total capacity of 3 spots and 1 booked spot results in a remaining capacity of `2`.
|
62
|
+
* For multi-service bookings: This is either `1` (sequence available) or `0` (sequence unavailable).
|
62
63
|
* @max 1000
|
63
64
|
*/
|
64
65
|
remainingCapacity?: number | null;
|
65
66
|
/**
|
66
|
-
* Number of spots
|
67
|
-
*
|
67
|
+
* Number of spots that customers can book for the slot.
|
68
|
+
* Calculated as the remaining capacity minus the spots reserved for the waitlist.
|
69
|
+
* If the service has no waitlist, identical to `remainingCapacity`.
|
70
|
+
*
|
71
|
+
* For multi-service bookings, this is either `1` (sequence can be booked) or `0` (sequence cannot be booked).
|
68
72
|
*/
|
69
73
|
bookableCapacity?: number | null;
|
70
74
|
/**
|
71
|
-
*
|
75
|
+
* Information about booking policy violations for the slot.
|
72
76
|
*
|
73
|
-
*
|
74
|
-
* we will return also slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.
|
77
|
+
* For multi-service bookings, this aggregates violations from all services in the sequence.
|
75
78
|
*/
|
76
79
|
bookingPolicyViolations?: BookingPolicyViolations;
|
77
80
|
/**
|
78
|
-
* List of
|
79
|
-
* Each `AvailableResources` contains information about available resources of the same type.
|
81
|
+
* List of resources ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/introduction)) available during the time slot.
|
80
82
|
*
|
81
|
-
*
|
82
|
-
* > Instead, each nested time slot has its own available resources.
|
83
|
+
* Available only for single-service bookings. For multi-service bookings, resource information is provided in `nestedTimeSlots`.
|
83
84
|
*/
|
84
85
|
availableResources?: AvailableResources[];
|
85
86
|
/**
|
86
|
-
*
|
87
|
-
*
|
87
|
+
* Nested time slots for multi-service bookings.
|
88
|
+
* Each nested slot represents 1 service in the sequence, ordered according to the service sequence specified in the request.
|
89
|
+
*
|
90
|
+
* Available only for multi-service bookings. Empty for single-service bookings.
|
88
91
|
* @maxSize 8
|
89
92
|
*/
|
90
93
|
nestedTimeSlots?: NestedTimeSlot[];
|
91
|
-
/**
|
94
|
+
/** Information about why customers can't book the time slot. */
|
92
95
|
nonBookableReasons?: NonBookableReasons;
|
93
96
|
/**
|
94
|
-
*
|
95
|
-
* Same as the service
|
97
|
+
* Schedule ID associated with this time slot.
|
98
|
+
* Same as the service's schedule ID.
|
96
99
|
* @format GUID
|
97
100
|
*/
|
98
101
|
scheduleId?: string | null;
|
99
102
|
}
|
100
103
|
interface Location {
|
101
104
|
/**
|
102
|
-
*
|
105
|
+
* Location ID ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction)).
|
106
|
+
* Available only for business locations.
|
103
107
|
* @format GUID
|
104
108
|
*/
|
105
109
|
_id?: string | null;
|
106
|
-
/**
|
110
|
+
/** Location name. */
|
107
111
|
name?: string | null;
|
108
|
-
/**
|
112
|
+
/** Formatted location address. */
|
109
113
|
formattedAddress?: string | null;
|
110
|
-
/**
|
111
|
-
* The type of location:
|
112
|
-
* - `CUSTOM`: The location is specific to this service, and is not derived from the business location.
|
113
|
-
* - `BUSINESS`: A business location, either the default business address, or locations defined for the business by the Business Info.
|
114
|
-
* - `CUSTOMER`: The location is determined by the customer and is not set up beforehand.
|
115
|
-
*/
|
114
|
+
/** Location type. */
|
116
115
|
locationType?: LocationTypeWithLiterals;
|
117
116
|
}
|
118
117
|
declare enum LocationType {
|
119
118
|
UNKNOWN_LOCATION_TYPE = "UNKNOWN_LOCATION_TYPE",
|
120
119
|
/** A business location, either the default business address, or locations defined for the business by the Business Info. */
|
121
120
|
BUSINESS = "BUSINESS",
|
122
|
-
/** The location is unique to this service and isn't defined as
|
121
|
+
/** The location is unique to this service and isn't defined as 1 of the business locations. */
|
123
122
|
CUSTOM = "CUSTOM",
|
124
|
-
/** The location can be determined by the customer and
|
123
|
+
/** The location can be determined by the customer and isn't set up beforehand. */
|
125
124
|
CUSTOMER = "CUSTOMER"
|
126
125
|
}
|
127
126
|
/** @enumType */
|
128
127
|
type LocationTypeWithLiterals = LocationType | 'UNKNOWN_LOCATION_TYPE' | 'BUSINESS' | 'CUSTOM' | 'CUSTOMER';
|
129
|
-
/**
|
128
|
+
/** Available for event based slots, and not for availability based slots */
|
130
129
|
interface EventInfo {
|
131
130
|
/**
|
132
|
-
*
|
131
|
+
* Event ID.
|
133
132
|
* @minLength 36
|
134
133
|
* @maxLength 250
|
135
134
|
*/
|
136
135
|
eventId?: string | null;
|
137
|
-
/**
|
136
|
+
/** Information about the event's waitlist. Available only if the service has a waitlist. */
|
138
137
|
waitingList?: WaitingList;
|
139
138
|
}
|
140
139
|
interface WaitingList {
|
141
140
|
/**
|
142
|
-
* Total number of spots in the
|
141
|
+
* Total number of spots in the waitlist.
|
143
142
|
* @min 1
|
144
143
|
*/
|
145
144
|
totalCapacity?: number | null;
|
146
145
|
/**
|
147
|
-
* Number of remaining spots in the
|
148
|
-
* For example,
|
146
|
+
* Number of remaining spots in the waitlist.
|
147
|
+
* For example, an event with a waitlist for 10 people and 3 registrants, results in a remaining capacity of `7`.
|
149
148
|
*/
|
150
149
|
remainingCapacity?: number | null;
|
151
150
|
}
|
152
151
|
interface BookingPolicyViolations {
|
153
|
-
/**
|
152
|
+
/** Whether it's too early for customers to book the slot. */
|
154
153
|
tooEarlyToBook?: boolean | null;
|
155
|
-
/**
|
154
|
+
/** Earliest time for booking the slot in `YYYY-MM-DDThh:mm:ss.sssZ` format. */
|
156
155
|
earliestBookingDate?: Date | null;
|
157
|
-
/**
|
156
|
+
/** Whether it's too late for customers to book the slot. */
|
158
157
|
tooLateToBook?: boolean | null;
|
159
|
-
/**
|
158
|
+
/** Whether customers can book the service online. */
|
160
159
|
bookOnlineDisabled?: boolean | null;
|
161
160
|
}
|
162
161
|
interface AvailableResources {
|
163
162
|
/**
|
164
|
-
* Resource type ID.
|
163
|
+
* Resource type ID ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resource-types/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction)).
|
165
164
|
* @format GUID
|
166
165
|
*/
|
167
166
|
resourceTypeId?: string | null;
|
168
167
|
/**
|
169
|
-
*
|
170
|
-
*
|
171
|
-
* + When returned from `ListAvailabilityTimeSlots`, empty by default.
|
172
|
-
* + + If you provided `includeResourceTypeIds` or `resourceIds` in request,
|
173
|
-
* contains __up__ to 10 available resources out of those provided.
|
174
|
-
*
|
175
|
-
* + When returned from `GetAvailabilityTimeSlots`, contains all available resources by default.
|
176
|
-
* + + If you provided `includeResourceTypeIds` or `resourceIds` in request,
|
177
|
-
* contains all of the available resources out of those provided.
|
168
|
+
* Details about resources available during the time slot.
|
178
169
|
*
|
170
|
+
* Behavior varies by method:
|
179
171
|
*
|
180
|
-
*
|
181
|
-
*
|
182
|
-
*
|
172
|
+
* List methods (List Availability Time Slots and List Multi Service Availability Time Slots):
|
173
|
+
* - Empty by default.
|
174
|
+
* - Up to 10 resources when specifying `includeResourceTypeIds` or `resourceIds` in the request.
|
183
175
|
*
|
184
|
-
*
|
185
|
-
*
|
186
|
-
*
|
176
|
+
* Get methods (Get Availability Time Slots and Get Multi Service Availability Time Slots):
|
177
|
+
* - All resources by default.
|
178
|
+
* - Filtered resources when specifying `includeResourceTypeIds` or `resourceIds` in the request.
|
187
179
|
*/
|
188
180
|
resources?: Resource[];
|
189
181
|
/**
|
190
|
-
* Whether there are more available resources for the slot
|
182
|
+
* Whether there are more available resources for the slot than those listed in `resources`.
|
191
183
|
* @readonly
|
192
184
|
*/
|
193
185
|
hasMoreAvailableResources?: boolean | null;
|
@@ -211,20 +203,19 @@ interface NestedTimeSlot {
|
|
211
203
|
*/
|
212
204
|
serviceId?: string;
|
213
205
|
/**
|
214
|
-
* Local start date of the nested time slot in ISO-8601 format.
|
215
|
-
* For example,
|
206
|
+
* Local start date of the nested time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
207
|
+
* For example, `2026-01-30T13:30:00`.
|
216
208
|
* @format LOCAL_DATE_TIME
|
217
209
|
*/
|
218
210
|
localStartDate?: string;
|
219
211
|
/**
|
220
|
-
* Local end date of the nested time slot in ISO-8601 format.
|
221
|
-
* For example,
|
212
|
+
* Local end date of the nested time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
213
|
+
* For example, `2026-01-30T13:30:00`.
|
222
214
|
* @format LOCAL_DATE_TIME
|
223
215
|
*/
|
224
216
|
localEndDate?: string;
|
225
217
|
/**
|
226
|
-
* List of
|
227
|
-
* Each `AvailableResources` contains information about available resources of the same type.
|
218
|
+
* List of resources ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/introduction)) available during the nested time slot.
|
228
219
|
* @maxSize 10
|
229
220
|
*/
|
230
221
|
availableResources?: AvailableResources[];
|
@@ -236,129 +227,76 @@ interface NestedTimeSlot {
|
|
236
227
|
scheduleId?: string | null;
|
237
228
|
}
|
238
229
|
interface NonBookableReasons {
|
239
|
-
/**
|
230
|
+
/** Whether the slot is fully booked with no remaining capacity. */
|
240
231
|
noRemainingCapacity?: boolean | null;
|
241
|
-
/**
|
232
|
+
/** Whether booking the slot violates any of the service's booking policies. */
|
242
233
|
violatesBookingPolicy?: boolean | null;
|
243
|
-
/**
|
234
|
+
/** Whether the slot is reserved for the waitlist. A new customer can't book the reserved slot. */
|
244
235
|
reservedForWaitingList?: boolean | null;
|
245
236
|
}
|
246
237
|
interface ListMultiServiceAvailabilityTimeSlotsRequest {
|
247
238
|
/**
|
248
|
-
* Services for which the
|
249
|
-
* Each service
|
239
|
+
* Services for which the multi-service time slots are returned.
|
240
|
+
* Each service can include its own resource filters.
|
250
241
|
*
|
251
|
-
*
|
252
|
-
* MaxSize: `8`.
|
253
|
-
*
|
254
|
-
* Required, unless `cursorPaging`.`cursor` is provided.
|
242
|
+
* Required unless you specify `cursorPaging.cursor`.
|
255
243
|
* @maxSize 8
|
256
244
|
*/
|
257
245
|
services?: Service[];
|
258
246
|
/**
|
259
|
-
* Lower boundary for `localStartDate`
|
260
|
-
* For example,
|
261
|
-
*
|
262
|
-
* Each returned `TimeSlot` in response has a `localStartDate`
|
263
|
-
* within the provided `fromLocalDate` and `toLocalDate` exclusive.
|
247
|
+
* Lower boundary for `localStartDate` in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
248
|
+
* For example, `2026-01-30T13:30:00`.
|
249
|
+
* Each returned time slot has a `localStartDate` between `fromLocalDate` and `toLocalDate`.
|
264
250
|
*
|
265
|
-
* Required
|
251
|
+
* Required unless you specify `cursorPaging.cursor`.
|
266
252
|
* @format LOCAL_DATE_TIME
|
267
253
|
*/
|
268
254
|
fromLocalDate?: string | null;
|
269
255
|
/**
|
270
|
-
* Upper boundary for `
|
271
|
-
* For example,
|
256
|
+
* Upper boundary for `localToDate` in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
257
|
+
* For example, `2026-01-30T13:30:00`.
|
258
|
+
* Each returned time slot has a `localEndDate` between `fromLocalDate` and `toLocalDate`.
|
272
259
|
*
|
273
|
-
*
|
274
|
-
* within the provided `fromLocalDate` and `toLocalDate` exclusive.
|
275
|
-
*
|
276
|
-
* Required, unless `cursorPaging`.`cursor` is provided.
|
260
|
+
* Required unless you specify `cursorPaging.cursor`.
|
277
261
|
* @format LOCAL_DATE_TIME
|
278
262
|
*/
|
279
263
|
toLocalDate?: string | null;
|
280
264
|
/**
|
281
|
-
* Time zone
|
265
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate` values. For example, `America/New_York` or `UTC`.
|
266
|
+
*
|
267
|
+
* Required unless you specify `cursorPaging.cursor`.
|
282
268
|
*
|
283
|
-
*
|
269
|
+
* Default: `timeZone` specified in the business site properties ([SDK](https://dev.wix.com/docs/sdk/backend-modules/site-properties/properties/get-site-properties) | [REST](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties)).
|
284
270
|
* @minLength 1
|
285
271
|
* @maxLength 150
|
286
272
|
*/
|
287
273
|
timeZone?: string | null;
|
288
274
|
/**
|
289
|
-
* Location for which the
|
275
|
+
* Location for which the multi-service time slots are returned. If you filter by `{"type": "BUSINESS"}`, you must also specify a location ID. A filter for `location.name` is ignored.
|
290
276
|
*
|
291
|
-
*
|
292
|
-
* If locationType is `BUSINESS`, you __must__ provide a locationId.
|
293
|
-
*
|
294
|
-
* <blockquote class="warning">
|
295
|
-
* <p><strong>warning:</strong><br/>
|
296
|
-
* Supports filtering by location type, or by location ID. </br>
|
297
|
-
* Other fields like <code class="grey-background">name</code> are ignored.</p>
|
298
|
-
* </blockquote>
|
299
|
-
*
|
300
|
-
* Required, unless `cursorPaging`.`cursor` is provided.
|
277
|
+
* Required unless you specify `cursorPaging.cursor`.
|
301
278
|
*/
|
302
279
|
location?: Location;
|
303
280
|
/**
|
304
|
-
* Whether the
|
305
|
-
*
|
306
|
-
* If booking any of the `TimeSlot`.`NestedTimeSlot`s violates any of its services bookings policies,
|
307
|
-
* returns as `false`. Otherwise, returns as `true`.
|
308
|
-
*
|
309
|
-
* > __Note:__
|
310
|
-
* > A `TimeSlot` with a `NestedTimeSlot` that doesn't meet its service's bookings policies will be returned with `bookable` = false,
|
311
|
-
* > while a `TimeSlot` with no available resources will not be returned at all.
|
281
|
+
* Whether the time slot is bookable according to all services' booking policies.
|
282
|
+
* If not specified, returns both bookable and non-bookable time slots.
|
312
283
|
*/
|
313
284
|
bookable?: boolean | null;
|
314
285
|
/**
|
315
|
-
* Indicators for service's booking policy violations
|
316
|
-
*
|
317
|
-
* A bookable time slot must not violate any policy,
|
318
|
-
* therefor, this filter is only relevant when `bookable` filter is false.
|
319
|
-
*
|
320
|
-
* Each nested field is checked on all `NestedTimeSlot`s. For example, if only one of the `NestedTimeSlot`'s
|
321
|
-
* has a service with `tooEarlyToBook` same as in the request, we return the `TimeSlot` regardless of whether
|
322
|
-
* the other `NestedTimeSlots` has the same `tooEarlyToBook` as in request.
|
323
|
-
*
|
324
|
-
* Each nested field is checked on its own. For example, if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined
|
325
|
-
* we return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.
|
286
|
+
* Indicators for service's booking policy violations.
|
287
|
+
* Only relevant when `bookable` filter is false.
|
326
288
|
*/
|
327
289
|
bookingPolicyViolations?: BookingPolicyViolations;
|
328
290
|
/**
|
329
|
-
* Maximum number of slots to
|
330
|
-
*
|
331
|
-
*
|
332
|
-
* By default,
|
333
|
-
* if `bookable` filter was not specified,
|
334
|
-
* and a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.
|
335
|
-
*
|
336
|
-
* If the number of `bookable` slots is less than the requested `timeSlotsPerDay`,
|
337
|
-
* `un-bookable` slots will be returned according to the specified filters.
|
291
|
+
* Maximum number of slots to return for each day in the specified time range.
|
292
|
+
* If `bookable` filter isn't specified, bookable slots are returned first.
|
338
293
|
*/
|
339
294
|
timeSlotsPerDay?: number | null;
|
340
295
|
/**
|
341
|
-
*
|
342
|
-
*
|
343
|
-
*
|
344
|
-
*
|
345
|
-
* This is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.
|
346
|
-
*
|
347
|
-
* If there are more results than the specified limit, the response will contain a `cursorPagingMetaData`
|
348
|
-
* with a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the
|
349
|
-
* returned cursor to the next call as `cursorPaging`.`cursor`.
|
350
|
-
*
|
351
|
-
* For the first call, you should only specify the `limit` for the results page.
|
352
|
-
* For each following call, you should only pass the previous returned cursor as `cursorPaging`.`cursor`
|
353
|
-
* the `cursorPaging`.`limit`. You may pass a different `limit`.
|
354
|
-
* No need to specify any additional parameters.
|
355
|
-
*
|
356
|
-
* <blockquote class="important">
|
357
|
-
* <p><strong>Important:</strong><br/>
|
358
|
-
* If you only provide a <code class="grey-background">cursorPaging</code>. <code class="grey-background">cursor</code>,
|
359
|
-
* the response will contain the default size of results which is `1000`.
|
360
|
-
* </p>
|
361
|
-
* </blockquote>
|
296
|
+
* Cursor-based paging configuration.
|
297
|
+
* Enables fetching results in smaller chunks by setting a limit on the number of results.
|
298
|
+
* For consistent pagination behavior, use the same `limit` value throughout a pagination sequence.
|
299
|
+
* When specifying a new `limit` in follow-up requests, the API respects the new value.
|
362
300
|
*/
|
363
301
|
cursorPaging?: CursorPaging;
|
364
302
|
}
|
@@ -369,18 +307,18 @@ interface Service {
|
|
369
307
|
*/
|
370
308
|
serviceId?: string;
|
371
309
|
/**
|
372
|
-
*
|
310
|
+
* ID of the resources ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/introduction)) to include in response.
|
373
311
|
* @format GUID
|
374
312
|
* @maxSize 135
|
375
313
|
*/
|
376
314
|
resourceIds?: string[];
|
377
315
|
/**
|
378
|
-
*
|
316
|
+
* Resource type IDs ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resource-types/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction)) to include in returned time slots.
|
379
317
|
* This is in addition to the specifically requested resources.
|
380
318
|
*
|
381
|
-
* <blockquote
|
319
|
+
* <blockquote>
|
382
320
|
* Currently supported only for Staff Member resource type.
|
383
|
-
* Staff
|
321
|
+
* Staff members belong to resource type ID `cd44cf8-756f-41c3-bd90-3e2ffcaf1155`.
|
384
322
|
* </blockquote>
|
385
323
|
* @format GUID
|
386
324
|
* @maxSize 100
|
@@ -388,9 +326,9 @@ interface Service {
|
|
388
326
|
includeResourceTypeIds?: string[];
|
389
327
|
/**
|
390
328
|
* Selected customer choices.
|
391
|
-
* If specified, the selected choices
|
392
|
-
* If not specified, the service default configuration
|
393
|
-
* Enforcing this field is the responsibility of the
|
329
|
+
* If specified, the selected choices are used to calculate service configuration.
|
330
|
+
* If not specified, the service default configuration is used.
|
331
|
+
* Enforcing this field is the responsibility of the service plugin implementer, and not the Time Slots V2 API.
|
394
332
|
*/
|
395
333
|
customerChoices?: V2CustomerChoices;
|
396
334
|
}
|
@@ -400,22 +338,24 @@ interface Service {
|
|
400
338
|
*/
|
401
339
|
interface V2CustomerChoices {
|
402
340
|
/**
|
403
|
-
*
|
404
|
-
* Min: `1 minute
|
405
|
-
* Max: `44639 minutes
|
341
|
+
* Selected customer duration in minutes.
|
342
|
+
* Min: `1` minute
|
343
|
+
* Max: `44639` minutes (30 days, 23 hours, and 59 minutes)
|
344
|
+
* Default: `15` minutes
|
406
345
|
* @min 1
|
407
346
|
* @max 44639
|
408
347
|
*/
|
409
348
|
durationInMinutes?: number | null;
|
410
349
|
/**
|
411
|
-
*
|
412
|
-
*
|
350
|
+
* Selected add-on IDs.
|
351
|
+
*
|
352
|
+
* Max: Calculated as the product of the maximum number of add-on groups multiplied by the maximum number of add-ons per group. Currently 21 (3 groups × 7 add-ons per group), but may change in the future.
|
413
353
|
* @format GUID
|
414
354
|
* @maxSize 21
|
415
355
|
*/
|
416
356
|
addOnIds?: string[] | null;
|
417
357
|
/**
|
418
|
-
*
|
358
|
+
* Selected duration choice ID.
|
419
359
|
* @format GUID
|
420
360
|
*/
|
421
361
|
durationChoiceId?: string | null;
|
@@ -440,29 +380,22 @@ interface CursorPaging {
|
|
440
380
|
}
|
441
381
|
interface ListMultiServiceAvailabilityTimeSlotsResponse {
|
442
382
|
/**
|
443
|
-
*
|
383
|
+
* Retrieved time slots.
|
384
|
+
* Sorted by `localStartDate` in ascending order. When multiple slots have the same start time, no specific secondary sorting is guaranteed.
|
444
385
|
* @maxSize 1000
|
445
386
|
*/
|
446
387
|
timeSlots?: TimeSlot[];
|
447
388
|
/**
|
448
|
-
* Time zone
|
449
|
-
*
|
389
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate`.
|
390
|
+
* For example, `America/New_York` or `UTC`.
|
391
|
+
* Default: `timeZone` specified in the business site properties ([SDK](https://dev.wix.com/docs/sdk/backend-modules/site-properties/properties/get-site-properties) | [REST](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties)).
|
450
392
|
* @minLength 1
|
451
393
|
* @maxLength 150
|
452
394
|
*/
|
453
395
|
timeZone?: string | null;
|
454
396
|
/**
|
455
|
-
*
|
456
|
-
* Contains
|
457
|
-
*
|
458
|
-
* By default,
|
459
|
-
* if there are more than 1000 results,
|
460
|
-
* the response will contain a `cursorPagingMetaData` with a cursor to the next page of results.
|
461
|
-
*
|
462
|
-
* <blockquote class="important">
|
463
|
-
* <p><strong>Important:</strong><br/>
|
464
|
-
* <code class="grey-background">count</code> is not supported.</p>
|
465
|
-
* </blockquote>
|
397
|
+
* Paging metadata for the next page of results.
|
398
|
+
* Contains a cursor if there are more than 1000 results.
|
466
399
|
*/
|
467
400
|
cursorPagingMetadata?: CursorPagingMetadata;
|
468
401
|
}
|
@@ -484,51 +417,47 @@ interface Cursors {
|
|
484
417
|
}
|
485
418
|
interface GetMultiServiceAvailabilityTimeSlotRequest {
|
486
419
|
/**
|
487
|
-
* Services for which the
|
488
|
-
*
|
489
|
-
*
|
490
|
-
* MinSize: 2.
|
491
|
-
* MaxSize: 8.
|
420
|
+
* Services for which the multi-service time slots are returned.
|
421
|
+
* You can specify resource filters for each service.
|
492
422
|
* @minSize 2
|
493
423
|
* @maxSize 8
|
494
424
|
*/
|
495
425
|
services: Service[];
|
496
426
|
/**
|
497
|
-
* Local start date of the time slot
|
498
|
-
* For example,
|
427
|
+
* Local start date of the time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
428
|
+
* For example, `2026-01-30T13:30:00`.
|
499
429
|
* @format LOCAL_DATE_TIME
|
500
430
|
*/
|
501
431
|
localStartDate: string;
|
502
432
|
/**
|
503
|
-
* Local end date of the time slot
|
504
|
-
* For example,
|
433
|
+
* Local end date of the time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
434
|
+
* For example, `2026-01-30T13:30:00`.
|
505
435
|
* @format LOCAL_DATE_TIME
|
506
436
|
*/
|
507
437
|
localEndDate: string;
|
508
438
|
/**
|
509
|
-
* Time zone
|
439
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate` values.
|
440
|
+
* For example, `America/New_York` or `UTC`.
|
441
|
+
*
|
442
|
+
* Default: `timeZone` specified in the business site properties ([SDK](https://dev.wix.com/docs/sdk/backend-modules/site-properties/properties/get-site-properties) | [REST](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties)).
|
510
443
|
* @minLength 1
|
511
444
|
* @maxLength 150
|
512
445
|
*/
|
513
446
|
timeZone: string | null;
|
514
447
|
/**
|
515
|
-
*
|
448
|
+
* Location for which the multi-service time slots are returned. If you filter by `{"type": "BUSINESS"}`, you must also specify a location ID. A filter for `location.name` is ignored.
|
516
449
|
*
|
517
|
-
*
|
518
|
-
* If locationType is `BUSINESS`, you __must__ also provide a `locationId`.
|
519
|
-
*
|
520
|
-
* <blockquote class="warning">
|
521
|
-
* <p>Supports filtering by location type, or by location ID.
|
522
|
-
* Other fields like <code class="grey-background">name</code> are ignored.</p>
|
523
|
-
* </blockquote>
|
450
|
+
* Required unless you specify `cursorPaging.cursor`.
|
524
451
|
*/
|
525
452
|
location: Location;
|
526
453
|
}
|
527
454
|
interface GetMultiServiceAvailabilityTimeSlotResponse {
|
528
|
-
/**
|
455
|
+
/** Retrieved time slot. */
|
529
456
|
timeSlot?: TimeSlot;
|
530
457
|
/**
|
531
|
-
*
|
458
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate`.
|
459
|
+
* For example, `America/New_York` or `UTC`.
|
460
|
+
* Default: `timeZone` specified in the business site properties ([SDK](https://dev.wix.com/docs/sdk/backend-modules/site-properties/properties/get-site-properties) | [REST](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties)).
|
532
461
|
* @minLength 1
|
533
462
|
* @maxLength 150
|
534
463
|
*/
|
@@ -536,141 +465,92 @@ interface GetMultiServiceAvailabilityTimeSlotResponse {
|
|
536
465
|
}
|
537
466
|
interface ListAvailabilityTimeSlotsRequest {
|
538
467
|
/**
|
539
|
-
* Service ID for which
|
540
|
-
*
|
541
|
-
*
|
542
|
-
* Required, unless `cursorPaging`.`cursor` is provided.
|
468
|
+
* Service ID for which to retrieve time slots. You must specify the ID of an appointment-based service.
|
469
|
+
* Required, unless you specify `cursorPaging.cursor`.
|
543
470
|
* @format GUID
|
544
471
|
*/
|
545
472
|
serviceId?: string | null;
|
546
473
|
/**
|
547
|
-
* Lower boundary for `localStartDate` to include in response
|
548
|
-
*
|
549
|
-
*
|
550
|
-
* Each returned `TimeSlot` in response has a `localStartDate`
|
551
|
-
* within the provided `fromLocalDate` and `toLocalDate` exclusive.
|
474
|
+
* Lower boundary for `localStartDate` to include in response.
|
475
|
+
* Each returned time slot has a `localStartDate` within the provided `fromLocalDate` and `toLocalDate` exclusive.
|
476
|
+
* Required, unless you specify `cursorPaging.cursor`.
|
552
477
|
*
|
553
|
-
*
|
478
|
+
* Local start date in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
479
|
+
* For example, `2026-01-30T13:30:00`.
|
554
480
|
* @format LOCAL_DATE_TIME
|
555
481
|
*/
|
556
482
|
fromLocalDate?: string | null;
|
557
483
|
/**
|
558
|
-
* Upper boundary for `localStartDate` to include in response
|
559
|
-
*
|
484
|
+
* Upper boundary for `localStartDate` to include in response.
|
485
|
+
* Each returned time slot has a `localStartDate` within the provided `fromLocalDate` and `toLocalDate` exclusive.
|
486
|
+
* Required, unless you specify `cursorPaging.cursor`.
|
560
487
|
*
|
561
|
-
*
|
562
|
-
*
|
563
|
-
*
|
564
|
-
* Required, unless `cursorPaging`.`cursor` is provided.
|
488
|
+
* Local end date in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
489
|
+
* For example, `2026-01-30T13:30:00`.
|
565
490
|
* @format LOCAL_DATE_TIME
|
566
491
|
*/
|
567
492
|
toLocalDate?: string | null;
|
568
493
|
/**
|
569
|
-
* Time zone
|
494
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate`.
|
495
|
+
* For example, `America/New_York` or `UTC`.
|
570
496
|
*
|
571
|
-
*
|
497
|
+
* Default: `timeZone` specified in the business site properties ([SDK](https://dev.wix.com/docs/sdk/backend-modules/site-properties/properties/get-site-properties) | [REST](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties)).
|
572
498
|
* @minLength 1
|
573
499
|
* @maxLength 150
|
574
500
|
*/
|
575
501
|
timeZone?: string | null;
|
576
502
|
/**
|
577
503
|
* Locations to include in response.
|
578
|
-
*
|
579
|
-
* By default,
|
580
|
-
* if no locations are provided,
|
581
|
-
* the response contains TimeSlots for all locations where the service is available.
|
582
|
-
*
|
583
|
-
* You can specify locations or location types for which the time slots will be returned for.
|
584
|
-
* If locationType is `BUSINESS`, you __must__ provide a locationId.
|
585
|
-
*
|
586
|
-
* <blockquote class="warning">
|
587
|
-
* <p><strong>warning:</strong><br/>
|
588
|
-
* Supports filtering by location type, or by location ID. </br>
|
589
|
-
* Other fields like <code class="grey-background">name</code> are ignored.</p>
|
590
|
-
* </blockquote>
|
504
|
+
* If not specified, returns time slots for all locations where the service is available.
|
591
505
|
* @maxSize 5
|
592
506
|
*/
|
593
507
|
locations?: Location[];
|
594
508
|
/**
|
595
509
|
* Resources to include in response.
|
596
|
-
*
|
597
|
-
*
|
598
|
-
* the returned TimeSlots will contain __up__ to 10 available resources out of the provided list.
|
599
|
-
* Otherwise, the returned TimeSlots returns with an empty `AvailableResources`.
|
510
|
+
* If specified, returns up to 10 available resources out of the provided list.
|
511
|
+
* Otherwise, returns time slots with empty `availableResources`.
|
600
512
|
* @format GUID
|
601
513
|
* @maxSize 135
|
602
514
|
* @deprecated
|
603
515
|
*/
|
604
516
|
resourceIds?: string[];
|
605
517
|
/**
|
606
|
-
* Resource type
|
607
|
-
*
|
608
|
-
*
|
609
|
-
* out of those specified, each contains __up__ to 10 available resources of this type.
|
518
|
+
* Resource type IDs to include in the response.
|
519
|
+
* If specified, returns up to 10 `availableResources` with matching `resourceTypeId`.
|
520
|
+
* This controls which resource details are included in the response but doesn't filter the time slots themselves.
|
610
521
|
* @format GUID
|
611
522
|
* @maxSize 100
|
612
523
|
*/
|
613
524
|
includeResourceTypeIds?: string[];
|
614
525
|
/**
|
615
|
-
* Whether the
|
616
|
-
*
|
617
|
-
* If booking this `TimeSlot` does not violates any of the service's booking policies,
|
618
|
-
* returns as `true`. Otherwise, returns as `false`.
|
619
|
-
*
|
620
|
-
* > __Note:__
|
621
|
-
* > A time slot that doesn't meet the service's bookings policies will be returned with `bookable` = false,
|
622
|
-
* > while a time slot with no available resources will not be returned at all.
|
526
|
+
* Whether the time slot is bookable according to the service's booking policies.
|
527
|
+
* If not specified, returns both bookable and un-bookable time slots.
|
623
528
|
*/
|
624
529
|
bookable?: boolean | null;
|
625
530
|
/**
|
626
|
-
* Indicators for service's booking policy violations
|
627
|
-
*
|
628
|
-
*
|
629
|
-
*
|
630
|
-
*
|
631
|
-
* Each nested field is checked on its own. i.e. if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined
|
632
|
-
* we return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.
|
531
|
+
* Indicators for service's booking policy violations.
|
532
|
+
* Only relevant when `bookable` filter is set to `false`. Allows filtering for time slots with specific violation types:
|
533
|
+
* - `tooEarlyToBook`: Returns slots that violate minimum advance booking time.
|
534
|
+
* - `tooLateToBook`: Returns slots that violate maximum advance booking time.
|
535
|
+
* - `bookOnlineDisabled`: Returns slots where online booking is disabled.
|
633
536
|
*/
|
634
537
|
bookingPolicyViolations?: BookingPolicyViolations;
|
635
538
|
/**
|
636
|
-
* Maximum number of slots to
|
637
|
-
*
|
638
|
-
*
|
639
|
-
* By default,
|
640
|
-
* if `bookable` filter was not specified,
|
641
|
-
* and a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.
|
642
|
-
*
|
643
|
-
* If the number of `bookable` slots is less than the requested `timeSlotsPerDay`,
|
644
|
-
* `un-bookable` slots will be returned according to the specified filters.
|
539
|
+
* Maximum number of slots to return for each day in the specified time range.
|
540
|
+
* If `bookable` filter isn't specified, bookable slots are returned first.
|
645
541
|
*/
|
646
542
|
timeSlotsPerDay?: number | null;
|
647
543
|
/**
|
648
|
-
*
|
649
|
-
*
|
650
|
-
*
|
651
|
-
*
|
652
|
-
* This is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.
|
653
|
-
*
|
654
|
-
* If there are more results than the specified limit, the response will contain a `cursorPagingMetaData`
|
655
|
-
* with a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the
|
656
|
-
* returned cursor to the next call as `cursorPaging`.`cursor`.
|
657
|
-
*
|
658
|
-
* For the first call, you should only specify the `limit` for the results page.
|
659
|
-
* For each following call, you should only pass `cursorPaging`.`cursor` with the returned cursor from previous call, and
|
660
|
-
* a `cursorPaging`.`limit`.
|
661
|
-
* No need to specify any additional parameters.
|
662
|
-
*
|
663
|
-
* <blockquote class="important">
|
664
|
-
* <p><strong>Important:</strong><br/>
|
665
|
-
* If you only provide a <code class="grey-background">cursorPaging</code>. <code class="grey-background">cursor</code>,
|
666
|
-
* the response will contain the default size of results which is `1000`.
|
667
|
-
* </p>
|
668
|
-
* </blockquote>
|
544
|
+
* Cursor-based paging configuration.
|
545
|
+
* Enables fetching results in smaller chunks by setting a limit on the number of results.
|
546
|
+
* For consistent pagination behavior, use the same `limit` value throughout a pagination sequence.
|
547
|
+
* When specifying a new `limit` in follow-up requests, the API respects the new value.
|
669
548
|
*/
|
670
549
|
cursorPaging?: CursorPaging;
|
671
550
|
/**
|
672
|
-
*
|
673
|
-
*
|
551
|
+
* Resource types to filter time slots.
|
552
|
+
* Only returns time slots that have these specific resource types available.
|
553
|
+
* This filters the time slots themselves, unlike `includeResourceTypeIds` which only controls response details.
|
674
554
|
* @maxSize 3
|
675
555
|
*/
|
676
556
|
resourceTypes?: ResourceType[];
|
@@ -703,13 +583,13 @@ interface CustomerChoices {
|
|
703
583
|
}
|
704
584
|
interface ResourceType {
|
705
585
|
/**
|
706
|
-
* Resource type ID.
|
586
|
+
* Resource type ID ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resource-types/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction)).
|
707
587
|
* @format GUID
|
708
588
|
*/
|
709
589
|
resourceTypeId?: string | null;
|
710
590
|
/**
|
711
591
|
* Resource IDs.
|
712
|
-
*
|
592
|
+
* Available only if there is at least 1 resource available for the slot.
|
713
593
|
* @format GUID
|
714
594
|
* @minSize 1
|
715
595
|
* @maxSize 135
|
@@ -718,84 +598,70 @@ interface ResourceType {
|
|
718
598
|
}
|
719
599
|
interface ListAvailabilityTimeSlotsResponse {
|
720
600
|
/**
|
721
|
-
*
|
601
|
+
* Retrieved time slots.
|
602
|
+
* Sorted by `localStartDate` in ascending order. When multiple slots have the same start time, no specific secondary sorting is guaranteed.
|
722
603
|
* @maxSize 1000
|
723
604
|
*/
|
724
605
|
timeSlots?: TimeSlot[];
|
725
606
|
/**
|
726
|
-
* Time zone
|
727
|
-
*
|
607
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate`.
|
608
|
+
* For example, `America/New_York` or `UTC`.
|
609
|
+
*
|
610
|
+
* Default: `timeZone` specified in the business site properties ([SDK](https://dev.wix.com/docs/sdk/backend-modules/site-properties/properties/get-site-properties) | [REST](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties)).
|
728
611
|
* @minLength 1
|
729
612
|
* @maxLength 150
|
730
613
|
*/
|
731
614
|
timeZone?: string | null;
|
732
615
|
/**
|
733
|
-
*
|
734
|
-
* Contains
|
735
|
-
*
|
736
|
-
* By default,
|
737
|
-
* if there are more than 1000 results,
|
738
|
-
* the response will contain a `cursorPagingMetaData` with a cursor to the next page of results.
|
739
|
-
*
|
740
|
-
* <blockquote class="important">
|
741
|
-
* <p><strong>Important:</strong><br/>
|
742
|
-
* <code class="grey-background">count</code> is not supported.</p>
|
743
|
-
* </blockquote>
|
616
|
+
* Paging metadata for the next page of results.
|
617
|
+
* Contains a cursor if there are more than 1000 results.
|
744
618
|
*/
|
745
619
|
cursorPagingMetadata?: CursorPagingMetadata;
|
746
620
|
}
|
747
621
|
interface GetAvailabilityTimeSlotRequest {
|
748
622
|
/**
|
749
623
|
* Service ID of the time slot.
|
750
|
-
*
|
624
|
+
* You must specify the ID of an appointment-based service.
|
751
625
|
* @format GUID
|
752
626
|
*/
|
753
627
|
serviceId?: string;
|
754
628
|
/**
|
755
|
-
* Local start date of the time slot
|
756
|
-
* For example,
|
629
|
+
* Local start date of the time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
630
|
+
* For example, `2026-01-30T13:30:00`.
|
757
631
|
* @format LOCAL_DATE_TIME
|
758
632
|
*/
|
759
633
|
localStartDate?: string;
|
760
634
|
/**
|
761
|
-
* Local end date of the time slot
|
762
|
-
* For example,
|
635
|
+
* Local end date of the time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
636
|
+
* For example, `2026-01-30T13:30:00`.
|
763
637
|
* @format LOCAL_DATE_TIME
|
764
638
|
*/
|
765
639
|
localEndDate?: string;
|
766
640
|
/**
|
767
|
-
* Time zone
|
641
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate`.
|
642
|
+
* For example, `America/New_York` or `UTC`.
|
643
|
+
*
|
644
|
+
* Default: `timeZone` specified in the business site properties ([SDK](https://dev.wix.com/docs/sdk/backend-modules/site-properties/properties/get-site-properties) | [REST](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties)).
|
768
645
|
* @minLength 1
|
769
646
|
* @maxLength 150
|
770
647
|
*/
|
771
648
|
timeZone?: string | null;
|
772
649
|
/**
|
773
|
-
*
|
650
|
+
* Location to filter time slots by.
|
774
651
|
*
|
775
|
-
*
|
776
|
-
*
|
777
|
-
*
|
778
|
-
* <blockquote class="warning">
|
779
|
-
* <p>Supports filtering by location type, or by location ID.
|
780
|
-
* Other fields like <code class="grey-background">name</code> are ignored.</p>
|
781
|
-
* </blockquote>
|
652
|
+
* For business locations, you must specify a location ID.
|
653
|
+
* When specifying a location ID, all other location field filters are ignored.
|
782
654
|
*/
|
783
655
|
location?: Location;
|
784
656
|
/**
|
785
|
-
*
|
786
|
-
*
|
787
|
-
* If specified,
|
788
|
-
* the returned `TimeSlot` contains only the available resources out of provided list.
|
789
|
-
* Otherwise, the returned `TimeSlot` returned with all possible `AvailableResources`.
|
657
|
+
* IDs of the resources ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/introduction)) to check availability for.
|
658
|
+
* If omitted, time slots are returned if there's at least 1 available resource.
|
790
659
|
* @format GUID
|
791
660
|
* @maxSize 135
|
792
661
|
*/
|
793
662
|
resourceIds?: string[];
|
794
663
|
/**
|
795
|
-
*
|
796
|
-
*
|
797
|
-
* If specified in request, the returned `TimeSlot` contains only the `AvailableResources` with `ResourceTypeId`
|
798
|
-
* out of those specified, each contains all the available resources of this type.
|
664
|
+
* IDs of the resource types ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resource-types/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction)) to check availability for.
|
799
665
|
* @format GUID
|
800
666
|
* @maxSize 100
|
801
667
|
*/
|
@@ -803,23 +669,26 @@ interface GetAvailabilityTimeSlotRequest {
|
|
803
669
|
}
|
804
670
|
interface GetAvailabilityTimeSlotRequestCustomerChoices {
|
805
671
|
/**
|
806
|
-
*
|
672
|
+
* Selected add-on IDs.
|
807
673
|
* Max: Derived from max amount of Add-On groups * max amount of Add-Ons per group.
|
808
674
|
* @format GUID
|
809
675
|
* @maxSize 21
|
810
676
|
*/
|
811
677
|
addOnIds?: string[] | null;
|
812
678
|
/**
|
813
|
-
*
|
679
|
+
* Selected duration choice ID.
|
814
680
|
* @format GUID
|
815
681
|
*/
|
816
682
|
durationChoiceId?: string | null;
|
817
683
|
}
|
818
684
|
interface GetAvailabilityTimeSlotResponse {
|
819
|
-
/**
|
685
|
+
/** Retrieved time slot. */
|
820
686
|
timeSlot?: TimeSlot;
|
821
687
|
/**
|
822
|
-
* Time zone
|
688
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate`.
|
689
|
+
* For example, `America/New_York` or `UTC`.
|
690
|
+
*
|
691
|
+
* Default: `timeZone` specified in the business site properties ([SDK](https://dev.wix.com/docs/sdk/backend-modules/site-properties/properties/get-site-properties) | [REST](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties)).
|
823
692
|
* @minLength 1
|
824
693
|
* @maxLength 150
|
825
694
|
*/
|
@@ -827,87 +696,104 @@ interface GetAvailabilityTimeSlotResponse {
|
|
827
696
|
}
|
828
697
|
interface ListEventTimeSlotsRequest {
|
829
698
|
/**
|
830
|
-
*
|
831
|
-
*
|
832
|
-
* Required
|
699
|
+
* Lower boundary for `localStartDate` to include in the response.
|
700
|
+
* Each returned time slot has a `localStartDate` between `fromLocalDate` and `toLocalDate.
|
701
|
+
* Required unless you specify `cursorPaging.cursor`.
|
702
|
+
*
|
703
|
+
* Local start date in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
704
|
+
* For example, `2026-01-30T13:30:00`.
|
833
705
|
* @format LOCAL_DATE_TIME
|
834
706
|
*/
|
835
707
|
fromLocalDate?: string | null;
|
836
708
|
/**
|
837
|
-
*
|
838
|
-
*
|
839
|
-
* Required
|
709
|
+
* Upper boundary for `localStartDate` to include in the response.
|
710
|
+
* Each returned time slot has a `localStartDate` between `fromLocalDate` and `toLocalDate`.
|
711
|
+
* Required unless you specify `cursorPaging.cursor`.
|
712
|
+
*
|
713
|
+
* Local end date in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
714
|
+
* For example, `2026-01-30T13:30:00`.
|
840
715
|
* @format LOCAL_DATE_TIME
|
841
716
|
*/
|
842
717
|
toLocalDate?: string | null;
|
843
718
|
/**
|
844
|
-
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).
|
845
|
-
* For example, `America/New_York`.
|
719
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate` values.
|
720
|
+
* For example, `America/New_York` or `UTC`.
|
846
721
|
*
|
847
|
-
* Default: `timeZone` specified in the business
|
722
|
+
* Default: `timeZone` specified in the business site properties ([SDK](https://dev.wix.com/docs/sdk/backend-modules/site-properties/properties/get-site-properties) | [REST](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties)).
|
848
723
|
* @maxLength 100
|
849
724
|
*/
|
850
725
|
timeZone?: string | null;
|
851
726
|
/**
|
852
|
-
* Optional service IDs to filter
|
727
|
+
* Optional service IDs to filter the response.
|
853
728
|
* If not provided, time slots for all services are returned.
|
854
729
|
* @format GUID
|
855
730
|
* @maxSize 100
|
856
731
|
*/
|
857
732
|
serviceIds?: string[] | null;
|
858
733
|
/**
|
859
|
-
* Whether to
|
860
|
-
*
|
861
|
-
*
|
734
|
+
* Whether to include time slots that aren't bookable according to the service's booking policy or that are fully booked.
|
735
|
+
* - `true`: Both bookable and non-bookable time slots are returned.
|
736
|
+
* - `false`: Only bookable time slots are returned.
|
737
|
+
*
|
738
|
+
* Default: `true`
|
862
739
|
*/
|
863
740
|
includeNonBookable?: boolean | null;
|
864
741
|
/**
|
865
|
-
*
|
742
|
+
* Minimum bookable capacity.
|
743
|
+
* Use to filter out sessions that can't accommodate the desired party size.
|
866
744
|
* @min 1
|
867
745
|
*/
|
868
746
|
minBookableCapacity?: number | null;
|
869
747
|
/**
|
870
|
-
* Optional filter to apply to the events
|
871
|
-
* See the Events API
|
748
|
+
* Optional filter to apply to the events, for example resource or location.
|
749
|
+
* See the [Events API Supported Filters and Sorting article](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/supported-filters-and-sorting) for a complete list of filters.
|
872
750
|
*/
|
873
751
|
eventFilter?: Record<string, any> | null;
|
874
752
|
/**
|
875
|
-
*
|
876
|
-
*
|
877
|
-
*
|
878
|
-
*
|
753
|
+
* Maximum number of slots to return for each day in the specified time range.
|
754
|
+
* If both bookable and non-bookable slots exist on the same day, bookable slots are returned first.
|
755
|
+
*
|
756
|
+
* When you specify `maxSlotsPerDay`, you must also specify `toLocalDate`, and it must be no more than 1 month after `fromLocalDate`.
|
879
757
|
* @min 1
|
880
758
|
* @max 1000
|
881
759
|
*/
|
882
760
|
maxSlotsPerDay?: number | null;
|
883
|
-
/**
|
761
|
+
/**
|
762
|
+
* Cursor-based paging configuration.
|
763
|
+
* Enables fetching results in smaller chunks by setting a limit on the number of returned items.
|
764
|
+
*/
|
884
765
|
cursorPaging?: CursorPaging;
|
885
766
|
}
|
886
767
|
interface ListEventTimeSlotsResponse {
|
887
768
|
/** Retrieved time slots matching the specified filters. */
|
888
769
|
timeSlots?: TimeSlot[];
|
889
770
|
/**
|
890
|
-
*
|
891
|
-
*
|
771
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate` values.
|
772
|
+
* For example, `America/New_York` or `UTC`.
|
773
|
+
*
|
774
|
+
* Default: `timeZone` specified in the business site properties ([SDK](https://dev.wix.com/docs/sdk/backend-modules/site-properties/properties/get-site-properties) | [REST](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties)).
|
892
775
|
* @minLength 1
|
893
776
|
* @maxLength 150
|
894
777
|
*/
|
895
778
|
timeZone?: string | null;
|
896
|
-
/**
|
779
|
+
/**
|
780
|
+
* Paging metadata for the next page of results.
|
781
|
+
* Contains a cursor if more data is available.
|
782
|
+
*/
|
897
783
|
pagingMetadata?: CursorPagingMetadata;
|
898
784
|
}
|
899
785
|
interface GetEventTimeSlotRequest {
|
900
786
|
/**
|
901
|
-
*
|
787
|
+
* Event ID.
|
902
788
|
* @minLength 36
|
903
789
|
* @maxLength 250
|
904
790
|
*/
|
905
791
|
eventId?: string | null;
|
906
792
|
/**
|
907
|
-
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).
|
908
|
-
* For example, `America/New_York`.
|
793
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate` values.
|
794
|
+
* For example, `America/New_York` or `UTC`.
|
909
795
|
*
|
910
|
-
* Default: `timeZone` specified in the business
|
796
|
+
* Default: `timeZone` specified in the business site properties ([SDK](https://dev.wix.com/docs/sdk/backend-modules/site-properties/properties/get-site-properties) | [REST](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties)).
|
911
797
|
* @maxLength 100
|
912
798
|
*/
|
913
799
|
timeZone?: string | null;
|
@@ -916,8 +802,10 @@ interface GetEventTimeSlotResponse {
|
|
916
802
|
/** The time slot. */
|
917
803
|
timeSlot?: TimeSlot;
|
918
804
|
/**
|
919
|
-
*
|
920
|
-
*
|
805
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate` values.
|
806
|
+
* For example, `America/New_York` or `UTC`.
|
807
|
+
*
|
808
|
+
* Default: `timeZone` specified in the business site properties ([SDK](https://dev.wix.com/docs/sdk/backend-modules/site-properties/properties/get-site-properties) | [REST](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties)).
|
921
809
|
* @minLength 1
|
922
810
|
* @maxLength 150
|
923
811
|
*/
|
@@ -963,83 +851,28 @@ type GetMultiServiceAvailabilityTimeSlotApplicationErrors = {
|
|
963
851
|
};
|
964
852
|
type TimeSlotNonNullablePaths = `location.locationType` | `availableResources` | `nestedTimeSlots` | `nestedTimeSlots.${number}.serviceId` | `nestedTimeSlots.${number}.localStartDate` | `nestedTimeSlots.${number}.localEndDate`;
|
965
853
|
/**
|
966
|
-
* Retrieves a list of
|
967
|
-
*
|
968
|
-
* <blockquote class="important">
|
969
|
-
* <p><strong>Important:</strong><br/>
|
970
|
-
* Currently supported only for services of type <code class="grey-background">APPOINTMENT</code>.</p>
|
971
|
-
* </blockquote>
|
972
|
-
*
|
973
|
-
* The request body __must__ include either:
|
974
|
-
* + All of the following filters: `service`.`serviceId`, `fromLocalDate`, `toLocalDate`, `location`, and `timeZone`. You may add additional filters as you wish.
|
975
|
-
* + A `cursorPaging` with a valid `cursor` from previous response.
|
976
|
-
*
|
977
|
-
*
|
978
|
-
* Each [TimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/availability-time-slots/time-slot-object) in response
|
979
|
-
* represents the availability of the given sequence of services in a specific order, location, and within a given range of time.
|
980
|
-
*
|
981
|
-
* Each `TimeSlot`.`NestedTimeSlot` represents a single service from the given list. The order of the `NestedTimeSlots` is the same as the order
|
982
|
-
* of the given services in request.
|
983
|
-
* The first `NestedTimeSlot` has `localStartDate` within the given `fromLocalDate` and `toLocalDate` exclusive,
|
984
|
-
* and each following `NestedTimeSlot` has a `localStartDate` that equals to the previous `NestedTimeSlot`'s `localEndDate`.
|
854
|
+
* Retrieves a list of multi-service time slots that match the provided filters.
|
985
855
|
*
|
986
|
-
* By default,
|
987
|
-
* the response contains at most 1000 results.
|
988
|
-
* If there are more than 1000 results, we return a `cursorPagingMetadata` with
|
989
|
-
* a cursor for the next page of results, regardless of whether a `cursorPaging`
|
990
|
-
* was provided in request.
|
991
856
|
*
|
992
|
-
*
|
993
|
-
* > + All nested time slots share the same location.
|
994
|
-
* > + You can pass up to 8 services in request.
|
857
|
+
* ## Required filters
|
995
858
|
*
|
996
|
-
*
|
997
|
-
*
|
998
|
-
*
|
859
|
+
* You must specify one of:
|
860
|
+
* - `services.serviceId`, `fromLocalDate`, `toLocalDate`, `location`, and `timeZone` (additional filters are optional).
|
861
|
+
* - `cursorPaging.cursor` returned from a previous response.
|
999
862
|
*
|
1000
|
-
*
|
1001
|
-
* <p><strong>Important:</strong><br/>
|
1002
|
-
* By default,
|
1003
|
-
* if you don't specify <code class="grey-background">service</code>.<code class="grey-background">includeResourceTypeIds</code>
|
1004
|
-
* or <code class="grey-background">service</code>.<code class="grey-background">resourceIds</code> filters in request,
|
1005
|
-
* we return TimeSlots with <code class="grey-background">NestedTimeSlot</code>s with an empty <code class="grey-background">AvailableResources</code>.
|
1006
|
-
* <br/><strong>Note:</strong><br/> Not specifying resources filters can be handy in case you want to avoid large response in flows that only
|
1007
|
-
* interested of whether the time slots are available. [Finding the next available slot within the next 3 months](https://bo.wix.com/wix-docs/rest/all-apis/service-availability/multi-service-availability-time-slots/sample-flows?localViewerId=inbari#all-apis_service-availability_multi-service-availability-time-slots_sample-flows_find-the-first-date-within-the-next-3-months-that-all-selected-services-are-available-for)
|
1008
|
-
* is an example for such flow.
|
1009
|
-
* </p>
|
1010
|
-
* </blockquote>
|
863
|
+
* Each returned `timeSlot` acts as a container spanning the entire service sequence, with nested time slots providing individual service details.
|
1011
864
|
*
|
865
|
+
* ## Defaults
|
1012
866
|
*
|
1013
|
-
*
|
1014
|
-
*
|
1015
|
-
*
|
867
|
+
* - Results are sorted by `localStartDate` in ascending order.
|
868
|
+
* - `cursorPaging.limit` is `1000`.
|
869
|
+
* - The response contains both bookable and non-bookable slots.
|
1016
870
|
*
|
1017
|
-
*
|
1018
|
-
* + In both cases the returned `TimeSlot`.`NestedTimeSlot` contains __up__ to 10 `AvailableResources` that match the provided filters. Each `AvailableResources` contains __up__ to 10 available `resources` of the same type that match the provided filters.
|
1019
|
-
* + If an `AvailableResources` has more available resources which are not listed within it, we return `AvailableResources`.`hasMoreAvailableResources` as true.
|
1020
|
-
* + If you wish to get the full available resources list for all `NestedTimeSlot` of a specific `TimeSlot`, you should call [GetMultiServiceAvailabilityTimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/multi-service-availability-time-slots/get-multi-service-availability-time-slot).
|
871
|
+
* ## Service type limitations
|
1021
872
|
*
|
873
|
+
* Only appointment-type services are supported.
|
1022
874
|
*
|
1023
|
-
*
|
1024
|
-
* An `available` time slot is not necessarily `bookable`.
|
1025
|
-
* The `bookable` field of a `TimeSlot` indicates whether the customer can book all of the of the services within the given time slot,
|
1026
|
-
* at a specific period of time.
|
1027
|
-
* Read more about [Availability VS Bookability](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/multi-service-availability-time-slots/introduction#all-apis_wix-service-availability_multi-service-availability-time-slots_introduction_availability-vs-bookability).
|
1028
|
-
*
|
1029
|
-
* By default,
|
1030
|
-
* + The response does not contains `unavailable` TimeSlots.For example, if there are no available resources to provide one of the services from `2024-01-30T14:30:00` to `2024-01-30T15:30:00`, we don't return TimeSlots with `NestedTimeSlot`.`localStartDate` within this range for this service.
|
1031
|
-
* + The response contains both `bookable` and `un-bookable` TimeSlots.For example, if one of the services has a booking policy which enforces booking the service up to 10 minutes before the session starts, we return TimeSlots with the violating `NestedTimeSlot`.`localStartDate`, with `bookable` as `false`. If you want to list only __bookable__ TimeSlots you should pass `bookable` as `true`.
|
1032
|
-
* + If booking one of the `NestedTimeSlot`s violates one of the corresponding service's booking policies, the `TimeSlot` returns with `bookable` as false. There is no indication which service's policy was violated.
|
1033
|
-
*
|
1034
|
-
* <blockquote class="important">
|
1035
|
-
* <p><strong>Important:</strong>
|
1036
|
-
* Because of DST, there are edge cases where certain times either do not exist or exist twice for a local time zone.
|
1037
|
-
* Read more about <a href="https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/multi-service-availability-time-slots/introduction#all-apis_wix-service-availability_multi-service-availability-time-slots_introduction_daylight-saving-time-dst-handling">DST Handling</a></p>
|
1038
|
-
* </blockquote>
|
1039
|
-
*
|
1040
|
-
* ### ListAvailabilityTimeSlots runs with the following defaults:
|
1041
|
-
* + `localStartDate` is sorted in `ASC` order.
|
1042
|
-
* + `cursorPaging`.`limit` is `1000`.
|
875
|
+
* To retrieve appointment availability for a single service, call List Availability Time Slots ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability/availability-time-slots/list-availability-time-slots) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/availability/availability-time-slots/list-availability-time-slots)).
|
1043
876
|
* @public
|
1044
877
|
* @documentationMaturity preview
|
1045
878
|
* @permissionId BOOKINGS.AVAILABILITY_READ_MULTI_SERVICE_TIME_SLOTS
|
@@ -1054,170 +887,101 @@ declare function listMultiServiceAvailabilityTimeSlots(options?: ListMultiServic
|
|
1054
887
|
}>;
|
1055
888
|
interface ListMultiServiceAvailabilityTimeSlotsOptions {
|
1056
889
|
/**
|
1057
|
-
* Services for which the
|
1058
|
-
* Each service
|
1059
|
-
*
|
1060
|
-
* MinSize: `2`.
|
1061
|
-
* MaxSize: `8`.
|
890
|
+
* Services for which the multi-service time slots are returned.
|
891
|
+
* Each service can include its own resource filters.
|
1062
892
|
*
|
1063
|
-
* Required
|
893
|
+
* Required unless you specify `cursorPaging.cursor`.
|
1064
894
|
* @maxSize 8
|
1065
895
|
*/
|
1066
896
|
services?: Service[];
|
1067
897
|
/**
|
1068
|
-
* Lower boundary for `localStartDate`
|
1069
|
-
* For example,
|
898
|
+
* Lower boundary for `localStartDate` in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
899
|
+
* For example, `2026-01-30T13:30:00`.
|
900
|
+
* Each returned time slot has a `localStartDate` between `fromLocalDate` and `toLocalDate`.
|
1070
901
|
*
|
1071
|
-
*
|
1072
|
-
* within the provided `fromLocalDate` and `toLocalDate` exclusive.
|
1073
|
-
*
|
1074
|
-
* Required, unless `cursorPaging`.`cursor` is provided.
|
902
|
+
* Required unless you specify `cursorPaging.cursor`.
|
1075
903
|
* @format LOCAL_DATE_TIME
|
1076
904
|
*/
|
1077
905
|
fromLocalDate?: string | null;
|
1078
906
|
/**
|
1079
|
-
* Upper boundary for `
|
1080
|
-
* For example,
|
1081
|
-
*
|
1082
|
-
* Each returned `TimeSlot` in response has a `localStartDate`
|
1083
|
-
* within the provided `fromLocalDate` and `toLocalDate` exclusive.
|
907
|
+
* Upper boundary for `localToDate` in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
908
|
+
* For example, `2026-01-30T13:30:00`.
|
909
|
+
* Each returned time slot has a `localEndDate` between `fromLocalDate` and `toLocalDate`.
|
1084
910
|
*
|
1085
|
-
* Required
|
911
|
+
* Required unless you specify `cursorPaging.cursor`.
|
1086
912
|
* @format LOCAL_DATE_TIME
|
1087
913
|
*/
|
1088
914
|
toLocalDate?: string | null;
|
1089
915
|
/**
|
1090
|
-
* Time zone
|
916
|
+
* Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate` values. For example, `America/New_York` or `UTC`.
|
1091
917
|
*
|
1092
|
-
* Required
|
918
|
+
* Required unless you specify `cursorPaging.cursor`.
|
919
|
+
*
|
920
|
+
* Default: `timeZone` specified in the business site properties ([SDK](https://dev.wix.com/docs/sdk/backend-modules/site-properties/properties/get-site-properties) | [REST](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties)).
|
1093
921
|
* @minLength 1
|
1094
922
|
* @maxLength 150
|
1095
923
|
*/
|
1096
924
|
timeZone?: string | null;
|
1097
925
|
/**
|
1098
|
-
* Location for which the
|
1099
|
-
*
|
1100
|
-
* You can specify location or location type for which the TimeSlots will be returned for.
|
1101
|
-
* If locationType is `BUSINESS`, you __must__ provide a locationId.
|
926
|
+
* Location for which the multi-service time slots are returned. If you filter by `{"type": "BUSINESS"}`, you must also specify a location ID. A filter for `location.name` is ignored.
|
1102
927
|
*
|
1103
|
-
*
|
1104
|
-
* <p><strong>warning:</strong><br/>
|
1105
|
-
* Supports filtering by location type, or by location ID. </br>
|
1106
|
-
* Other fields like <code class="grey-background">name</code> are ignored.</p>
|
1107
|
-
* </blockquote>
|
1108
|
-
*
|
1109
|
-
* Required, unless `cursorPaging`.`cursor` is provided.
|
928
|
+
* Required unless you specify `cursorPaging.cursor`.
|
1110
929
|
*/
|
1111
930
|
location?: Location;
|
1112
931
|
/**
|
1113
|
-
* Whether the
|
1114
|
-
*
|
1115
|
-
* If booking any of the `TimeSlot`.`NestedTimeSlot`s violates any of its services bookings policies,
|
1116
|
-
* returns as `false`. Otherwise, returns as `true`.
|
1117
|
-
*
|
1118
|
-
* > __Note:__
|
1119
|
-
* > A `TimeSlot` with a `NestedTimeSlot` that doesn't meet its service's bookings policies will be returned with `bookable` = false,
|
1120
|
-
* > while a `TimeSlot` with no available resources will not be returned at all.
|
932
|
+
* Whether the time slot is bookable according to all services' booking policies.
|
933
|
+
* If not specified, returns both bookable and non-bookable time slots.
|
1121
934
|
*/
|
1122
935
|
bookable?: boolean | null;
|
1123
936
|
/**
|
1124
|
-
* Indicators for service's booking policy violations
|
1125
|
-
*
|
1126
|
-
* A bookable time slot must not violate any policy,
|
1127
|
-
* therefor, this filter is only relevant when `bookable` filter is false.
|
1128
|
-
*
|
1129
|
-
* Each nested field is checked on all `NestedTimeSlot`s. For example, if only one of the `NestedTimeSlot`'s
|
1130
|
-
* has a service with `tooEarlyToBook` same as in the request, we return the `TimeSlot` regardless of whether
|
1131
|
-
* the other `NestedTimeSlots` has the same `tooEarlyToBook` as in request.
|
1132
|
-
*
|
1133
|
-
* Each nested field is checked on its own. For example, if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined
|
1134
|
-
* we return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.
|
937
|
+
* Indicators for service's booking policy violations.
|
938
|
+
* Only relevant when `bookable` filter is false.
|
1135
939
|
*/
|
1136
940
|
bookingPolicyViolations?: BookingPolicyViolations;
|
1137
941
|
/**
|
1138
|
-
* Maximum number of slots to
|
1139
|
-
*
|
1140
|
-
*
|
1141
|
-
* By default,
|
1142
|
-
* if `bookable` filter was not specified,
|
1143
|
-
* and a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.
|
1144
|
-
*
|
1145
|
-
* If the number of `bookable` slots is less than the requested `timeSlotsPerDay`,
|
1146
|
-
* `un-bookable` slots will be returned according to the specified filters.
|
942
|
+
* Maximum number of slots to return for each day in the specified time range.
|
943
|
+
* If `bookable` filter isn't specified, bookable slots are returned first.
|
1147
944
|
*/
|
1148
945
|
timeSlotsPerDay?: number | null;
|
1149
946
|
/**
|
1150
|
-
*
|
1151
|
-
*
|
1152
|
-
*
|
1153
|
-
*
|
1154
|
-
* This is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.
|
1155
|
-
*
|
1156
|
-
* If there are more results than the specified limit, the response will contain a `cursorPagingMetaData`
|
1157
|
-
* with a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the
|
1158
|
-
* returned cursor to the next call as `cursorPaging`.`cursor`.
|
1159
|
-
*
|
1160
|
-
* For the first call, you should only specify the `limit` for the results page.
|
1161
|
-
* For each following call, you should only pass the previous returned cursor as `cursorPaging`.`cursor`
|
1162
|
-
* the `cursorPaging`.`limit`. You may pass a different `limit`.
|
1163
|
-
* No need to specify any additional parameters.
|
1164
|
-
*
|
1165
|
-
* <blockquote class="important">
|
1166
|
-
* <p><strong>Important:</strong><br/>
|
1167
|
-
* If you only provide a <code class="grey-background">cursorPaging</code>. <code class="grey-background">cursor</code>,
|
1168
|
-
* the response will contain the default size of results which is `1000`.
|
1169
|
-
* </p>
|
1170
|
-
* </blockquote>
|
947
|
+
* Cursor-based paging configuration.
|
948
|
+
* Enables fetching results in smaller chunks by setting a limit on the number of results.
|
949
|
+
* For consistent pagination behavior, use the same `limit` value throughout a pagination sequence.
|
950
|
+
* When specifying a new `limit` in follow-up requests, the API respects the new value.
|
1171
951
|
*/
|
1172
952
|
cursorPaging?: CursorPaging;
|
1173
953
|
}
|
1174
954
|
/**
|
1175
|
-
* Retrieves
|
955
|
+
* Retrieves a multi-service time slot that matches the specified filters.
|
956
|
+
*
|
1176
957
|
*
|
1177
|
-
*
|
958
|
+
* Call this method after finding a suitable slot with List Multi-Service Availability Time Slots to obtain full capacity, resource, and booking-policy details.
|
1178
959
|
*
|
1179
|
-
*
|
1180
|
-
* <p><strong>Important:</strong><br/>
|
1181
|
-
* Currently supported only for services of type <code class="grey-background">APPOINTMENT</code>.</p>
|
1182
|
-
* </blockquote>
|
960
|
+
* The returned time slot acts as a container spanning the entire service sequence, with nested time slots providing detailed information for each individual service.
|
1183
961
|
*
|
1184
|
-
*
|
1185
|
-
* if you don't provide a `service`.`includeResourceTypeIds` or `service`.`resourceIds` in request,
|
1186
|
-
* we return for each `TimeSlot`.`NestedTimeSlot` all `AvailableResources` with all `AvailableResources`.`resources` which are available to provide
|
1187
|
-
* the corresponding service within the time slot.
|
962
|
+
* ## Defaults
|
1188
963
|
*
|
1189
|
-
*
|
1190
|
-
*
|
1191
|
-
* which match the given resources filters,
|
1192
|
-
* each contains all available resources out of those requested.
|
964
|
+
* - Returns all available resources unless you filter by `services.resourceIds` or `services.includeResourceTypeIds`.
|
965
|
+
* - Includes full booking-status and capacity details.
|
1193
966
|
*
|
1194
|
-
*
|
1195
|
-
* + All nested time slots share the same location.
|
1196
|
-
* + You can pass up to 8 services.
|
967
|
+
* ## Service type limitations
|
1197
968
|
*
|
1198
|
-
*
|
1199
|
-
* <p><strong>Tip:</strong><br/>
|
1200
|
-
* Use this API in order to get the availability of a specific <code class="grey-background">TimeSlot</code> out of those returned from <code class="grey-background">ListMultiServiceAvailabilityTimeSlots</code> API.</p>
|
1201
|
-
* </blockquote>
|
1202
|
-
* @param services - Services for which the multiService TimeSlots are being returned for.
|
1203
|
-
* Each service contains its own resources filters within.
|
969
|
+
* Only appointment-type services are supported.
|
1204
970
|
*
|
1205
|
-
*
|
1206
|
-
*
|
1207
|
-
*
|
1208
|
-
*
|
1209
|
-
*
|
1210
|
-
*
|
1211
|
-
*
|
1212
|
-
* @param
|
971
|
+
* To retrieve appointment availability for a single service, call List Availability Time Slots ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability/availability-time-slots/list-availability-time-slots) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/availability/availability-time-slots/list-availability-time-slots)).
|
972
|
+
* @param services - Services for which the multi-service time slots are returned.
|
973
|
+
* You can specify resource filters for each service.
|
974
|
+
* @param localStartDate - Local start date of the time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
975
|
+
* For example, `2026-01-30T13:30:00`.
|
976
|
+
* @param localEndDate - Local end date of the time slot in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
|
977
|
+
* For example, `2026-01-30T13:30:00`.
|
978
|
+
* @param timeZone - Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate` values.
|
979
|
+
* For example, `America/New_York` or `UTC`.
|
1213
980
|
*
|
1214
|
-
*
|
1215
|
-
* If
|
981
|
+
* Default: `timeZone` specified in the business site properties ([SDK](https://dev.wix.com/docs/sdk/backend-modules/site-properties/properties/get-site-properties) | [REST](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties)).
|
982
|
+
* @param location - Location for which the multi-service time slots are returned. If you filter by `{"type": "BUSINESS"}`, you must also specify a location ID. A filter for `location.name` is ignored.
|
1216
983
|
*
|
1217
|
-
*
|
1218
|
-
* <p>Supports filtering by location type, or by location ID.
|
1219
|
-
* Other fields like <code class="grey-background">name</code> are ignored.</p>
|
1220
|
-
* </blockquote>
|
984
|
+
* Required unless you specify `cursorPaging.cursor`.
|
1221
985
|
* @public
|
1222
986
|
* @documentationMaturity preview
|
1223
987
|
* @requiredField localEndDate
|