@wix/auto_sdk_bookings_bookings 1.0.4 → 1.0.5

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.
Files changed (69) hide show
  1. package/build/cjs/src/bookings-v2-booking-bookings.context.d.ts +17 -17
  2. package/build/cjs/src/bookings-v2-booking-bookings.context.js +17 -17
  3. package/build/cjs/src/bookings-v2-booking-bookings.context.js.map +1 -1
  4. package/build/cjs/src/bookings-v2-booking-bookings.http.d.ts +116 -116
  5. package/build/cjs/src/bookings-v2-booking-bookings.http.js +860 -860
  6. package/build/cjs/src/bookings-v2-booking-bookings.http.js.map +1 -1
  7. package/build/cjs/src/bookings-v2-booking-bookings.meta.d.ts +24 -24
  8. package/build/cjs/src/bookings-v2-booking-bookings.meta.js +125 -125
  9. package/build/cjs/src/bookings-v2-booking-bookings.meta.js.map +1 -1
  10. package/build/cjs/src/bookings-v2-booking-bookings.public.d.ts +171 -171
  11. package/build/cjs/src/bookings-v2-booking-bookings.public.js +84 -84
  12. package/build/cjs/src/bookings-v2-booking-bookings.public.js.map +1 -1
  13. package/build/cjs/src/bookings-v2-booking-bookings.types.d.ts +1276 -958
  14. package/build/cjs/src/bookings-v2-booking-bookings.types.js.map +1 -1
  15. package/build/cjs/src/bookings-v2-booking-bookings.universal.d.ts +2178 -1802
  16. package/build/cjs/src/bookings-v2-booking-bookings.universal.js +867 -867
  17. package/build/cjs/src/bookings-v2-booking-bookings.universal.js.map +1 -1
  18. package/build/es/src/bookings-v2-booking-bookings.context.d.ts +17 -17
  19. package/build/es/src/bookings-v2-booking-bookings.context.js +16 -16
  20. package/build/es/src/bookings-v2-booking-bookings.context.js.map +1 -1
  21. package/build/es/src/bookings-v2-booking-bookings.http.d.ts +116 -116
  22. package/build/es/src/bookings-v2-booking-bookings.http.js +808 -808
  23. package/build/es/src/bookings-v2-booking-bookings.http.js.map +1 -1
  24. package/build/es/src/bookings-v2-booking-bookings.meta.d.ts +24 -24
  25. package/build/es/src/bookings-v2-booking-bookings.meta.js +103 -103
  26. package/build/es/src/bookings-v2-booking-bookings.meta.js.map +1 -1
  27. package/build/es/src/bookings-v2-booking-bookings.public.d.ts +171 -171
  28. package/build/es/src/bookings-v2-booking-bookings.public.js +65 -65
  29. package/build/es/src/bookings-v2-booking-bookings.public.js.map +1 -1
  30. package/build/es/src/bookings-v2-booking-bookings.types.d.ts +1276 -958
  31. package/build/es/src/bookings-v2-booking-bookings.types.js.map +1 -1
  32. package/build/es/src/bookings-v2-booking-bookings.universal.d.ts +2178 -1802
  33. package/build/es/src/bookings-v2-booking-bookings.universal.js +879 -879
  34. package/build/es/src/bookings-v2-booking-bookings.universal.js.map +1 -1
  35. package/build/internal/cjs/src/bookings-v2-booking-bookings.context.d.ts +17 -17
  36. package/build/internal/cjs/src/bookings-v2-booking-bookings.context.js +17 -17
  37. package/build/internal/cjs/src/bookings-v2-booking-bookings.context.js.map +1 -1
  38. package/build/internal/cjs/src/bookings-v2-booking-bookings.http.d.ts +116 -116
  39. package/build/internal/cjs/src/bookings-v2-booking-bookings.http.js +860 -860
  40. package/build/internal/cjs/src/bookings-v2-booking-bookings.http.js.map +1 -1
  41. package/build/internal/cjs/src/bookings-v2-booking-bookings.meta.d.ts +24 -24
  42. package/build/internal/cjs/src/bookings-v2-booking-bookings.meta.js +125 -125
  43. package/build/internal/cjs/src/bookings-v2-booking-bookings.meta.js.map +1 -1
  44. package/build/internal/cjs/src/bookings-v2-booking-bookings.public.d.ts +171 -171
  45. package/build/internal/cjs/src/bookings-v2-booking-bookings.public.js +84 -84
  46. package/build/internal/cjs/src/bookings-v2-booking-bookings.public.js.map +1 -1
  47. package/build/internal/cjs/src/bookings-v2-booking-bookings.types.d.ts +1276 -958
  48. package/build/internal/cjs/src/bookings-v2-booking-bookings.types.js.map +1 -1
  49. package/build/internal/cjs/src/bookings-v2-booking-bookings.universal.d.ts +2178 -1802
  50. package/build/internal/cjs/src/bookings-v2-booking-bookings.universal.js +867 -867
  51. package/build/internal/cjs/src/bookings-v2-booking-bookings.universal.js.map +1 -1
  52. package/build/internal/es/src/bookings-v2-booking-bookings.context.d.ts +17 -17
  53. package/build/internal/es/src/bookings-v2-booking-bookings.context.js +16 -16
  54. package/build/internal/es/src/bookings-v2-booking-bookings.context.js.map +1 -1
  55. package/build/internal/es/src/bookings-v2-booking-bookings.http.d.ts +116 -116
  56. package/build/internal/es/src/bookings-v2-booking-bookings.http.js +808 -808
  57. package/build/internal/es/src/bookings-v2-booking-bookings.http.js.map +1 -1
  58. package/build/internal/es/src/bookings-v2-booking-bookings.meta.d.ts +24 -24
  59. package/build/internal/es/src/bookings-v2-booking-bookings.meta.js +103 -103
  60. package/build/internal/es/src/bookings-v2-booking-bookings.meta.js.map +1 -1
  61. package/build/internal/es/src/bookings-v2-booking-bookings.public.d.ts +171 -171
  62. package/build/internal/es/src/bookings-v2-booking-bookings.public.js +65 -65
  63. package/build/internal/es/src/bookings-v2-booking-bookings.public.js.map +1 -1
  64. package/build/internal/es/src/bookings-v2-booking-bookings.types.d.ts +1276 -958
  65. package/build/internal/es/src/bookings-v2-booking-bookings.types.js.map +1 -1
  66. package/build/internal/es/src/bookings-v2-booking-bookings.universal.d.ts +2178 -1802
  67. package/build/internal/es/src/bookings-v2-booking-bookings.universal.js +879 -879
  68. package/build/internal/es/src/bookings-v2-booking-bookings.universal.js.map +1 -1
  69. package/package.json +2 -2
@@ -4,6 +4,7 @@ export interface Booking extends BookingParticipantsInfoOneOf {
4
4
  * Total number of participants. Available only when the relevant service
5
5
  * doesn't have _variants and options_
6
6
  * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
7
+ * @min 1
7
8
  */
8
9
  totalParticipants?: number;
9
10
  /**
@@ -14,6 +15,7 @@ export interface Booking extends BookingParticipantsInfoOneOf {
14
15
  participantsChoices?: ParticipantChoices;
15
16
  /**
16
17
  * Booking ID.
18
+ * @format GUID
17
19
  * @readonly
18
20
  */
19
21
  id?: string | null;
@@ -112,6 +114,7 @@ export interface BookingParticipantsInfoOneOf {
112
114
  * Total number of participants. Available only when the relevant service
113
115
  * doesn't have _variants and options_
114
116
  * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
117
+ * @min 1
115
118
  */
116
119
  totalParticipants?: number;
117
120
  /**
@@ -151,6 +154,7 @@ export interface BookedEntity extends BookedEntityItemOneOf {
151
154
  * Session title at the time of booking. If there is no pre-existing session,
152
155
  * for example for appointment-based services, `title` is set to the service name.
153
156
  * @readonly
157
+ * @maxLength 6000
154
158
  */
155
159
  title?: string | null;
156
160
  /**
@@ -193,6 +197,8 @@ export interface BookedSlot {
193
197
  * For appointment-based services, Wix Bookings automatically populates `eventId`
194
198
  * when the booking `status` changes to `CONFIRMED`. For class bookings, it's
195
199
  * automatically populated upon booking creation.
200
+ * @minLength 36
201
+ * @maxLength 250
196
202
  */
197
203
  eventId?: string | null;
198
204
  /**
@@ -220,26 +226,42 @@ export interface BookedSlot {
220
226
  location?: Location;
221
227
  }
222
228
  export interface BookedResource {
223
- /** ID of the booking's primary resource. */
229
+ /**
230
+ * ID of the booking's primary resource.
231
+ * @format GUID
232
+ */
224
233
  id?: string;
225
- /** Resource's name at the time of booking. */
234
+ /**
235
+ * Resource's name at the time of booking.
236
+ * @maxLength 40
237
+ */
226
238
  name?: string | null;
227
- /** Resource's email at the time of booking. */
239
+ /**
240
+ * Resource's email at the time of booking.
241
+ * @maxLength 500
242
+ */
228
243
  email?: string | null;
229
- /** ID of the schedule belonging to the booking's primary resource. */
244
+ /**
245
+ * ID of the schedule belonging to the booking's primary resource.
246
+ * @format GUID
247
+ */
230
248
  scheduleId?: string | null;
231
249
  }
232
250
  export interface Location {
233
251
  /**
234
252
  * Business location ID. Available only for locations that are business locations,
235
253
  * meaning the `location_type` is `"OWNER_BUSINESS"`.
254
+ * @format GUID
236
255
  */
237
256
  id?: string | null;
238
257
  /** Location name. */
239
258
  name?: string | null;
240
259
  /** The full address of this location. */
241
260
  formattedAddress?: string | null;
242
- /** The full translated address of this location. */
261
+ /**
262
+ * The full translated address of this location.
263
+ * @maxLength 512
264
+ */
243
265
  formattedAddressTranslated?: string | null;
244
266
  /**
245
267
  * Location type.
@@ -262,7 +284,10 @@ export interface BookedSchedule {
262
284
  * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)).
263
285
  */
264
286
  scheduleId?: string;
265
- /** Booked service ID. */
287
+ /**
288
+ * Booked service ID.
289
+ * @format GUID
290
+ */
266
291
  serviceId?: string | null;
267
292
  /**
268
293
  * _Location_
@@ -290,7 +315,10 @@ export interface BookedSchedule {
290
315
  lastSessionEnd?: string | null;
291
316
  }
292
317
  export interface ContactDetails {
293
- /** Contact ID. */
318
+ /**
319
+ * Contact ID.
320
+ * @format GUID
321
+ */
294
322
  contactId?: string | null;
295
323
  /**
296
324
  * Contact's first name. When populated from a standard booking form, this
@@ -305,6 +333,7 @@ export interface ContactDetails {
305
333
  * Used to validate coupon usage limitations per contact. If not specified,
306
334
  * the coupon usage limitation will not be enforced. (Coupon usage limitation
307
335
  * validation is not supported yet).
336
+ * @format EMAIL
308
337
  */
309
338
  email?: string | null;
310
339
  /** Contact's phone number. */
@@ -319,6 +348,7 @@ export interface ContactDetails {
319
348
  /**
320
349
  * Contact's country in [ISO 3166-1 alpha-2 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
321
350
  * format.
351
+ * @format COUNTRY
322
352
  */
323
353
  countryCode?: string | null;
324
354
  }
@@ -328,7 +358,10 @@ export interface Address extends AddressStreetOneOf {
328
358
  streetAddress?: StreetAddress;
329
359
  /** Main address line, usually street and number, as free text. */
330
360
  addressLine?: string | null;
331
- /** Country code. */
361
+ /**
362
+ * Country code.
363
+ * @format COUNTRY
364
+ */
332
365
  country?: string | null;
333
366
  /** Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
334
367
  subdivision?: string | null;
@@ -377,7 +410,10 @@ export interface Subdivision {
377
410
  name?: string;
378
411
  }
379
412
  export interface CustomFormField {
380
- /** ID of the form field as defined in the form. */
413
+ /**
414
+ * ID of the form field as defined in the form.
415
+ * @format GUID
416
+ */
381
417
  id?: string;
382
418
  /** Value that was submitted for this field. */
383
419
  value?: string | null;
@@ -481,6 +517,7 @@ export interface BookingSource {
481
517
  actor?: Actor;
482
518
  /**
483
519
  * Wix site ID of the application that created the booking.
520
+ * @format GUID
484
521
  * @readonly
485
522
  */
486
523
  appDefId?: string | null;
@@ -511,26 +548,53 @@ export interface ParticipantNotification {
511
548
  message?: string | null;
512
549
  }
513
550
  export interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
514
- /** ID of a site visitor that has not logged in to the site. */
551
+ /**
552
+ * ID of a site visitor that has not logged in to the site.
553
+ * @format GUID
554
+ */
515
555
  anonymousVisitorId?: string;
516
- /** ID of a site visitor that has logged in to the site. */
556
+ /**
557
+ * ID of a site visitor that has logged in to the site.
558
+ * @format GUID
559
+ */
517
560
  memberId?: string;
518
- /** ID of a Wix user (site owner, contributor, etc.). */
561
+ /**
562
+ * ID of a Wix user (site owner, contributor, etc.).
563
+ * @format GUID
564
+ */
519
565
  wixUserId?: string;
520
- /** ID of an app. */
566
+ /**
567
+ * ID of an app.
568
+ * @format GUID
569
+ */
521
570
  appId?: string;
522
- /** ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system. */
571
+ /**
572
+ * ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system.
573
+ * @format GUID
574
+ */
523
575
  contactId?: string | null;
524
576
  }
525
577
  /** @oneof */
526
578
  export interface CommonIdentificationDataIdOneOf {
527
- /** ID of a site visitor that has not logged in to the site. */
579
+ /**
580
+ * ID of a site visitor that has not logged in to the site.
581
+ * @format GUID
582
+ */
528
583
  anonymousVisitorId?: string;
529
- /** ID of a site visitor that has logged in to the site. */
584
+ /**
585
+ * ID of a site visitor that has logged in to the site.
586
+ * @format GUID
587
+ */
530
588
  memberId?: string;
531
- /** ID of a Wix user (site owner, contributor, etc.). */
589
+ /**
590
+ * ID of a Wix user (site owner, contributor, etc.).
591
+ * @format GUID
592
+ */
532
593
  wixUserId?: string;
533
- /** ID of an app. */
594
+ /**
595
+ * ID of an app.
596
+ * @format GUID
597
+ */
534
598
  appId?: string;
535
599
  }
536
600
  export declare enum IdentificationDataIdentityType {
@@ -574,16 +638,24 @@ export interface ExtendedFields {
574
638
  namespaces?: Record<string, Record<string, any>>;
575
639
  }
576
640
  export interface ParticipantChoices {
577
- /** Information about the booked service choices. Includes the number of participants. */
641
+ /**
642
+ * Information about the booked service choices. Includes the number of participants.
643
+ * @minSize 1
644
+ * @maxSize 10
645
+ */
578
646
  serviceChoices?: ServiceChoices[];
579
647
  }
580
648
  export interface ServiceChoices {
581
649
  /**
582
650
  * Number of participants for this _variant_
583
651
  * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
652
+ * @min 1
584
653
  */
585
654
  numberOfParticipants?: number | null;
586
- /** Service choices for these participants. */
655
+ /**
656
+ * Service choices for these participants.
657
+ * @maxSize 5
658
+ */
587
659
  choices?: ServiceChoice[];
588
660
  }
589
661
  export interface ServiceChoice extends ServiceChoiceChoiceOneOf {
@@ -599,6 +671,7 @@ export interface ServiceChoice extends ServiceChoiceChoiceOneOf {
599
671
  * ID of the corresponding option for the choice. For example, the choice `child`
600
672
  * could correspond to the option `ageGroup`. In this case, `optionId` is the ID
601
673
  * for the `ageGroup` option.
674
+ * @format GUID
602
675
  */
603
676
  optionId?: string;
604
677
  }
@@ -617,17 +690,21 @@ export interface Duration {
617
690
  /**
618
691
  * Duration of the service in minutes.
619
692
  * Min: 1 minute, Max: 30 days, 23 hours, and 59 minutes
693
+ * @min 1
694
+ * @max 44639
620
695
  */
621
696
  minutes?: number;
622
697
  /**
623
698
  * Name of the duration option.
624
699
  * Defaults to the formatted duration e.g. "1 hour, 30 minutes".
700
+ * @maxLength 255
625
701
  */
626
702
  name?: string | null;
627
703
  }
628
704
  export interface MultiServiceBookingInfo {
629
705
  /**
630
706
  * Multi-service booking ID.
707
+ * @format GUID
631
708
  * @readonly
632
709
  */
633
710
  id?: string | null;
@@ -646,15 +723,25 @@ export interface BookingFormFilled {
646
723
  /**
647
724
  * ID of the [form](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object)
648
725
  * that was filled.
726
+ * @format GUID
649
727
  */
650
728
  formId?: string | null;
651
729
  }
652
730
  export interface SetBookingFormAndSubmissionIdRequest {
653
- /** ID of the booking to set `formId` and `submissionId` for. */
731
+ /**
732
+ * ID of the booking to set `formId` and `submissionId` for.
733
+ * @format GUID
734
+ */
654
735
  bookingId?: string | null;
655
- /** ID of the form to set on the booking. */
736
+ /**
737
+ * ID of the form to set on the booking.
738
+ * @format GUID
739
+ */
656
740
  formId?: string | null;
657
- /** ID of the form submission to set on the booking. */
741
+ /**
742
+ * ID of the form submission to set on the booking.
743
+ * @format GUID
744
+ */
658
745
  submissionId?: string | null;
659
746
  }
660
747
  export interface SetBookingFormAndSubmissionIdResponse {
@@ -734,9 +821,15 @@ export interface ActionEvent {
734
821
  bodyAsJson?: string;
735
822
  }
736
823
  export interface MessageEnvelope {
737
- /** App instance ID. */
824
+ /**
825
+ * App instance ID.
826
+ * @format GUID
827
+ */
738
828
  instanceId?: string | null;
739
- /** Event type. */
829
+ /**
830
+ * Event type.
831
+ * @maxLength 150
832
+ */
740
833
  eventType?: string;
741
834
  /** The identification type and identity data. */
742
835
  identity?: WebhooksIdentificationData;
@@ -744,26 +837,50 @@ export interface MessageEnvelope {
744
837
  data?: string;
745
838
  }
746
839
  export interface WebhooksIdentificationData extends WebhooksIdentificationDataIdOneOf {
747
- /** ID of a site visitor that has not logged in to the site. */
840
+ /**
841
+ * ID of a site visitor that has not logged in to the site.
842
+ * @format GUID
843
+ */
748
844
  anonymousVisitorId?: string;
749
- /** ID of a site visitor that has logged in to the site. */
845
+ /**
846
+ * ID of a site visitor that has logged in to the site.
847
+ * @format GUID
848
+ */
750
849
  memberId?: string;
751
- /** ID of a Wix user (site owner, contributor, etc.). */
850
+ /**
851
+ * ID of a Wix user (site owner, contributor, etc.).
852
+ * @format GUID
853
+ */
752
854
  wixUserId?: string;
753
- /** ID of an app. */
855
+ /**
856
+ * ID of an app.
857
+ * @format GUID
858
+ */
754
859
  appId?: string;
755
860
  /** @readonly */
756
861
  identityType?: WebhookIdentityType;
757
862
  }
758
863
  /** @oneof */
759
864
  export interface WebhooksIdentificationDataIdOneOf {
760
- /** ID of a site visitor that has not logged in to the site. */
865
+ /**
866
+ * ID of a site visitor that has not logged in to the site.
867
+ * @format GUID
868
+ */
761
869
  anonymousVisitorId?: string;
762
- /** ID of a site visitor that has logged in to the site. */
870
+ /**
871
+ * ID of a site visitor that has logged in to the site.
872
+ * @format GUID
873
+ */
763
874
  memberId?: string;
764
- /** ID of a Wix user (site owner, contributor, etc.). */
875
+ /**
876
+ * ID of a Wix user (site owner, contributor, etc.).
877
+ * @format GUID
878
+ */
765
879
  wixUserId?: string;
766
- /** ID of an app. */
880
+ /**
881
+ * ID of an app.
882
+ * @format GUID
883
+ */
767
884
  appId?: string;
768
885
  }
769
886
  export declare enum WebhookIdentityType {
@@ -773,599 +890,449 @@ export declare enum WebhookIdentityType {
773
890
  WIX_USER = "WIX_USER",
774
891
  APP = "APP"
775
892
  }
776
- export interface CreateMultiServiceBookingRequest {
777
- /** Single-service bookings to combine in a multi-service booking. */
778
- bookings: Booking[];
893
+ export interface V2CreateBookingRequest extends V2CreateBookingRequestBookableItemOneOf, V2CreateBookingRequestParticipantsInfoOneOf {
779
894
  /**
780
- * Information about whether to notify the customer and
781
- * the message to send.
895
+ * Information about the slot to create a booking for.
896
+ * If you set `slot.location.locationType` to `CUSTOM`, the created slot's
897
+ * location is set to `slot.location.formattedAddress` when provided.
898
+ * Otherwise it's set to `contactDetails.fullAddress.formattedAddress`.
782
899
  */
783
- participantNotification?: ParticipantNotification;
900
+ slot?: Slot;
901
+ /** Information about the schedule to create a booking for. */
902
+ schedule?: BookedSchedule;
903
+ /** Contact details of the customer booking the service. */
904
+ contactDetails?: ContactDetails;
784
905
  /**
785
- * Whether to send an SMS reminder to the customer 24 hours before the
786
- * session starts. The phone number is taken from `contactDetails.phone`.
787
- *
788
- * Default: `true`
906
+ * Booking status.
907
+ * One of:
908
+ * - `"CREATED"` - The booking was created.
909
+ * - `"UPDATED"` - The booking was updated.
910
+ * - `"CONFIRMED"` - The booking has been confirmed and appears on the bookings calendar.
911
+ * Booking can be manually confirmed using the Set As Confirmed endpoint.
912
+ * Booking can be automatically confirmed when the following requirements are met:
913
+ * + The service is configured as automatically confirmed.
914
+ * + Invoking eCommerce checkout API and an order has been created.
915
+ * - `"CANCELED"` - The booking has been canceled and synced to bookings calendar.
916
+ * The booking can be canceled using cancel API.
917
+ * - `"PENDING"` - The booking waiting to be confirmed or declined buy the owner and is synced to bookings calendar.
918
+ * Bookings can be manually set as pending using setAsPending API, requires manage booking status permissions.
919
+ * Booking can be automatically set as pending when the following requirements are met:
920
+ * + The Service is configured as manually confirmed.
921
+ * + Invoking the eCommerce checkout API and an order has been created.
922
+ * - `"WAITING_LIST"` - The booking is pending on a waiting list.
923
+ * Booking can be created with this status when invoking waiting list join API.
924
+ * - `"DECLINED"` - The booking was declined by the owner and synced to bookings calendar.
925
+ * Booking can be manually declined using decline API and requires manage booking permissions.
926
+ * Booking can be automatically declined when the following requirements are met:
927
+ * + Invoking eCommerce checkout API and the order declined event has been sent.
928
+ * + Invoking eCommerce checkout API and order approved event has been sent, but the booking is offline and the booking causes a double booking.
789
929
  */
790
- sendSmsReminder?: boolean | null;
930
+ status?: BookingStatus;
791
931
  /**
792
- * Whether to ignore specific standard procedures of the Wix Bookings flow.
793
- * For example, whether to check availability before updating the status.
932
+ * Additional custom fields of the booking form. The customer must provide
933
+ * information for each field when booking the service. For example, that they
934
+ * bring their own towels or whether they use a wheelchair.
935
+ *
936
+ * Max: 100 fields
937
+ * @maxSize 100
794
938
  */
795
- flowControlSettings?: CreateBookingFlowControlSettings;
796
- /** Whether to return the created single-service bookings. */
797
- returnFullEntity?: boolean;
798
- /** Multi service booking type. */
799
- multiServiceBookingType?: MultiServiceBookingType;
800
- }
801
- export interface CreateBookingFlowControlSettings {
939
+ additionalFields?: CustomFormField[];
802
940
  /**
803
- * Whether the availability is checked before creating the booking.
941
+ * Total number of participants. Available only when the service doesn't have
942
+ * [variants](https://dev.wix.com/api/rest/wix-bookings/service-options-and-variants/introduction).
804
943
  *
805
- * When passing `false`, a booking is only created when the slot or schedule is available.
806
- * Default: `false`.
944
+ * Max: `20`
807
945
  */
808
- skipAvailabilityValidation?: boolean;
946
+ numberOfParticipants?: number | null;
809
947
  /**
810
- * Whether `PENDING` bookings are automatically set to `CONFIRMED` for
811
- * services that normally require the owner's manual confirmation.
948
+ * Internal business note. Not visible to the customer.
812
949
  *
813
- * Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY` permission scope
814
- * when passing `true`.
815
- * Default: `false`.
950
+ * Max: 200 characters
816
951
  */
817
- skipBusinessConfirmation?: boolean;
952
+ internalBusinessNote?: string | null;
818
953
  /**
819
- * Whether customers can pay using a payment method that isn't supported
820
- * for the service, but that's supported for other services.
821
- *
822
- * Your app must have the `BOOKINGS.MANAGE_PAYMENTS` permission scope when passing
823
- * `true`.
824
- * Default: `false`.
954
+ * Payment option the customer intends to use.
955
+ * Must be one of the payment options defined for the service, unless
956
+ * you pass `flowControlSettings.skipSelectedPaymentOptionValidation` as `true`.
825
957
  */
826
- skipSelectedPaymentOptionValidation?: boolean;
827
- }
828
- export interface CreateMultiServiceBookingResponse {
958
+ selectedPaymentOption?: SelectedPaymentOption;
829
959
  /**
830
- * Created multi service booking.
831
- * Contains the booking results in the same order as specified in the request.
960
+ * Identifies the source (platform, actor and app) that created this booking.
961
+ * This property of the booking cannot be changed.
962
+ * The app_def_id and app_name will be resolved automatically.
963
+ * TODO GAP See if we need this - might be able to get this data from the headers?
832
964
  */
833
- multiServiceBooking?: MultiServiceBooking;
834
- }
835
- export interface MultiServiceBooking {
836
- /** Multi-service booking ID. */
837
- id?: string | null;
838
- /** The created bookings that are part of the multi-service booking. */
839
- bookings?: BookingResult[];
840
- }
841
- export interface BookingResult {
842
- /** Booking ID. */
843
- bookingId?: string | null;
844
- /** Booking entity. */
845
- booking?: Booking;
846
- }
847
- export interface RescheduleMultiServiceBookingRequest {
848
- /** ID of the multi service booking to reschedule. */
849
- multiServiceBookingId: string | null;
850
- /** Information about the single-service bookings to reschedule. */
851
- rescheduleBookingsInfo: RescheduleBookingInfo[];
965
+ bookingSource?: BookingSource;
852
966
  /**
853
- * Information about whether to notify the customer and
854
- * the message to send.
967
+ * A user identifier of an external application user that initiated the book request.
968
+ * Allows an external application to later identify its own bookings and correlate to its own internal users
855
969
  */
970
+ externalUserId?: string | null;
971
+ /** Information about a message to send to the customer. */
856
972
  participantNotification?: ParticipantNotification;
973
+ /**
974
+ * Whether to send an SMS reminder to the customer 24 hours before the
975
+ * session starts. The phone number is taken from `contactDetails.phone`.
976
+ *
977
+ * Default: `true`.
978
+ */
979
+ sendSmsReminder?: boolean | null;
857
980
  /**
858
981
  * Information about whether specific procedures of the standard Wix Bookings
859
- * rescheduling flow are changed. For example, whether the availability of
860
- * the new slot is checked before rescheduling the booking or if you can
861
- * reschedule the booking even though the rescheduling policy doesn't allow it.
982
+ * creation flow are changed. For example, whether the availability is
983
+ * checked before creating the booking or if additional payment options are
984
+ * accepted.
862
985
  */
863
- flowControlSettings?: RescheduleBookingFlowControlSettings;
864
- /** Whether to return the rescheduled bookings entities. */
865
- returnFullEntity?: boolean;
986
+ flowControlSettings?: CreateBookingRequestFlowControlSettings;
866
987
  }
867
- export interface V2Slot {
868
- /** Identifier for the underlying session when the session is a single session or generated from a recurring session. */
988
+ /** @oneof */
989
+ export interface V2CreateBookingRequestBookableItemOneOf {
990
+ /**
991
+ * Information about the slot to create a booking for.
992
+ * If you set `slot.location.locationType` to `CUSTOM`, the created slot's
993
+ * location is set to `slot.location.formattedAddress` when provided.
994
+ * Otherwise it's set to `contactDetails.fullAddress.formattedAddress`.
995
+ */
996
+ slot?: Slot;
997
+ /** Information about the schedule to create a booking for. */
998
+ schedule?: BookedSchedule;
999
+ }
1000
+ /** @oneof */
1001
+ export interface V2CreateBookingRequestParticipantsInfoOneOf {
1002
+ }
1003
+ export interface Slot {
1004
+ /**
1005
+ * ID for the slot's corresponding session, when the session is either a single session
1006
+ * or a specific session generated from a recurring session.
1007
+ *
1008
+ * Deprecated. Please use `eventId` instead.
1009
+ * @deprecated ID for the slot's corresponding session, when the session is either a single session
1010
+ * or a specific session generated from a recurring session.
1011
+ *
1012
+ * Deprecated. Please use `eventId` instead.
1013
+ * @replacedBy event_id
1014
+ * @targetRemovalDate 2025-09-30
1015
+ */
869
1016
  sessionId?: string | null;
870
- /** Service identifier. Required. */
1017
+ /** Service ID. */
871
1018
  serviceId?: string;
872
- /** Schedule identifier. Required. */
1019
+ /** Schedule ID. */
873
1020
  scheduleId?: string;
874
- /** The start time of this slot (formatted according to RFC3339). */
875
- startDate?: string | null;
876
- /** The end time of this slot (formatted according to RFC3339). */
877
- endDate?: string | null;
878
- /** The timezone according to which the slot is calculated and presented. */
879
- timezone?: string | null;
880
1021
  /**
881
- * The resource required for this slot.
882
- * When populated, the specified resource will be assigned to the slot upon confirmation according to its availability.
883
- * When empty, if `skip_availability_validation` is `false`, a random available resource will be assigned to the slot upon confirmation.
884
- * Otherwise, one of the service resources will be assigned to the slot randomly upon confirmation.
1022
+ * The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
1023
+ * format.
1024
+ *
1025
+ * If `timezone` is specified,
1026
+ * dates are based on the local date/time. This means that the timezone offset
1027
+ * in the `start_date` is ignored.
885
1028
  */
886
- resource?: SlotSlotResource;
887
- /** Geographic location of the slot. */
888
- location?: SlotLocation;
1029
+ startDate?: string | null;
889
1030
  /**
890
- * Calendar event ID - not supported.
891
- * If not empty, on all write flows (create/update), it takes priority over `sessionId`.
892
- * So if both `sessionId` and `eventId` are provided, the `sessionId` will be based on the `eventId`.
893
- * Otherwise, if `eventId` is empty on write flow,
1031
+ * The end time of this slot in
1032
+ * [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format.
1033
+ *
1034
+ * If `timezone` is specified,
1035
+ * dates are based on the local date/time. This means that the timezone offset
1036
+ * in the `end_date` is ignored.
1037
+ */
1038
+ endDate?: string | null;
1039
+ /**
1040
+ * The timezone for which slot availability is to be calculated.
1041
+ *
1042
+ * Learn more about [handling Daylight Savings Time (DST) for local time zones](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/query-availability#wix-bookings_availability-calendar_query-availability_handling-daylight-savings-time-dst-for-local-time-zones)
1043
+ * when calculating availability.
1044
+ */
1045
+ timezone?: string | null;
1046
+ /**
1047
+ * The resource required for this slot. Currently, the only supported resource
1048
+ * is the relevant staff member for the slot.
1049
+ */
1050
+ resource?: SlotResource;
1051
+ /** Geographic location of the slot. */
1052
+ location?: Location;
1053
+ /**
1054
+ * ID for the slot's corresponding event, when the event is either a single event
1055
+ * or a specific event generated from a recurring event.
1056
+ * @minLength 36
1057
+ * @maxLength 250
894
1058
  */
895
1059
  eventId?: string | null;
896
1060
  }
897
- export declare enum LocationLocationType {
898
- /** Undefined location type. */
899
- UNDEFINED = "UNDEFINED",
900
- /** The business address as set in the site’s general settings. */
901
- OWNER_BUSINESS = "OWNER_BUSINESS",
902
- /** The address set when creating the service. */
903
- OWNER_CUSTOM = "OWNER_CUSTOM",
904
- /** The address set for the individual session. */
905
- CUSTOM = "CUSTOM"
906
- }
907
- export interface SlotSlotResource {
1061
+ export interface SlotResource {
908
1062
  /**
909
1063
  * Resource ID.
1064
+ * @format GUID
910
1065
  * @readonly
911
1066
  */
912
1067
  id?: string | null;
913
- /** Resource name. */
1068
+ /**
1069
+ * Resource name. Read only.
1070
+ * @maxLength 1200
1071
+ */
914
1072
  name?: string | null;
915
1073
  }
916
- export interface SlotLocation {
917
- /** Business Location ID. Present if the location is a business location. */
918
- id?: string | null;
919
- /** Location name. */
920
- name?: string | null;
921
- /** A string containing the full address of this location. */
922
- formattedAddress?: string | null;
923
- /** Location type. */
924
- locationType?: LocationLocationType;
1074
+ export interface CreateBookingRequestFlowControlSettings {
1075
+ /**
1076
+ * Whether the availability is checked before creating the booking. When
1077
+ * passing `false` a booking is only created when the slot or schedule is
1078
+ * available. Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY`
1079
+ * permission scope when passing `true`.
1080
+ *
1081
+ * Default: `false`.
1082
+ */
1083
+ skipAvailabilityValidation?: boolean;
1084
+ /**
1085
+ * Whether `PENDING` bookings are automatically set to `CONFIRMED` for
1086
+ * services that normally require the owner's manual confirmation. Your
1087
+ * app must have the `BOOKINGS.OVERRIDE_AVAILABILITY` permission scope
1088
+ * when passing `true`.
1089
+ *
1090
+ * Default: `false`.
1091
+ */
1092
+ skipBusinessConfirmation?: boolean;
1093
+ /**
1094
+ * Whether customers can pay using a payment method that isn't supported
1095
+ * for the service, but that's supported for other services. Your app
1096
+ * must have the `BOOKINGS.MANAGE_PAYMENTS` permission scope when passing
1097
+ * `true`.
1098
+ *
1099
+ * Default: `false`.
1100
+ */
1101
+ skipSelectedPaymentOptionValidation?: boolean;
925
1102
  }
926
- export interface RescheduleBookingInfo extends RescheduleBookingInfoParticipantsInfoOneOf {
1103
+ export interface V2CreateBookingResponse {
1104
+ /** Created booking. */
1105
+ booking?: Booking;
1106
+ }
1107
+ export interface V2CancelBookingRequest {
927
1108
  /**
928
- * Total number of participants. Available only for services with variants.
929
- * Specify when all participants book the same variant.
1109
+ * ID of the booking to cancel.
1110
+ * @format GUID
930
1111
  */
931
- totalParticipants?: number;
1112
+ bookingId?: string;
932
1113
  /**
933
- * Information about the service choices to book. Available only for services with
934
- * variants.
935
- * Specify when not all participants book the same variant.
1114
+ * Information about whether to notify the customer about the cancellation and
1115
+ * the message to send.
936
1116
  */
937
- participantsChoices?: ParticipantChoices;
938
- /** ID of the booking to reschedule. */
939
- bookingId?: string | null;
940
- /** Information about the new slot. */
941
- slot?: V2Slot;
1117
+ participantNotification?: ParticipantNotification;
942
1118
  /**
943
1119
  * Revision number, which increments by 1 each time the booking is updated.
944
- * To prevent conflicting changes, the current revision must be specified when
945
- * managing the booking.
1120
+ * To prevent conflicting changes,
1121
+ * the current revision must be passed when managing the booking.
946
1122
  */
947
1123
  revision?: string | null;
948
1124
  }
949
- /** @oneof */
950
- export interface RescheduleBookingInfoParticipantsInfoOneOf {
1125
+ export interface CancelBookingRequestFlowControlSettings {
951
1126
  /**
952
- * Total number of participants. Available only for services with variants.
953
- * Specify when all participants book the same variant.
1127
+ * Whether the cancellation policy applies when canceling the booking. When
1128
+ * passing `false` you can only cancel a booking if the cancellation policy
1129
+ * allows it. Your app must have the `BOOKINGS.IGNORE_BOOKING_POLICY `
1130
+ * permission scope when passing `true`.
1131
+ *
1132
+ * Default: `false`.
954
1133
  */
955
- totalParticipants?: number;
1134
+ ignoreCancellationPolicy?: boolean;
956
1135
  /**
957
- * Information about the service choices to book. Available only for services with
958
- * variants.
959
- * Specify when not all participants book the same variant.
1136
+ * Whether to issue a refund when canceling the booking.
1137
+ * The refund will be issued only if the booking is refundable.
1138
+ * Currently, booking is considered refundable when it was paid by membership.
1139
+ * If passing `true`, the booking flow control settings will be set with refund,
1140
+ * otherwise, either if `false` is passed or the field remains empty,
1141
+ * the booking flow control settings will be set with no refund.
1142
+ *
1143
+ * Default: `false`.
960
1144
  */
961
- participantsChoices?: ParticipantChoices;
1145
+ withRefund?: boolean | null;
962
1146
  }
963
- export interface RescheduleBookingFlowControlSettings {
1147
+ export interface V2CancelBookingResponse {
1148
+ /** Canceled booking. */
1149
+ booking?: Booking;
1150
+ }
1151
+ export interface V2RescheduleBookingRequest extends V2RescheduleBookingRequestParticipantsInfoOneOf {
1152
+ /**
1153
+ * Id of the booking to reschedule.
1154
+ * @format GUID
1155
+ */
1156
+ bookingId?: string;
1157
+ /** Information about the new slot. */
1158
+ slot?: Slot;
1159
+ /**
1160
+ * Revision number, which increments by 1 each time the booking is updated.
1161
+ * To prevent conflicting changes, the current revision must be passed when
1162
+ * managing the booking.
1163
+ */
1164
+ revision?: string | null;
1165
+ /**
1166
+ * Information about whether to notify the customer about the rescheduling and
1167
+ * the message to send.
1168
+ */
1169
+ participantNotification?: ParticipantNotification;
1170
+ }
1171
+ /** @oneof */
1172
+ export interface V2RescheduleBookingRequestParticipantsInfoOneOf {
1173
+ }
1174
+ export interface RescheduleBookingRequestFlowControlSettings {
964
1175
  /**
965
1176
  * Whether the rescheduling policy applies when rescheduling the booking.
1177
+ * When passing `false` you can only cancel a booking if the rescheduling
1178
+ * policy allows it. Your app must have the `BOOKINGS.IGNORE_BOOKING_POLICY `
1179
+ * permission scope when passing `true`.
966
1180
  *
967
- * When passing `false`, you can only cancel a booking if the rescheduling
968
- * policy allows it.
969
1181
  * Default: `false`.
970
1182
  */
971
1183
  ignoreReschedulePolicy?: boolean;
972
1184
  /**
973
1185
  * Whether the availability is checked before rescheduling the booking.
1186
+ * When passing `false` a booking is only created when the slot or
1187
+ * schedule is available. Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY`
1188
+ * permission scope when passing `true`.
974
1189
  *
975
- * When passing `false`, a booking is only created when the slot or
976
- * schedule is available.
977
1190
  * Default: `false`.
978
1191
  */
979
1192
  skipAvailabilityValidation?: boolean;
980
1193
  /**
981
1194
  * Whether the rescheduled booking's status is automatically set to
982
1195
  * `CONFIRMED` for services that normally require the owner's manual
983
- * confirmation.
1196
+ * confirmation. Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY`
1197
+ * permission scope when passing `true`.
1198
+ *
984
1199
  * Default: `false`.
985
1200
  */
986
1201
  skipBusinessConfirmation?: boolean;
987
1202
  }
988
- export interface RescheduleMultiServiceBookingResponse {
989
- /** Rescheduled multi-service booking. */
990
- multiServiceBooking?: MultiServiceBooking;
1203
+ export interface V2RescheduleBookingResponse {
1204
+ /** Rescheduled booking. */
1205
+ booking?: Booking;
991
1206
  }
992
- export interface BookingRescheduled extends BookingRescheduledPreviousParticipantsInfoOneOf {
1207
+ export interface V2ConfirmBookingRequest {
993
1208
  /**
994
- * The previous total number of participants. Available only when the booking includes
995
- * a single service variant.
1209
+ * ID of the booking to confirm.
1210
+ * @format GUID
996
1211
  */
997
- previousTotalParticipants?: number;
1212
+ bookingId?: string;
998
1213
  /**
999
- * Information about the previous booked service choices and participants.
1000
- * Available only when the booking includes multiple service variants.
1214
+ * Revision number, which increments by 1 each time the booking is updated.
1215
+ * To prevent conflicting changes, the current revision must be passed when
1216
+ * managing the booking.
1217
+ */
1218
+ revision?: string | null;
1219
+ /**
1220
+ * Information about whether to notify the customer about the confirmation and
1221
+ * the message to send.
1001
1222
  */
1002
- previousParticipantsChoices?: ParticipantChoices;
1003
- /** The rescheduled booking object. */
1004
- booking?: Booking;
1005
- /** Information about whether to notify the customer about the rescheduling and the message to send. */
1006
1223
  participantNotification?: ParticipantNotification;
1224
+ }
1225
+ export interface V2ConfirmBookingResponse {
1226
+ booking?: Booking;
1227
+ }
1228
+ export interface V2DeclineBookingRequest {
1007
1229
  /**
1008
- * Information about whether specific procedures of the standard Wix Bookings
1009
- * rescheduling flow are changed. For example, whether the availability of
1010
- * the new slot is checked before rescheduling the booking or if you can
1011
- * reschedule the booking even though the rescheduling policy doesn't allow it.
1230
+ * ID of the booking to decline.
1231
+ * @format GUID
1012
1232
  */
1013
- flowControlSettings?: RescheduleBookingFlowControlSettings;
1014
- /** ID of the rescheduling initiator. */
1015
- initiatedBy?: IdentificationData;
1016
- /** The previous status of the booking. */
1017
- previousStatus?: BookingStatus;
1018
- /** An object describing the previous slot or schedule of the booking. */
1019
- previousBookedEntity?: BookedEntity;
1233
+ bookingId?: string;
1020
1234
  /**
1021
- * The previous start date of the booking.
1022
- * For a slot, this is the start date of the slot.
1023
- * For a schedule, this is the start date of the first session.
1235
+ * Revision number, which increments by 1 each time the booking is updated.
1236
+ * To prevent conflicting changes, the current revision must be passed when
1237
+ * managing the booking.
1024
1238
  */
1025
- previousStartDate?: Date | null;
1239
+ revision?: string | null;
1026
1240
  /**
1027
- * The previous end date of the booking.
1028
- * For a slot, this is the end date of the slot.
1029
- * For a schedule, this is the end date of the last session.
1241
+ * Information about whether to notify the customer about the decline and
1242
+ * the message to send.
1030
1243
  */
1031
- previousEndDate?: Date | null;
1244
+ participantNotification?: ParticipantNotification;
1032
1245
  }
1033
- /** @oneof */
1034
- export interface BookingRescheduledPreviousParticipantsInfoOneOf {
1246
+ export interface V2DeclineBookingResponse {
1247
+ /** Declined booking. */
1248
+ booking?: Booking;
1249
+ }
1250
+ export interface V2UpdateNumberOfParticipantsRequest extends V2UpdateNumberOfParticipantsRequestParticipantsInfoOneOf {
1035
1251
  /**
1036
- * The previous total number of participants. Available only when the booking includes
1037
- * a single service variant.
1252
+ * ID of the booking to update the number of participants for.
1253
+ * @format GUID
1038
1254
  */
1039
- previousTotalParticipants?: number;
1255
+ bookingId?: string;
1256
+ /** Updated number of participants. */
1257
+ numberOfParticipants?: number | null;
1040
1258
  /**
1041
- * Information about the previous booked service choices and participants.
1042
- * Available only when the booking includes multiple service variants.
1259
+ * Revision number, which increments by 1 each time the booking is updated.
1260
+ * To prevent conflicting changes, the current revision must be passed when
1261
+ * managing the booking.
1043
1262
  */
1044
- previousParticipantsChoices?: ParticipantChoices;
1045
- }
1046
- export interface IdentificationData extends IdentificationDataIdOneOf {
1047
- /** ID of a site visitor that has not logged in to the site. */
1048
- anonymousVisitorId?: string;
1049
- /** ID of a site visitor that has logged in to the site. */
1050
- memberId?: string;
1051
- /** ID of a Wix user (site owner, contributor, etc.). */
1052
- wixUserId?: string;
1053
- /** ID of an app. */
1054
- appId?: string;
1055
- /**
1056
- * ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system.
1057
- * @readonly
1058
- */
1059
- contactId?: string | null;
1263
+ revision?: string | null;
1060
1264
  }
1061
1265
  /** @oneof */
1062
- export interface IdentificationDataIdOneOf {
1063
- /** ID of a site visitor that has not logged in to the site. */
1064
- anonymousVisitorId?: string;
1065
- /** ID of a site visitor that has logged in to the site. */
1066
- memberId?: string;
1067
- /** ID of a Wix user (site owner, contributor, etc.). */
1068
- wixUserId?: string;
1069
- /** ID of an app. */
1070
- appId?: string;
1071
- }
1072
- export declare enum IdentityType {
1073
- UNKNOWN = "UNKNOWN",
1074
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1075
- MEMBER = "MEMBER",
1076
- WIX_USER = "WIX_USER",
1077
- APP = "APP"
1078
- }
1079
- export interface GetMultiServiceBookingAvailabilityRequest {
1080
- /** ID of the multi-service booking to retrieve. */
1081
- multiServiceBookingId: string | null;
1082
- }
1083
- export interface GetMultiServiceBookingAvailabilityResponse {
1084
- /** Whether all contained single-service bookings are bookable. */
1085
- bookable?: boolean;
1086
- /** Total number of spots. */
1087
- totalCapacity?: number | null;
1088
- /** Number of open spots. */
1089
- remainingCapacity?: number | null;
1090
- /** Indicators for policy violations of the multi service booking. */
1091
- policyViolations?: BookingPolicyViolations;
1092
- /** Multi-service booking policy settings. */
1093
- policySettings?: BookingPolicySettings;
1094
- /** Info of the bookings this availability was calculated for. */
1095
- multiServiceBookingInfo?: GetMultiServiceBookingAvailabilityResponseBookingInfo[];
1096
- }
1097
- export interface BookingPolicyViolations {
1098
- /** Booking policy violation: Too early to book this slot. */
1099
- tooEarlyToBook?: boolean | null;
1100
- /** Booking policy violation: Too late to book this slot. */
1101
- tooLateToBook?: boolean | null;
1102
- /** Booking policy violation: Online booking is disabled for this slot. */
1103
- bookOnlineDisabled?: boolean | null;
1104
- }
1105
- export interface BookingPolicySettings {
1106
- /** Booking policy settings for a given slot or schedule. */
1107
- maxParticipantsPerBooking?: number | null;
1108
- }
1109
- export interface GetMultiServiceBookingAvailabilityResponseBookingInfo {
1110
- /** Booking ID. */
1111
- bookingId?: string | null;
1112
- }
1113
- export interface CancelMultiServiceBookingRequest {
1114
- /** ID of the multi-service booking to cancel. */
1115
- multiServiceBookingId: string | null;
1116
- /**
1117
- * Information about whether to notify the customer and
1118
- * the message to send.
1119
- */
1120
- participantNotification?: ParticipantNotification;
1121
- /**
1122
- * Information about whether specific procedures of the standard Wix Bookings
1123
- * cancellation flow are changed. For example, whether you can cancel
1124
- * a booking even though the cancellation policy doesn't allow it or whether
1125
- * to issue a refund.
1126
- */
1127
- flowControlSettings?: CancelBookingFlowControlSettings;
1128
- /** Whether to return the canceled single-service bookings. */
1129
- returnFullEntity?: boolean;
1130
- }
1131
- export interface CancelBookingFlowControlSettings {
1132
- /**
1133
- * Whether the cancellation policy applies when canceling the booking.
1134
- *
1135
- * When passing `false`, you can only cancel a booking if the cancellation policy allows it.
1136
- * Default: `false`.
1137
- */
1138
- ignoreCancellationPolicy?: boolean | null;
1139
- /**
1140
- * Whether to issue a refund when canceling the booking.
1141
- *
1142
- * The refund will be issued only if the booking is refundable.
1143
- * Currently, a booking is considered refundable when it was paid by membership.
1144
- * If you specify `true`, the booking flow control settings is set to include a refund.
1145
- * If `false` is specified or the field remains empty,
1146
- * the booking flow control settings are set without refund.
1147
- *
1148
- * Default: `false`.
1149
- */
1150
- withRefund?: boolean | null;
1151
- }
1152
- export interface CancelMultiServiceBookingResponse {
1153
- /** Canceled multi-service booking. */
1154
- multiServiceBooking?: MultiServiceBooking;
1266
+ export interface V2UpdateNumberOfParticipantsRequestParticipantsInfoOneOf {
1155
1267
  }
1156
- export interface BookingCanceled {
1157
- /** The canceled booking object. */
1268
+ export interface V2UpdateNumberOfParticipantsResponse {
1269
+ /** Booking with updated number of participants. */
1158
1270
  booking?: Booking;
1159
- /** Information about whether to notify the customer about the cancellation and the message to send. */
1160
- participantNotification?: ParticipantNotification;
1161
- /**
1162
- * Information about whether specific procedures of the standard Wix Bookings
1163
- * cancellation flow are changed. For example, whether you can cancel
1164
- * a booking even though the cancellation policy doesn't allow it or whether
1165
- * to issue a refund.
1166
- */
1167
- flowControlSettings?: CancelBookingFlowControlSettings;
1168
- /** ID of the cancellation initiator. */
1169
- initiatedBy?: IdentificationData;
1170
- /** The previous status of the booking. */
1171
- previousStatus?: BookingStatus;
1172
1271
  }
1173
- export interface MarkMultiServiceBookingAsPendingRequest {
1174
- /** ID of the multi-service booking to mark as `PENDING`. */
1175
- multiServiceBookingId: string | null;
1176
- /** Information about the single-service bookings to mark as `PENDING`. */
1177
- markAsPendingBookingsInfo?: BookingInfo[];
1272
+ export interface ConfirmOrDeclineBookingRequest {
1178
1273
  /**
1179
- * Information about whether to notify the customer and
1180
- * the message to send.
1274
+ * ID of the booking to confirm or decline.
1275
+ * @format GUID
1181
1276
  */
1182
- participantNotification?: ParticipantNotification;
1277
+ bookingId: string;
1183
1278
  /**
1184
- * Whether to send an SMS reminder to the customer 24 hours before the
1185
- * session starts. The phone number is taken from `contactDetails.phone`.
1279
+ * Current payment status of the booking when using a custom checkout page and
1280
+ * not the *eCommerce checkout*
1281
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)).
1186
1282
  *
1187
- * Default: `true`
1188
- */
1189
- sendSmsReminder?: boolean | null;
1190
- /** Whether this booking has a conflict with at least 1 other confirmed booking. */
1191
- doubleBooked?: boolean | null;
1192
- /** Whether to return the single-service bookings that were marked as `PENDING`. */
1193
- returnFullEntity?: boolean;
1194
- /**
1195
- * Information about whether specific procedures of the standard Wix Bookings
1196
- * creation flow are changed. For example, whether the availability is checked
1197
- * before updating the booking.
1198
- */
1199
- flowControlSettings?: MarkBookingAsPendingFlowControlSettings;
1200
- }
1201
- export interface BookingInfo {
1202
- /** ID of the single-service booking. */
1203
- bookingId?: string | null;
1204
- /**
1205
- * Revision number, which increments by 1 each time the booking is updated.
1206
- * To prevent conflicting changes, the current revision must be specified when
1207
- * managing the booking.
1283
+ * The booking is declined if there is a double booking conflict and you provide
1284
+ * one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
1208
1285
  */
1209
- revision?: string | null;
1210
- /** Payment status to set for the single-service booking. */
1211
1286
  paymentStatus?: PaymentStatus;
1212
1287
  }
1213
- export interface MarkBookingAsPendingFlowControlSettings {
1214
- /**
1215
- * Whether to check for double bookings before updating the booking as pending.
1216
- *
1217
- * When passing `false`, a booking is only updated with status `PENDING`.
1218
- * Default: `false`.
1219
- */
1220
- checkAvailabilityValidation?: boolean;
1221
- /**
1222
- * Whether to validate that the booking to be marked as pending has a `booking.slot.serviceId`
1223
- * of a pending approval service.
1224
- *
1225
- * Default: `false`.
1226
- */
1227
- skipPendingApprovalServiceValidation?: boolean;
1228
- }
1229
- export interface MarkMultiServiceBookingAsPendingResponse {
1230
- /** Updated multi-service booking. */
1231
- multiServiceBooking?: MultiServiceBooking;
1232
- }
1233
- export interface ConfirmMultiServiceBookingRequest {
1234
- /** ID of the multi-service booking to confirm its related bookings. */
1235
- multiServiceBookingId: string | null;
1236
- /** Information about the single-service bookings to confirm. */
1237
- confirmBookingsInfo?: BookingInfo[];
1238
- /**
1239
- * Information about whether to notify the customer and
1240
- * the message to send.
1241
- */
1242
- participantNotification?: ParticipantNotification;
1243
- /**
1244
- * Whether to send an SMS reminder to the customer 24 hours before the
1245
- * session starts. The phone number is taken from `contactDetails.phone`.
1246
- *
1247
- * Default: `true`
1248
- */
1249
- sendSmsReminder?: boolean | null;
1250
- /** Whether this booking has a conflict with at least 1 other confirmed booking. */
1251
- doubleBooked?: boolean | null;
1252
- /** Whether to return the confirmed single-service bookings. */
1253
- returnFullEntity?: boolean;
1254
- /**
1255
- * Information about whether specific procedures of the standard Wix Bookings
1256
- * confirmation flow are changed. For example, whether the availability is
1257
- * checked before confirming the booking.
1258
- */
1259
- flowControlSettings?: ConfirmBookingFlowControlSettings;
1260
- }
1261
- export interface ConfirmBookingFlowControlSettings {
1262
- /**
1263
- * Whether the availability is checked before confirming the booking.
1264
- *
1265
- * When specifying `false`, a booking is only updated with status `CONFIRMED`.
1266
- * Default: `false`.
1267
- */
1268
- checkAvailabilityValidation?: boolean;
1269
- }
1270
- export interface ConfirmMultiServiceBookingResponse {
1271
- /** Confirmed multi service booking. */
1272
- multiServiceBooking?: MultiServiceBooking;
1273
- }
1274
- export interface BookingConfirmed {
1275
- /** The confirmed booking object. */
1288
+ export interface ConfirmOrDeclineBookingResponse {
1289
+ /** Updated booking. */
1276
1290
  booking?: Booking;
1277
- /** Information about whether to notify the customer about the confirmation and the message to send. */
1278
- participantNotification?: ParticipantNotification;
1279
- /**
1280
- * Whether to send an SMS reminder to the customer 24 hours before the session starts.
1281
- * The phone number is taken from `contactDetails.phone`.
1282
- */
1283
- sendSmsReminder?: boolean | null;
1284
- /** Whether this booking overlaps with another existing confirmed booking. */
1285
- doubleBooked?: boolean | null;
1286
- /** ID of the confirmation initiator. */
1287
- initiatedBy?: IdentificationData;
1288
- /** The previous status of the booking. */
1289
- previousStatus?: BookingStatus;
1290
- /** The previous payment status of the booking. */
1291
- previousPaymentStatus?: PaymentStatus;
1292
1291
  }
1293
- export interface DeclineMultiServiceBookingRequest {
1294
- /** ID of the multi service booking to decline. */
1295
- multiServiceBookingId: string | null;
1296
- /** Information about the single-service bookings to decline. */
1297
- declineBookingsInfo?: BookingInfo[];
1292
+ export interface BulkConfirmOrDeclineBookingRequest {
1298
1293
  /**
1299
- * Information about whether to notify the customer and
1300
- * the message to send.
1294
+ * Bookings to confirm or decline.
1295
+ * @minSize 1
1296
+ * @maxSize 300
1301
1297
  */
1302
- participantNotification?: ParticipantNotification;
1303
- /** Whether this booking has a conflict with at least 1 other confirmed booking. */
1304
- doubleBooked?: boolean | null;
1305
- /** Whether to return the declined single-service bookings. */
1306
- returnFullEntity?: boolean;
1298
+ details: BulkConfirmOrDeclineBookingRequestBookingDetails[];
1299
+ /** Whether to return the confirmed or declined booking objects. */
1300
+ returnEntity?: boolean;
1301
+ }
1302
+ export interface BulkConfirmOrDeclineBookingRequestBookingDetails {
1307
1303
  /**
1308
- * Information about whether specific procedures of the standard Wix Bookings
1309
- * declining flow are changed. For example, whether to issue a refund.
1304
+ * ID of the booking to confirm or decline.
1305
+ * @format GUID
1310
1306
  */
1311
- flowControlSettings?: DeclineBookingFlowControlSettings;
1312
- }
1313
- export interface DeclineBookingFlowControlSettings {
1307
+ bookingId?: string;
1314
1308
  /**
1315
- * Whether to issue a refund when declining the booking.
1316
- *
1317
- * The refund will be issued only if the booking is refundable.
1318
- * Currently, a booking is considered refundable when it was paid by membership.
1319
- * If specifying `true`, the booking flow control settings will be set with a refund.
1320
- * If you specify `false` or an empty field,
1321
- * the booking flow control settings are set without refund.
1309
+ * Current payment status of the booking when using a custom checkout page and
1310
+ * not the *eCommerce checkout*
1311
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)).
1322
1312
  *
1323
- * Default: `false`.
1313
+ * The booking is declined if there is a double booking conflict and you provide
1314
+ * one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
1324
1315
  */
1325
- withRefund?: boolean | null;
1316
+ paymentStatus?: PaymentStatus;
1326
1317
  }
1327
- export interface DeclineMultiServiceBookingResponse {
1328
- /** Declined multi-service booking. */
1329
- multiServiceBooking?: MultiServiceBooking;
1318
+ export interface BulkConfirmOrDeclineBookingResponse {
1319
+ /** List of confirmed or declined bookings, including metadata. */
1320
+ results?: BulkBookingResult[];
1321
+ /** Total successes and failures of the Bulk Confirm Or Decline call. */
1322
+ bulkActionMetadata?: BulkActionMetadata;
1330
1323
  }
1331
- export interface BookingDeclined {
1332
- /** The declined booking object. */
1333
- booking?: Booking;
1334
- /** Information about whether to notify the customer about the decline and the message to send. */
1335
- participantNotification?: ParticipantNotification;
1336
- /** Whether this booking overlaps with another existing confirmed booking. */
1337
- doubleBooked?: boolean | null;
1338
- /** ID of the decline initiator. */
1339
- initiatedBy?: IdentificationData;
1340
- /** The previous status of the booking. */
1341
- previousStatus?: BookingStatus;
1342
- /** The previous payment status of the booking. */
1343
- previousPaymentStatus?: PaymentStatus;
1324
+ export interface BulkBookingResult {
1344
1325
  /**
1345
- * Information about whether specific procedures of the standard Wix Bookings
1346
- * declining flow are changed. For example, whether to issue a refund.
1326
+ * Information about the booking that was created or updated.
1327
+ * Including its ID, index in the bulk request and whether it was
1328
+ * successfully created or updated.
1347
1329
  */
1348
- flowControlSettings?: DeclineBookingFlowControlSettings;
1349
- }
1350
- export interface BulkGetMultiServiceBookingAllowedActionsRequest {
1351
- /** IDs of the multi-service bookings to retrieve allowed actions for. */
1352
- multiServiceBookingIds: string[] | null;
1353
- }
1354
- export interface BulkGetMultiServiceBookingAllowedActionsResponse {
1330
+ itemMetadata?: ItemMetadata;
1355
1331
  /**
1356
- * Information about the multi-service bookings that were retrieved.
1357
- * Including their ID, index in the bulk request and whether they were
1358
- * successfully updated.
1332
+ * Created or updated booking. Available only if you requested
1333
+ * to return the booking entity.
1359
1334
  */
1360
- results?: BulkCalculateAllowedActionsResult[];
1361
- /** Total number of successes and failures for Bulk Update Bookings. */
1362
- bulkActionMetadata?: BulkActionMetadata;
1363
- }
1364
- export interface BulkCalculateAllowedActionsResult {
1365
- /** Metadata for the booking. Including ID, index in the provided sequence, success status, and error. */
1366
- itemMetadata?: ItemMetadata;
1367
- /** Booking entity. */
1368
- item?: AllowedActions;
1335
+ item?: Booking;
1369
1336
  }
1370
1337
  export interface ItemMetadata {
1371
1338
  /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
@@ -1385,13 +1352,6 @@ export interface ApplicationError {
1385
1352
  /** Data related to the error. */
1386
1353
  data?: Record<string, any> | null;
1387
1354
  }
1388
- /** Possible actions allowed for the booking. */
1389
- export interface AllowedActions {
1390
- /** Whether canceling the booking is allowed. */
1391
- cancel?: boolean;
1392
- /** Whether rescheduling the booking is allowed. */
1393
- reschedule?: boolean;
1394
- }
1395
1355
  export interface BulkActionMetadata {
1396
1356
  /** Number of items that were successfully processed. */
1397
1357
  totalSuccesses?: number;
@@ -1400,58 +1360,6 @@ export interface BulkActionMetadata {
1400
1360
  /** Number of failures without details because detailed failure threshold was exceeded. */
1401
1361
  undetailedFailures?: number;
1402
1362
  }
1403
- export interface GetMultiServiceBookingRequest {
1404
- /** ID of the multi-service booking. */
1405
- multiServiceBookingId: string | null;
1406
- }
1407
- export interface GetMultiServiceBookingResponse {
1408
- /** Retrieved multi-service booking. */
1409
- multiServiceBooking?: MultiServiceBooking;
1410
- /** Details about how many single-service bookings belong to the multi-service booking. */
1411
- metadata?: MultiServiceBookingMetadata;
1412
- }
1413
- export interface MultiServiceBookingMetadata {
1414
- /**
1415
- * Total number of `CONFIRMED` and `PENDING` single-service bookings belonging
1416
- * to the multi-service booking. The total includes the number of single-service
1417
- * bookings which couldn't be retrieved due to lack of permissions.
1418
- */
1419
- totalNumberOfScheduledBookings?: number | null;
1420
- }
1421
- export interface AddBookingsToMultiServiceBookingRequest {
1422
- /** ID of the multi-service booking. */
1423
- multiServiceBookingId: string | null;
1424
- /** List of single-service booking IDs and their revision. */
1425
- bookings: BookingIdAndRevision[];
1426
- /** Whether to return the single-service bookings that were added to the multi-service booking. */
1427
- returnFullEntity?: boolean;
1428
- }
1429
- export interface BookingIdAndRevision {
1430
- /** ID of the booking. */
1431
- bookingId?: string | null;
1432
- /**
1433
- * Revision number, which increments by 1 each time the booking is updated.
1434
- * To prevent conflicting changes, the current revision must be specified when
1435
- * managing the booking.
1436
- */
1437
- revision?: string | null;
1438
- }
1439
- export interface AddBookingsToMultiServiceBookingResponse {
1440
- /** Single-service bookings that were added to the multi-service booking. */
1441
- bookings?: BookingResult[];
1442
- }
1443
- export interface RemoveBookingsFromMultiServiceBookingRequest {
1444
- /** ID of the multi-service booking. */
1445
- multiServiceBookingId: string | null;
1446
- /** List of single-service booking IDs and their revision. */
1447
- bookings?: BookingIdAndRevision[];
1448
- /** Whether to return the single-service bookings. */
1449
- returnFullEntity?: boolean;
1450
- }
1451
- export interface RemoveBookingsFromMultiServiceBookingResponse {
1452
- /** Single-service bookings that were removed from the multi-service booking. */
1453
- bookings?: BookingResult[];
1454
- }
1455
1363
  export interface BookingChanged {
1456
1364
  /** The booking before the changes. */
1457
1365
  previousBooking?: Booking;
@@ -1471,12 +1379,39 @@ export interface CreateBookingRequest {
1471
1379
  * session starts. The phone number is taken from `contactDetails.phone`.
1472
1380
  * Default: `true`.
1473
1381
  */
1474
- sendSmsReminder?: boolean | null;
1382
+ sendSmsReminder?: boolean | null;
1383
+ /**
1384
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
1385
+ * For example, whether to check availability when creating a booking.
1386
+ */
1387
+ flowControlSettings?: CreateBookingFlowControlSettings;
1388
+ }
1389
+ export interface CreateBookingFlowControlSettings {
1390
+ /**
1391
+ * Whether the availability is checked before creating the booking.
1392
+ *
1393
+ * When passing `false`, a booking is only created when the slot or schedule is available.
1394
+ * Default: `false`.
1395
+ */
1396
+ skipAvailabilityValidation?: boolean;
1397
+ /**
1398
+ * Whether `PENDING` bookings are automatically set to `CONFIRMED` for
1399
+ * services that normally require the owner's manual confirmation.
1400
+ *
1401
+ * Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY` permission scope
1402
+ * when passing `true`.
1403
+ * Default: `false`.
1404
+ */
1405
+ skipBusinessConfirmation?: boolean;
1475
1406
  /**
1476
- * Whether to ignore specific standard procedures of the Wix Bookings flow.
1477
- * For example, whether to check availability when creating a booking.
1407
+ * Whether customers can pay using a payment method that isn't supported
1408
+ * for the service, but that's supported for other services.
1409
+ *
1410
+ * Your app must have the `BOOKINGS.MANAGE_PAYMENTS` permission scope when passing
1411
+ * `true`.
1412
+ * Default: `false`.
1478
1413
  */
1479
- flowControlSettings?: CreateBookingFlowControlSettings;
1414
+ skipSelectedPaymentOptionValidation?: boolean;
1480
1415
  }
1481
1416
  export interface CreateBookingResponse {
1482
1417
  /** Created booking. */
@@ -1524,6 +1459,8 @@ export interface BulkCreateBookingRequest {
1524
1459
  * Bookings to create.
1525
1460
  *
1526
1461
  * Max: 8 bookings
1462
+ * @minSize 1
1463
+ * @maxSize 8
1527
1464
  */
1528
1465
  createBookingsInfo: CreateBookingInfo[];
1529
1466
  /** Whether to return the created bookings. */
@@ -1555,19 +1492,6 @@ export interface BulkCreateBookingResponse {
1555
1492
  /** Total number of successes and failures for Bulk Create Bookings. */
1556
1493
  bulkActionMetadata?: BulkActionMetadata;
1557
1494
  }
1558
- export interface BulkBookingResult {
1559
- /**
1560
- * Information about the booking that was created or updated.
1561
- * Including its ID, index in the bulk request and whether it was
1562
- * successfully created or updated.
1563
- */
1564
- itemMetadata?: ItemMetadata;
1565
- /**
1566
- * Created or updated booking. Available only if you requested
1567
- * to return the booking entity.
1568
- */
1569
- item?: Booking;
1570
- }
1571
1495
  export interface RescheduleBookingRequest extends RescheduleBookingRequestParticipantsInfoOneOf {
1572
1496
  /**
1573
1497
  * Total number of participants. Specify when all participants have booked the
@@ -1579,7 +1503,10 @@ export interface RescheduleBookingRequest extends RescheduleBookingRequestPartic
1579
1503
  * participants have booked the same service variant.
1580
1504
  */
1581
1505
  participantsChoices?: ParticipantChoices;
1582
- /** ID of the booking to reschedule. */
1506
+ /**
1507
+ * ID of the booking to reschedule.
1508
+ * @format GUID
1509
+ */
1583
1510
  bookingId: string;
1584
1511
  /** New slot of the booking. */
1585
1512
  slot: V2Slot;
@@ -1613,12 +1540,220 @@ export interface RescheduleBookingRequestParticipantsInfoOneOf {
1613
1540
  */
1614
1541
  participantsChoices?: ParticipantChoices;
1615
1542
  }
1543
+ export interface V2Slot {
1544
+ /** Identifier for the underlying session when the session is a single session or generated from a recurring session. */
1545
+ sessionId?: string | null;
1546
+ /** Service identifier. Required. */
1547
+ serviceId?: string;
1548
+ /** Schedule identifier. Required. */
1549
+ scheduleId?: string;
1550
+ /** The start time of this slot (formatted according to RFC3339). */
1551
+ startDate?: string | null;
1552
+ /** The end time of this slot (formatted according to RFC3339). */
1553
+ endDate?: string | null;
1554
+ /** The timezone according to which the slot is calculated and presented. */
1555
+ timezone?: string | null;
1556
+ /**
1557
+ * The resource required for this slot.
1558
+ * When populated, the specified resource will be assigned to the slot upon confirmation according to its availability.
1559
+ * When empty, if `skip_availability_validation` is `false`, a random available resource will be assigned to the slot upon confirmation.
1560
+ * Otherwise, one of the service resources will be assigned to the slot randomly upon confirmation.
1561
+ */
1562
+ resource?: SlotSlotResource;
1563
+ /** Geographic location of the slot. */
1564
+ location?: SlotLocation;
1565
+ /**
1566
+ * Calendar event ID - not supported.
1567
+ * If not empty, on all write flows (create/update), it takes priority over `sessionId`.
1568
+ * So if both `sessionId` and `eventId` are provided, the `sessionId` will be based on the `eventId`.
1569
+ * Otherwise, if `eventId` is empty on write flow,
1570
+ * @minLength 36
1571
+ * @maxLength 250
1572
+ */
1573
+ eventId?: string | null;
1574
+ }
1575
+ export declare enum LocationLocationType {
1576
+ /** Undefined location type. */
1577
+ UNDEFINED = "UNDEFINED",
1578
+ /** The business address as set in the site’s general settings. */
1579
+ OWNER_BUSINESS = "OWNER_BUSINESS",
1580
+ /** The address set when creating the service. */
1581
+ OWNER_CUSTOM = "OWNER_CUSTOM",
1582
+ /** The address set for the individual session. */
1583
+ CUSTOM = "CUSTOM"
1584
+ }
1585
+ export interface SlotSlotResource {
1586
+ /**
1587
+ * Resource ID.
1588
+ * @format GUID
1589
+ * @readonly
1590
+ */
1591
+ id?: string | null;
1592
+ /**
1593
+ * Resource name.
1594
+ * @maxLength 1200
1595
+ */
1596
+ name?: string | null;
1597
+ }
1598
+ export interface SlotLocation {
1599
+ /**
1600
+ * Business Location ID. Present if the location is a business location.
1601
+ * @format GUID
1602
+ */
1603
+ id?: string | null;
1604
+ /** Location name. */
1605
+ name?: string | null;
1606
+ /** A string containing the full address of this location. */
1607
+ formattedAddress?: string | null;
1608
+ /** Location type. */
1609
+ locationType?: LocationLocationType;
1610
+ }
1611
+ export interface RescheduleBookingFlowControlSettings {
1612
+ /**
1613
+ * Whether the rescheduling policy applies when rescheduling the booking.
1614
+ *
1615
+ * When passing `false`, you can only cancel a booking if the rescheduling
1616
+ * policy allows it.
1617
+ * Default: `false`.
1618
+ */
1619
+ ignoreReschedulePolicy?: boolean;
1620
+ /**
1621
+ * Whether the availability is checked before rescheduling the booking.
1622
+ *
1623
+ * When passing `false`, a booking is only created when the slot or
1624
+ * schedule is available.
1625
+ * Default: `false`.
1626
+ */
1627
+ skipAvailabilityValidation?: boolean;
1628
+ /**
1629
+ * Whether the rescheduled booking's status is automatically set to
1630
+ * `CONFIRMED` for services that normally require the owner's manual
1631
+ * confirmation.
1632
+ * Default: `false`.
1633
+ */
1634
+ skipBusinessConfirmation?: boolean;
1635
+ }
1616
1636
  export interface RescheduleBookingResponse {
1617
1637
  /** Rescheduled booking. */
1618
1638
  booking?: Booking;
1619
1639
  }
1640
+ export interface BookingRescheduled extends BookingRescheduledPreviousParticipantsInfoOneOf {
1641
+ /**
1642
+ * The previous total number of participants. Available only when the booking includes
1643
+ * a single service variant.
1644
+ */
1645
+ previousTotalParticipants?: number;
1646
+ /**
1647
+ * Information about the previous booked service choices and participants.
1648
+ * Available only when the booking includes multiple service variants.
1649
+ */
1650
+ previousParticipantsChoices?: ParticipantChoices;
1651
+ /** The rescheduled booking object. */
1652
+ booking?: Booking;
1653
+ /** Information about whether to notify the customer about the rescheduling and the message to send. */
1654
+ participantNotification?: ParticipantNotification;
1655
+ /**
1656
+ * Information about whether specific procedures of the standard Wix Bookings
1657
+ * rescheduling flow are changed. For example, whether the availability of
1658
+ * the new slot is checked before rescheduling the booking or if you can
1659
+ * reschedule the booking even though the rescheduling policy doesn't allow it.
1660
+ */
1661
+ flowControlSettings?: RescheduleBookingFlowControlSettings;
1662
+ /** ID of the rescheduling initiator. */
1663
+ initiatedBy?: IdentificationData;
1664
+ /** The previous status of the booking. */
1665
+ previousStatus?: BookingStatus;
1666
+ /** An object describing the previous slot or schedule of the booking. */
1667
+ previousBookedEntity?: BookedEntity;
1668
+ /**
1669
+ * The previous start date of the booking.
1670
+ * For a slot, this is the start date of the slot.
1671
+ * For a schedule, this is the start date of the first session.
1672
+ */
1673
+ previousStartDate?: Date | null;
1674
+ /**
1675
+ * The previous end date of the booking.
1676
+ * For a slot, this is the end date of the slot.
1677
+ * For a schedule, this is the end date of the last session.
1678
+ */
1679
+ previousEndDate?: Date | null;
1680
+ }
1681
+ /** @oneof */
1682
+ export interface BookingRescheduledPreviousParticipantsInfoOneOf {
1683
+ /**
1684
+ * The previous total number of participants. Available only when the booking includes
1685
+ * a single service variant.
1686
+ */
1687
+ previousTotalParticipants?: number;
1688
+ /**
1689
+ * Information about the previous booked service choices and participants.
1690
+ * Available only when the booking includes multiple service variants.
1691
+ */
1692
+ previousParticipantsChoices?: ParticipantChoices;
1693
+ }
1694
+ export interface IdentificationData extends IdentificationDataIdOneOf {
1695
+ /**
1696
+ * ID of a site visitor that has not logged in to the site.
1697
+ * @format GUID
1698
+ */
1699
+ anonymousVisitorId?: string;
1700
+ /**
1701
+ * ID of a site visitor that has logged in to the site.
1702
+ * @format GUID
1703
+ */
1704
+ memberId?: string;
1705
+ /**
1706
+ * ID of a Wix user (site owner, contributor, etc.).
1707
+ * @format GUID
1708
+ */
1709
+ wixUserId?: string;
1710
+ /**
1711
+ * ID of an app.
1712
+ * @format GUID
1713
+ */
1714
+ appId?: string;
1715
+ /**
1716
+ * ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system.
1717
+ * @format GUID
1718
+ * @readonly
1719
+ */
1720
+ contactId?: string | null;
1721
+ }
1722
+ /** @oneof */
1723
+ export interface IdentificationDataIdOneOf {
1724
+ /**
1725
+ * ID of a site visitor that has not logged in to the site.
1726
+ * @format GUID
1727
+ */
1728
+ anonymousVisitorId?: string;
1729
+ /**
1730
+ * ID of a site visitor that has logged in to the site.
1731
+ * @format GUID
1732
+ */
1733
+ memberId?: string;
1734
+ /**
1735
+ * ID of a Wix user (site owner, contributor, etc.).
1736
+ * @format GUID
1737
+ */
1738
+ wixUserId?: string;
1739
+ /**
1740
+ * ID of an app.
1741
+ * @format GUID
1742
+ */
1743
+ appId?: string;
1744
+ }
1745
+ export declare enum IdentityType {
1746
+ UNKNOWN = "UNKNOWN",
1747
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1748
+ MEMBER = "MEMBER",
1749
+ WIX_USER = "WIX_USER",
1750
+ APP = "APP"
1751
+ }
1620
1752
  export interface BulkRescheduleBookingRequest {
1621
- /** Reschedule multiple bookings to multiple slots. */
1753
+ /**
1754
+ * Reschedule multiple bookings to multiple slots.
1755
+ * @minSize 1
1756
+ */
1622
1757
  slotsBookings?: SlotBookings[];
1623
1758
  /**
1624
1759
  * Information about whether to notify the customer about the rescheduling and
@@ -1627,7 +1762,10 @@ export interface BulkRescheduleBookingRequest {
1627
1762
  participantNotification?: ParticipantNotification;
1628
1763
  }
1629
1764
  export interface BulkRescheduleBookingRequestBooking {
1630
- /** ID of the booking to reschedule. */
1765
+ /**
1766
+ * ID of the booking to reschedule.
1767
+ * @format GUID
1768
+ */
1631
1769
  id?: string;
1632
1770
  /**
1633
1771
  * Revision number, which increments by 1 each time the booking is rescheduled.
@@ -1638,7 +1776,10 @@ export interface BulkRescheduleBookingRequestBooking {
1638
1776
  }
1639
1777
  /** Bookings to be rescheduled to the given slot. */
1640
1778
  export interface SlotBookings {
1641
- /** The bookings details. */
1779
+ /**
1780
+ * The bookings details.
1781
+ * @minSize 1
1782
+ */
1642
1783
  bookings?: BulkRescheduleBookingRequestBooking[];
1643
1784
  /**
1644
1785
  * The slot to which the bookings were rescheduled.
@@ -1658,7 +1799,10 @@ export interface BulkRescheduleBookingResponse {
1658
1799
  }
1659
1800
  /** Update the booked schedule of multiple bookings to the given schedule. */
1660
1801
  export interface BulkUpdateBookedScheduleRequest {
1661
- /** The bookings whose booked schedule is to be updated to the given schedule. */
1802
+ /**
1803
+ * The bookings whose booked schedule is to be updated to the given schedule.
1804
+ * @minSize 1
1805
+ */
1662
1806
  bookings?: BookingDetails[];
1663
1807
  /** ID of the schedule to update. */
1664
1808
  scheduleId?: string;
@@ -1669,7 +1813,10 @@ export interface BulkUpdateBookedScheduleRequest {
1669
1813
  participantNotification?: ParticipantNotification;
1670
1814
  }
1671
1815
  export interface BookingDetails {
1672
- /** ID of the bookings to be updated. */
1816
+ /**
1817
+ * ID of the bookings to be updated.
1818
+ * @format GUID
1819
+ */
1673
1820
  id?: string;
1674
1821
  revision?: string | null;
1675
1822
  }
@@ -1719,7 +1866,10 @@ export interface QueryV2PagingMethodOneOf {
1719
1866
  cursorPaging?: CursorPaging;
1720
1867
  }
1721
1868
  export interface Sorting {
1722
- /** Name of the field to sort by. */
1869
+ /**
1870
+ * Name of the field to sort by.
1871
+ * @maxLength 512
1872
+ */
1723
1873
  fieldName?: string;
1724
1874
  /** Sort order. */
1725
1875
  order?: SortOrder;
@@ -1735,13 +1885,17 @@ export interface Paging {
1735
1885
  offset?: number | null;
1736
1886
  }
1737
1887
  export interface CursorPaging {
1738
- /** Maximum number of items to return in the results. */
1888
+ /**
1889
+ * Maximum number of items to return in the results.
1890
+ * @max 100
1891
+ */
1739
1892
  limit?: number | null;
1740
1893
  /**
1741
1894
  * Pointer to the next or previous page in the list of results.
1742
1895
  *
1743
1896
  * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1744
1897
  * Not relevant for the first request.
1898
+ * @maxLength 16000
1745
1899
  */
1746
1900
  cursor?: string | null;
1747
1901
  }
@@ -1764,13 +1918,22 @@ export interface PagingMetadataV2 {
1764
1918
  cursors?: Cursors;
1765
1919
  }
1766
1920
  export interface Cursors {
1767
- /** Cursor string pointing to the next page in the list of results. */
1921
+ /**
1922
+ * Cursor string pointing to the next page in the list of results.
1923
+ * @maxLength 16000
1924
+ */
1768
1925
  next?: string | null;
1769
- /** Cursor pointing to the previous page in the list of results. */
1926
+ /**
1927
+ * Cursor pointing to the previous page in the list of results.
1928
+ * @maxLength 16000
1929
+ */
1770
1930
  prev?: string | null;
1771
1931
  }
1772
1932
  export interface ConfirmRequest {
1773
- /** ID of the booking to confirm. */
1933
+ /**
1934
+ * ID of the booking to confirm.
1935
+ * @format GUID
1936
+ */
1774
1937
  id?: string;
1775
1938
  /**
1776
1939
  * Information about whether to notify the customer about the confirmation and
@@ -1785,7 +1948,10 @@ export interface ConfirmResponse {
1785
1948
  doubleBooked?: boolean | null;
1786
1949
  }
1787
1950
  export interface ConfirmBookingRequest {
1788
- /** ID of the booking to confirm. */
1951
+ /**
1952
+ * ID of the booking to confirm.
1953
+ * @format GUID
1954
+ */
1789
1955
  bookingId: string;
1790
1956
  /**
1791
1957
  * Revision number, which increments by 1 each time the booking is updated.
@@ -1813,10 +1979,38 @@ export interface ConfirmBookingRequest {
1813
1979
  */
1814
1980
  flowControlSettings?: ConfirmBookingFlowControlSettings;
1815
1981
  }
1982
+ export interface ConfirmBookingFlowControlSettings {
1983
+ /**
1984
+ * Whether the availability is checked before confirming the booking.
1985
+ *
1986
+ * When specifying `false`, a booking is only updated with status `CONFIRMED`.
1987
+ * Default: `false`.
1988
+ */
1989
+ checkAvailabilityValidation?: boolean;
1990
+ }
1816
1991
  export interface ConfirmBookingResponse {
1817
1992
  /** Confirmed booking. */
1818
1993
  booking?: Booking;
1819
1994
  }
1995
+ export interface BookingConfirmed {
1996
+ /** The confirmed booking object. */
1997
+ booking?: Booking;
1998
+ /** Information about whether to notify the customer about the confirmation and the message to send. */
1999
+ participantNotification?: ParticipantNotification;
2000
+ /**
2001
+ * Whether to send an SMS reminder to the customer 24 hours before the session starts.
2002
+ * The phone number is taken from `contactDetails.phone`.
2003
+ */
2004
+ sendSmsReminder?: boolean | null;
2005
+ /** Whether this booking overlaps with another existing confirmed booking. */
2006
+ doubleBooked?: boolean | null;
2007
+ /** ID of the confirmation initiator. */
2008
+ initiatedBy?: IdentificationData;
2009
+ /** The previous status of the booking. */
2010
+ previousStatus?: BookingStatus;
2011
+ /** The previous payment status of the booking. */
2012
+ previousPaymentStatus?: PaymentStatus;
2013
+ }
1820
2014
  export interface ConsistentQueryBookingsRequest {
1821
2015
  /** Information about filters, paging, and sorting. */
1822
2016
  query?: QueryV2;
@@ -1828,7 +2022,10 @@ export interface ConsistentQueryBookingsResponse {
1828
2022
  pagingMetadata?: PagingMetadataV2;
1829
2023
  }
1830
2024
  export interface SetBookingSessionIdRequest {
1831
- /** ID of the booking to set `sessionId` for. */
2025
+ /**
2026
+ * ID of the booking to set `sessionId` for.
2027
+ * @format GUID
2028
+ */
1832
2029
  id?: string;
1833
2030
  /** ID of the session to set on the booking. */
1834
2031
  sessionId?: string;
@@ -1838,9 +2035,15 @@ export interface SetBookingSessionIdResponse {
1838
2035
  booking?: Booking;
1839
2036
  }
1840
2037
  export interface SetBookingSubmissionIdRequest {
1841
- /** ID of the booking to set `submissionId` for. */
2038
+ /**
2039
+ * ID of the booking to set `submissionId` for.
2040
+ * @format GUID
2041
+ */
1842
2042
  bookingId?: string;
1843
- /** ID of the form submission to set on the booking. */
2043
+ /**
2044
+ * ID of the form submission to set on the booking.
2045
+ * @format GUID
2046
+ */
1844
2047
  submissionId?: string;
1845
2048
  }
1846
2049
  export interface SetBookingSubmissionIdResponse {
@@ -1856,19 +2059,26 @@ export interface UpdateExtendedFieldsRequest {
1856
2059
  namespaceData: Record<string, any> | null;
1857
2060
  }
1858
2061
  export interface UpdateExtendedFieldsResponse {
1859
- /** Updated namespace. */
2062
+ /**
2063
+ * Updated namespace.
2064
+ * @maxLength 164
2065
+ */
1860
2066
  namespace?: string;
1861
2067
  /** Updated data. */
1862
2068
  namespaceData?: Record<string, any> | null;
1863
2069
  }
1864
2070
  export interface DeclineBookingRequest {
1865
- /** ID of the booking to decline. */
2071
+ /**
2072
+ * ID of the booking to decline.
2073
+ * @format GUID
2074
+ */
1866
2075
  bookingId: string;
1867
2076
  /**
1868
2077
  * Revision number, which increments by 1 each time the booking is updated.
1869
2078
  *
1870
2079
  * To prevent conflicting changes, the current revision must be specified when
1871
2080
  * declining the booking.
2081
+ * @min 1
1872
2082
  */
1873
2083
  revision: string | null;
1874
2084
  /**
@@ -1886,12 +2096,48 @@ export interface DeclineBookingRequest {
1886
2096
  */
1887
2097
  flowControlSettings?: DeclineBookingFlowControlSettings;
1888
2098
  }
2099
+ export interface DeclineBookingFlowControlSettings {
2100
+ /**
2101
+ * Whether to issue a refund when declining the booking.
2102
+ *
2103
+ * The refund will be issued only if the booking is refundable.
2104
+ * Currently, a booking is considered refundable when it was paid by membership.
2105
+ * If specifying `true`, the booking flow control settings will be set with a refund.
2106
+ * If you specify `false` or an empty field,
2107
+ * the booking flow control settings are set without refund.
2108
+ *
2109
+ * Default: `false`.
2110
+ */
2111
+ withRefund?: boolean | null;
2112
+ }
1889
2113
  export interface DeclineBookingResponse {
1890
2114
  /** Declined booking. */
1891
2115
  booking?: Booking;
1892
2116
  }
2117
+ export interface BookingDeclined {
2118
+ /** The declined booking object. */
2119
+ booking?: Booking;
2120
+ /** Information about whether to notify the customer about the decline and the message to send. */
2121
+ participantNotification?: ParticipantNotification;
2122
+ /** Whether this booking overlaps with another existing confirmed booking. */
2123
+ doubleBooked?: boolean | null;
2124
+ /** ID of the decline initiator. */
2125
+ initiatedBy?: IdentificationData;
2126
+ /** The previous status of the booking. */
2127
+ previousStatus?: BookingStatus;
2128
+ /** The previous payment status of the booking. */
2129
+ previousPaymentStatus?: PaymentStatus;
2130
+ /**
2131
+ * Information about whether specific procedures of the standard Wix Bookings
2132
+ * declining flow are changed. For example, whether to issue a refund.
2133
+ */
2134
+ flowControlSettings?: DeclineBookingFlowControlSettings;
2135
+ }
1893
2136
  export interface CancelBookingRequest {
1894
- /** ID of the booking to cancel. */
2137
+ /**
2138
+ * ID of the booking to cancel.
2139
+ * @format GUID
2140
+ */
1895
2141
  bookingId: string;
1896
2142
  /**
1897
2143
  * Information about whether to notify the customer about the cancellation and
@@ -1912,10 +2158,48 @@ export interface CancelBookingRequest {
1912
2158
  */
1913
2159
  revision: string | null;
1914
2160
  }
2161
+ export interface CancelBookingFlowControlSettings {
2162
+ /**
2163
+ * Whether the cancellation policy applies when canceling the booking.
2164
+ *
2165
+ * When passing `false`, you can only cancel a booking if the cancellation policy allows it.
2166
+ * Default: `false`.
2167
+ */
2168
+ ignoreCancellationPolicy?: boolean | null;
2169
+ /**
2170
+ * Whether to issue a refund when canceling the booking.
2171
+ *
2172
+ * The refund will be issued only if the booking is refundable.
2173
+ * Currently, a booking is considered refundable when it was paid by membership.
2174
+ * If you specify `true`, the booking flow control settings is set to include a refund.
2175
+ * If `false` is specified or the field remains empty,
2176
+ * the booking flow control settings are set without refund.
2177
+ *
2178
+ * Default: `false`.
2179
+ */
2180
+ withRefund?: boolean | null;
2181
+ }
1915
2182
  export interface CancelBookingResponse {
1916
2183
  /** Canceled booking. */
1917
2184
  booking?: Booking;
1918
2185
  }
2186
+ export interface BookingCanceled {
2187
+ /** The canceled booking object. */
2188
+ booking?: Booking;
2189
+ /** Information about whether to notify the customer about the cancellation and the message to send. */
2190
+ participantNotification?: ParticipantNotification;
2191
+ /**
2192
+ * Information about whether specific procedures of the standard Wix Bookings
2193
+ * cancellation flow are changed. For example, whether you can cancel
2194
+ * a booking even though the cancellation policy doesn't allow it or whether
2195
+ * to issue a refund.
2196
+ */
2197
+ flowControlSettings?: CancelBookingFlowControlSettings;
2198
+ /** ID of the cancellation initiator. */
2199
+ initiatedBy?: IdentificationData;
2200
+ /** The previous status of the booking. */
2201
+ previousStatus?: BookingStatus;
2202
+ }
1919
2203
  export interface UpdateNumberOfParticipantsRequest extends UpdateNumberOfParticipantsRequestParticipantsInfoOneOf {
1920
2204
  /**
1921
2205
  * Total number of participants. Specify when all participants have booked the
@@ -1927,7 +2211,10 @@ export interface UpdateNumberOfParticipantsRequest extends UpdateNumberOfPartici
1927
2211
  * when not all participants have booked the same service variant.
1928
2212
  */
1929
2213
  participantsChoices?: ParticipantChoices;
1930
- /** ID of the booking to update the number of participants for. */
2214
+ /**
2215
+ * ID of the booking to update the number of participants for.
2216
+ * @format GUID
2217
+ */
1931
2218
  bookingId: string;
1932
2219
  /**
1933
2220
  * Revision number, which increments by 1 each time the booking is updated.
@@ -1984,7 +2271,10 @@ export interface NumberOfParticipantsUpdatedPreviousParticipantsInfoOneOf {
1984
2271
  previousParticipantsChoices?: ParticipantChoices;
1985
2272
  }
1986
2273
  export interface BulkCalculateAllowedActionsRequest {
1987
- /** The booking IDs for which we want to calculate the allowed actions. */
2274
+ /**
2275
+ * The booking IDs for which we want to calculate the allowed actions.
2276
+ * @minSize 1
2277
+ */
1988
2278
  bookingIds?: string[] | null;
1989
2279
  }
1990
2280
  export interface BulkCalculateAllowedActionsResponse {
@@ -1992,6 +2282,19 @@ export interface BulkCalculateAllowedActionsResponse {
1992
2282
  /** Total number of successes and failures for Bulk Calculate Allowed Actions. */
1993
2283
  bulkActionMetadata?: BulkActionMetadata;
1994
2284
  }
2285
+ export interface BulkCalculateAllowedActionsResult {
2286
+ /** Metadata for the booking. Including ID, index in the provided sequence, success status, and error. */
2287
+ itemMetadata?: ItemMetadata;
2288
+ /** Booking entity. */
2289
+ item?: AllowedActions;
2290
+ }
2291
+ /** Possible actions allowed for the booking. */
2292
+ export interface AllowedActions {
2293
+ /** Whether canceling the booking is allowed. */
2294
+ cancel?: boolean;
2295
+ /** Whether rescheduling the booking is allowed. */
2296
+ reschedule?: boolean;
2297
+ }
1995
2298
  export interface GetSlotAvailabilityRequest {
1996
2299
  /** The slot for which the availability is checked. */
1997
2300
  slot?: V2Slot;
@@ -2032,18 +2335,38 @@ export interface WaitingList {
2032
2335
  totalSpots?: number | null;
2033
2336
  openSpots?: number | null;
2034
2337
  }
2338
+ export interface BookingPolicyViolations {
2339
+ /** Booking policy violation: Too early to book this slot. */
2340
+ tooEarlyToBook?: boolean | null;
2341
+ /** Booking policy violation: Too late to book this slot. */
2342
+ tooLateToBook?: boolean | null;
2343
+ /** Booking policy violation: Online booking is disabled for this slot. */
2344
+ bookOnlineDisabled?: boolean | null;
2345
+ }
2346
+ export interface BookingPolicySettings {
2347
+ /** Booking policy settings for a given slot or schedule. */
2348
+ maxParticipantsPerBooking?: number | null;
2349
+ }
2035
2350
  export interface AvailableResources {
2036
- /** Resource type ID. */
2351
+ /**
2352
+ * Resource type ID.
2353
+ * @format GUID
2354
+ */
2037
2355
  resourceTypeId?: string | null;
2038
2356
  /**
2039
2357
  * Available resources for the slot.
2040
2358
  * `maxSize` is defined by 135 staff members + 3 resource types and 50 resources per type.
2041
2359
  * `Availability-2` currently has no `maxSize` defined.
2360
+ * @format GUID
2361
+ * @maxSize 275
2042
2362
  */
2043
2363
  resourceIds?: string[];
2044
2364
  }
2045
2365
  export interface GetScheduleAvailabilityRequest {
2046
- /** ID of the schedule for which to check availability. */
2366
+ /**
2367
+ * ID of the schedule for which to check availability.
2368
+ * @format GUID
2369
+ */
2047
2370
  scheduleId?: string;
2048
2371
  }
2049
2372
  export interface GetScheduleAvailabilityResponse {
@@ -2059,7 +2382,10 @@ export interface ScheduleAvailability {
2059
2382
  bookingPolicyViolations?: BookingPolicyViolations;
2060
2383
  }
2061
2384
  export interface MarkBookingAsPendingRequest {
2062
- /** ID of the booking to mark as `PENDING`. */
2385
+ /**
2386
+ * ID of the booking to mark as `PENDING`.
2387
+ * @format GUID
2388
+ */
2063
2389
  bookingId?: string;
2064
2390
  /**
2065
2391
  * Revision number, which increments by 1 each time the booking is updated.
@@ -2088,6 +2414,22 @@ export interface MarkBookingAsPendingRequest {
2088
2414
  */
2089
2415
  flowControlSettings?: MarkBookingAsPendingFlowControlSettings;
2090
2416
  }
2417
+ export interface MarkBookingAsPendingFlowControlSettings {
2418
+ /**
2419
+ * Whether to check for double bookings before updating the booking as pending.
2420
+ *
2421
+ * When passing `false`, a booking is only updated with status `PENDING`.
2422
+ * Default: `false`.
2423
+ */
2424
+ checkAvailabilityValidation?: boolean;
2425
+ /**
2426
+ * Whether to validate that the booking to be marked as pending has a `booking.slot.serviceId`
2427
+ * of a pending approval service.
2428
+ *
2429
+ * Default: `false`.
2430
+ */
2431
+ skipPendingApprovalServiceValidation?: boolean;
2432
+ }
2091
2433
  export interface MarkBookingAsPendingResponse {
2092
2434
  /** Updated booking. */
2093
2435
  booking?: Booking;
@@ -2143,404 +2485,380 @@ export interface CountBookingsResponse {
2143
2485
  /** Number of bookings matching the specified filter. */
2144
2486
  count?: number;
2145
2487
  }
2146
- export interface ConfirmOrDeclineBookingRequest {
2147
- /** ID of the booking to confirm or decline. */
2148
- bookingId: string;
2488
+ export interface CreateMultiServiceBookingRequest {
2149
2489
  /**
2150
- * Current payment status of the booking when using a custom checkout page and
2151
- * not the *eCommerce checkout*
2152
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)).
2153
- *
2154
- * The booking is declined if there is a double booking conflict and you provide
2155
- * one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
2490
+ * Single-service bookings to combine in a multi-service booking.
2491
+ * @minSize 2
2492
+ * @maxSize 8
2156
2493
  */
2157
- paymentStatus?: PaymentStatus;
2158
- }
2159
- export interface ConfirmOrDeclineBookingResponse {
2160
- /** Updated booking. */
2161
- booking?: Booking;
2162
- }
2163
- export interface BulkConfirmOrDeclineBookingRequest {
2164
- /** Bookings to confirm or decline. */
2165
- details: BulkConfirmOrDeclineBookingRequestBookingDetails[];
2166
- /** Whether to return the confirmed or declined booking objects. */
2167
- returnEntity?: boolean;
2168
- }
2169
- export interface BulkConfirmOrDeclineBookingRequestBookingDetails {
2170
- /** ID of the booking to confirm or decline. */
2171
- bookingId?: string;
2494
+ bookings: Booking[];
2172
2495
  /**
2173
- * Current payment status of the booking when using a custom checkout page and
2174
- * not the *eCommerce checkout*
2175
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)).
2496
+ * Information about whether to notify the customer and
2497
+ * the message to send.
2498
+ */
2499
+ participantNotification?: ParticipantNotification;
2500
+ /**
2501
+ * Whether to send an SMS reminder to the customer 24 hours before the
2502
+ * session starts. The phone number is taken from `contactDetails.phone`.
2176
2503
  *
2177
- * The booking is declined if there is a double booking conflict and you provide
2178
- * one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
2504
+ * Default: `true`
2179
2505
  */
2180
- paymentStatus?: PaymentStatus;
2181
- }
2182
- export interface BulkConfirmOrDeclineBookingResponse {
2183
- /** List of confirmed or declined bookings, including metadata. */
2184
- results?: BulkBookingResult[];
2185
- /** Total successes and failures of the Bulk Confirm Or Decline call. */
2186
- bulkActionMetadata?: BulkActionMetadata;
2506
+ sendSmsReminder?: boolean | null;
2507
+ /**
2508
+ * Whether to ignore specific standard procedures of the Wix Bookings flow.
2509
+ * For example, whether to check availability before updating the status.
2510
+ */
2511
+ flowControlSettings?: CreateBookingFlowControlSettings;
2512
+ /** Whether to return the created single-service bookings. */
2513
+ returnFullEntity?: boolean;
2514
+ /** Multi service booking type. */
2515
+ multiServiceBookingType?: MultiServiceBookingType;
2187
2516
  }
2188
- export interface V2CreateBookingRequest extends V2CreateBookingRequestBookableItemOneOf, V2CreateBookingRequestParticipantsInfoOneOf {
2517
+ export interface CreateMultiServiceBookingResponse {
2189
2518
  /**
2190
- * Information about the slot to create a booking for.
2191
- * If you set `slot.location.locationType` to `CUSTOM`, the created slot's
2192
- * location is set to `slot.location.formattedAddress` when provided.
2193
- * Otherwise it's set to `contactDetails.fullAddress.formattedAddress`.
2519
+ * Created multi service booking.
2520
+ * Contains the booking results in the same order as specified in the request.
2194
2521
  */
2195
- slot?: Slot;
2196
- /** Information about the schedule to create a booking for. */
2197
- schedule?: BookedSchedule;
2198
- /** Contact details of the customer booking the service. */
2199
- contactDetails?: ContactDetails;
2522
+ multiServiceBooking?: MultiServiceBooking;
2523
+ }
2524
+ export interface MultiServiceBooking {
2200
2525
  /**
2201
- * Booking status.
2202
- * One of:
2203
- * - `"CREATED"` - The booking was created.
2204
- * - `"UPDATED"` - The booking was updated.
2205
- * - `"CONFIRMED"` - The booking has been confirmed and appears on the bookings calendar.
2206
- * Booking can be manually confirmed using the Set As Confirmed endpoint.
2207
- * Booking can be automatically confirmed when the following requirements are met:
2208
- * + The service is configured as automatically confirmed.
2209
- * + Invoking eCommerce checkout API and an order has been created.
2210
- * - `"CANCELED"` - The booking has been canceled and synced to bookings calendar.
2211
- * The booking can be canceled using cancel API.
2212
- * - `"PENDING"` - The booking waiting to be confirmed or declined buy the owner and is synced to bookings calendar.
2213
- * Bookings can be manually set as pending using setAsPending API, requires manage booking status permissions.
2214
- * Booking can be automatically set as pending when the following requirements are met:
2215
- * + The Service is configured as manually confirmed.
2216
- * + Invoking the eCommerce checkout API and an order has been created.
2217
- * - `"WAITING_LIST"` - The booking is pending on a waiting list.
2218
- * Booking can be created with this status when invoking waiting list join API.
2219
- * - `"DECLINED"` - The booking was declined by the owner and synced to bookings calendar.
2220
- * Booking can be manually declined using decline API and requires manage booking permissions.
2221
- * Booking can be automatically declined when the following requirements are met:
2222
- * + Invoking eCommerce checkout API and the order declined event has been sent.
2223
- * + Invoking eCommerce checkout API and order approved event has been sent, but the booking is offline and the booking causes a double booking.
2526
+ * Multi-service booking ID.
2527
+ * @format GUID
2224
2528
  */
2225
- status?: BookingStatus;
2529
+ id?: string | null;
2530
+ /** The created bookings that are part of the multi-service booking. */
2531
+ bookings?: BookingResult[];
2532
+ }
2533
+ export interface BookingResult {
2226
2534
  /**
2227
- * Additional custom fields of the booking form. The customer must provide
2228
- * information for each field when booking the service. For example, that they
2229
- * bring their own towels or whether they use a wheelchair.
2230
- *
2231
- * Max: 100 fields
2535
+ * Booking ID.
2536
+ * @format GUID
2232
2537
  */
2233
- additionalFields?: CustomFormField[];
2538
+ bookingId?: string | null;
2539
+ /** Booking entity. */
2540
+ booking?: Booking;
2541
+ }
2542
+ export interface RescheduleMultiServiceBookingRequest {
2234
2543
  /**
2235
- * Total number of participants. Available only when the service doesn't have
2236
- * [variants](https://dev.wix.com/api/rest/wix-bookings/service-options-and-variants/introduction).
2237
- *
2238
- * Max: `20`
2544
+ * ID of the multi service booking to reschedule.
2545
+ * @format GUID
2239
2546
  */
2240
- numberOfParticipants?: number | null;
2547
+ multiServiceBookingId: string | null;
2548
+ /** Information about the single-service bookings to reschedule. */
2549
+ rescheduleBookingsInfo: RescheduleBookingInfo[];
2241
2550
  /**
2242
- * Internal business note. Not visible to the customer.
2243
- *
2244
- * Max: 200 characters
2551
+ * Information about whether to notify the customer and
2552
+ * the message to send.
2245
2553
  */
2246
- internalBusinessNote?: string | null;
2554
+ participantNotification?: ParticipantNotification;
2247
2555
  /**
2248
- * Payment option the customer intends to use.
2249
- * Must be one of the payment options defined for the service, unless
2250
- * you pass `flowControlSettings.skipSelectedPaymentOptionValidation` as `true`.
2556
+ * Information about whether specific procedures of the standard Wix Bookings
2557
+ * rescheduling flow are changed. For example, whether the availability of
2558
+ * the new slot is checked before rescheduling the booking or if you can
2559
+ * reschedule the booking even though the rescheduling policy doesn't allow it.
2251
2560
  */
2252
- selectedPaymentOption?: SelectedPaymentOption;
2561
+ flowControlSettings?: RescheduleBookingFlowControlSettings;
2562
+ /** Whether to return the rescheduled bookings entities. */
2563
+ returnFullEntity?: boolean;
2564
+ }
2565
+ export interface RescheduleBookingInfo extends RescheduleBookingInfoParticipantsInfoOneOf {
2253
2566
  /**
2254
- * Identifies the source (platform, actor and app) that created this booking.
2255
- * This property of the booking cannot be changed.
2256
- * The app_def_id and app_name will be resolved automatically.
2257
- * TODO GAP See if we need this - might be able to get this data from the headers?
2567
+ * Total number of participants. Available only for services with variants.
2568
+ * Specify when all participants book the same variant.
2258
2569
  */
2259
- bookingSource?: BookingSource;
2570
+ totalParticipants?: number;
2260
2571
  /**
2261
- * A user identifier of an external application user that initiated the book request.
2262
- * Allows an external application to later identify its own bookings and correlate to its own internal users
2572
+ * Information about the service choices to book. Available only for services with
2573
+ * variants.
2574
+ * Specify when not all participants book the same variant.
2263
2575
  */
2264
- externalUserId?: string | null;
2265
- /** Information about a message to send to the customer. */
2266
- participantNotification?: ParticipantNotification;
2576
+ participantsChoices?: ParticipantChoices;
2267
2577
  /**
2268
- * Whether to send an SMS reminder to the customer 24 hours before the
2269
- * session starts. The phone number is taken from `contactDetails.phone`.
2270
- *
2271
- * Default: `true`.
2578
+ * ID of the booking to reschedule.
2579
+ * @format GUID
2272
2580
  */
2273
- sendSmsReminder?: boolean | null;
2581
+ bookingId?: string | null;
2582
+ /** Information about the new slot. */
2583
+ slot?: V2Slot;
2274
2584
  /**
2275
- * Information about whether specific procedures of the standard Wix Bookings
2276
- * creation flow are changed. For example, whether the availability is
2277
- * checked before creating the booking or if additional payment options are
2278
- * accepted.
2585
+ * Revision number, which increments by 1 each time the booking is updated.
2586
+ * To prevent conflicting changes, the current revision must be specified when
2587
+ * managing the booking.
2279
2588
  */
2280
- flowControlSettings?: CreateBookingRequestFlowControlSettings;
2589
+ revision?: string | null;
2281
2590
  }
2282
2591
  /** @oneof */
2283
- export interface V2CreateBookingRequestBookableItemOneOf {
2592
+ export interface RescheduleBookingInfoParticipantsInfoOneOf {
2284
2593
  /**
2285
- * Information about the slot to create a booking for.
2286
- * If you set `slot.location.locationType` to `CUSTOM`, the created slot's
2287
- * location is set to `slot.location.formattedAddress` when provided.
2288
- * Otherwise it's set to `contactDetails.fullAddress.formattedAddress`.
2594
+ * Total number of participants. Available only for services with variants.
2595
+ * Specify when all participants book the same variant.
2289
2596
  */
2290
- slot?: Slot;
2291
- /** Information about the schedule to create a booking for. */
2292
- schedule?: BookedSchedule;
2293
- }
2294
- /** @oneof */
2295
- export interface V2CreateBookingRequestParticipantsInfoOneOf {
2296
- }
2297
- export interface Slot {
2597
+ totalParticipants?: number;
2298
2598
  /**
2299
- * ID for the slot's corresponding session, when the session is either a single session
2300
- * or a specific session generated from a recurring session.
2301
- *
2302
- * Deprecated. Please use `eventId` instead.
2303
- * @deprecated ID for the slot's corresponding session, when the session is either a single session
2304
- * or a specific session generated from a recurring session.
2305
- *
2306
- * Deprecated. Please use `eventId` instead.
2307
- * @replacedBy event_id
2308
- * @targetRemovalDate 2025-09-30
2599
+ * Information about the service choices to book. Available only for services with
2600
+ * variants.
2601
+ * Specify when not all participants book the same variant.
2309
2602
  */
2310
- sessionId?: string | null;
2311
- /** Service ID. */
2312
- serviceId?: string;
2313
- /** Schedule ID. */
2314
- scheduleId?: string;
2603
+ participantsChoices?: ParticipantChoices;
2604
+ }
2605
+ export interface RescheduleMultiServiceBookingResponse {
2606
+ /** Rescheduled multi-service booking. */
2607
+ multiServiceBooking?: MultiServiceBooking;
2608
+ }
2609
+ export interface GetMultiServiceBookingAvailabilityRequest {
2315
2610
  /**
2316
- * The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
2317
- * format.
2318
- *
2319
- * If `timezone` is specified,
2320
- * dates are based on the local date/time. This means that the timezone offset
2321
- * in the `start_date` is ignored.
2611
+ * ID of the multi-service booking to retrieve.
2612
+ * @format GUID
2322
2613
  */
2323
- startDate?: string | null;
2614
+ multiServiceBookingId: string | null;
2615
+ }
2616
+ export interface GetMultiServiceBookingAvailabilityResponse {
2617
+ /** Whether all contained single-service bookings are bookable. */
2618
+ bookable?: boolean;
2619
+ /** Total number of spots. */
2620
+ totalCapacity?: number | null;
2621
+ /** Number of open spots. */
2622
+ remainingCapacity?: number | null;
2623
+ /** Indicators for policy violations of the multi service booking. */
2624
+ policyViolations?: BookingPolicyViolations;
2625
+ /** Multi-service booking policy settings. */
2626
+ policySettings?: BookingPolicySettings;
2627
+ /** Info of the bookings this availability was calculated for. */
2628
+ multiServiceBookingInfo?: GetMultiServiceBookingAvailabilityResponseBookingInfo[];
2629
+ }
2630
+ export interface GetMultiServiceBookingAvailabilityResponseBookingInfo {
2324
2631
  /**
2325
- * The end time of this slot in
2326
- * [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format.
2327
- *
2328
- * If `timezone` is specified,
2329
- * dates are based on the local date/time. This means that the timezone offset
2330
- * in the `end_date` is ignored.
2632
+ * Booking ID.
2633
+ * @format GUID
2331
2634
  */
2332
- endDate?: string | null;
2635
+ bookingId?: string | null;
2636
+ }
2637
+ export interface CancelMultiServiceBookingRequest {
2333
2638
  /**
2334
- * The timezone for which slot availability is to be calculated.
2335
- *
2336
- * Learn more about [handling Daylight Savings Time (DST) for local time zones](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/query-availability#wix-bookings_availability-calendar_query-availability_handling-daylight-savings-time-dst-for-local-time-zones)
2337
- * when calculating availability.
2639
+ * ID of the multi-service booking to cancel.
2640
+ * @format GUID
2338
2641
  */
2339
- timezone?: string | null;
2642
+ multiServiceBookingId: string | null;
2340
2643
  /**
2341
- * The resource required for this slot. Currently, the only supported resource
2342
- * is the relevant staff member for the slot.
2644
+ * Information about whether to notify the customer and
2645
+ * the message to send.
2343
2646
  */
2344
- resource?: SlotResource;
2345
- /** Geographic location of the slot. */
2346
- location?: Location;
2647
+ participantNotification?: ParticipantNotification;
2347
2648
  /**
2348
- * ID for the slot's corresponding event, when the event is either a single event
2349
- * or a specific event generated from a recurring event.
2649
+ * Information about whether specific procedures of the standard Wix Bookings
2650
+ * cancellation flow are changed. For example, whether you can cancel
2651
+ * a booking even though the cancellation policy doesn't allow it or whether
2652
+ * to issue a refund.
2350
2653
  */
2351
- eventId?: string | null;
2654
+ flowControlSettings?: CancelBookingFlowControlSettings;
2655
+ /** Whether to return the canceled single-service bookings. */
2656
+ returnFullEntity?: boolean;
2352
2657
  }
2353
- export interface SlotResource {
2658
+ export interface CancelMultiServiceBookingResponse {
2659
+ /** Canceled multi-service booking. */
2660
+ multiServiceBooking?: MultiServiceBooking;
2661
+ }
2662
+ export interface MarkMultiServiceBookingAsPendingRequest {
2354
2663
  /**
2355
- * Resource ID.
2356
- * @readonly
2664
+ * ID of the multi-service booking to mark as `PENDING`.
2665
+ * @format GUID
2357
2666
  */
2358
- id?: string | null;
2359
- /** Resource name. Read only. */
2360
- name?: string | null;
2361
- }
2362
- export interface CreateBookingRequestFlowControlSettings {
2667
+ multiServiceBookingId: string | null;
2668
+ /** Information about the single-service bookings to mark as `PENDING`. */
2669
+ markAsPendingBookingsInfo?: BookingInfo[];
2363
2670
  /**
2364
- * Whether the availability is checked before creating the booking. When
2365
- * passing `false` a booking is only created when the slot or schedule is
2366
- * available. Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY`
2367
- * permission scope when passing `true`.
2368
- *
2369
- * Default: `false`.
2671
+ * Information about whether to notify the customer and
2672
+ * the message to send.
2370
2673
  */
2371
- skipAvailabilityValidation?: boolean;
2674
+ participantNotification?: ParticipantNotification;
2372
2675
  /**
2373
- * Whether `PENDING` bookings are automatically set to `CONFIRMED` for
2374
- * services that normally require the owner's manual confirmation. Your
2375
- * app must have the `BOOKINGS.OVERRIDE_AVAILABILITY` permission scope
2376
- * when passing `true`.
2676
+ * Whether to send an SMS reminder to the customer 24 hours before the
2677
+ * session starts. The phone number is taken from `contactDetails.phone`.
2377
2678
  *
2378
- * Default: `false`.
2679
+ * Default: `true`
2379
2680
  */
2380
- skipBusinessConfirmation?: boolean;
2681
+ sendSmsReminder?: boolean | null;
2682
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
2683
+ doubleBooked?: boolean | null;
2684
+ /** Whether to return the single-service bookings that were marked as `PENDING`. */
2685
+ returnFullEntity?: boolean;
2381
2686
  /**
2382
- * Whether customers can pay using a payment method that isn't supported
2383
- * for the service, but that's supported for other services. Your app
2384
- * must have the `BOOKINGS.MANAGE_PAYMENTS` permission scope when passing
2385
- * `true`.
2386
- *
2387
- * Default: `false`.
2687
+ * Information about whether specific procedures of the standard Wix Bookings
2688
+ * creation flow are changed. For example, whether the availability is checked
2689
+ * before updating the booking.
2388
2690
  */
2389
- skipSelectedPaymentOptionValidation?: boolean;
2390
- }
2391
- export interface V2CreateBookingResponse {
2392
- /** Created booking. */
2393
- booking?: Booking;
2691
+ flowControlSettings?: MarkBookingAsPendingFlowControlSettings;
2394
2692
  }
2395
- export interface V2CancelBookingRequest {
2396
- /** ID of the booking to cancel. */
2397
- bookingId?: string;
2693
+ export interface BookingInfo {
2398
2694
  /**
2399
- * Information about whether to notify the customer about the cancellation and
2400
- * the message to send.
2695
+ * ID of the single-service booking.
2696
+ * @format GUID
2401
2697
  */
2402
- participantNotification?: ParticipantNotification;
2698
+ bookingId?: string | null;
2403
2699
  /**
2404
2700
  * Revision number, which increments by 1 each time the booking is updated.
2405
- * To prevent conflicting changes,
2406
- * the current revision must be passed when managing the booking.
2701
+ * To prevent conflicting changes, the current revision must be specified when
2702
+ * managing the booking.
2407
2703
  */
2408
2704
  revision?: string | null;
2705
+ /** Payment status to set for the single-service booking. */
2706
+ paymentStatus?: PaymentStatus;
2409
2707
  }
2410
- export interface CancelBookingRequestFlowControlSettings {
2708
+ export interface MarkMultiServiceBookingAsPendingResponse {
2709
+ /** Updated multi-service booking. */
2710
+ multiServiceBooking?: MultiServiceBooking;
2711
+ }
2712
+ export interface ConfirmMultiServiceBookingRequest {
2411
2713
  /**
2412
- * Whether the cancellation policy applies when canceling the booking. When
2413
- * passing `false` you can only cancel a booking if the cancellation policy
2414
- * allows it. Your app must have the `BOOKINGS.IGNORE_BOOKING_POLICY `
2415
- * permission scope when passing `true`.
2416
- *
2417
- * Default: `false`.
2714
+ * ID of the multi-service booking to confirm its related bookings.
2715
+ * @format GUID
2418
2716
  */
2419
- ignoreCancellationPolicy?: boolean;
2717
+ multiServiceBookingId: string | null;
2718
+ /** Information about the single-service bookings to confirm. */
2719
+ confirmBookingsInfo?: BookingInfo[];
2420
2720
  /**
2421
- * Whether to issue a refund when canceling the booking.
2422
- * The refund will be issued only if the booking is refundable.
2423
- * Currently, booking is considered refundable when it was paid by membership.
2424
- * If passing `true`, the booking flow control settings will be set with refund,
2425
- * otherwise, either if `false` is passed or the field remains empty,
2426
- * the booking flow control settings will be set with no refund.
2721
+ * Information about whether to notify the customer and
2722
+ * the message to send.
2723
+ */
2724
+ participantNotification?: ParticipantNotification;
2725
+ /**
2726
+ * Whether to send an SMS reminder to the customer 24 hours before the
2727
+ * session starts. The phone number is taken from `contactDetails.phone`.
2427
2728
  *
2428
- * Default: `false`.
2729
+ * Default: `true`
2730
+ */
2731
+ sendSmsReminder?: boolean | null;
2732
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
2733
+ doubleBooked?: boolean | null;
2734
+ /** Whether to return the confirmed single-service bookings. */
2735
+ returnFullEntity?: boolean;
2736
+ /**
2737
+ * Information about whether specific procedures of the standard Wix Bookings
2738
+ * confirmation flow are changed. For example, whether the availability is
2739
+ * checked before confirming the booking.
2429
2740
  */
2430
- withRefund?: boolean | null;
2741
+ flowControlSettings?: ConfirmBookingFlowControlSettings;
2431
2742
  }
2432
- export interface V2CancelBookingResponse {
2433
- /** Canceled booking. */
2434
- booking?: Booking;
2743
+ export interface ConfirmMultiServiceBookingResponse {
2744
+ /** Confirmed multi service booking. */
2745
+ multiServiceBooking?: MultiServiceBooking;
2435
2746
  }
2436
- export interface V2RescheduleBookingRequest extends V2RescheduleBookingRequestParticipantsInfoOneOf {
2437
- /** Id of the booking to reschedule. */
2438
- bookingId?: string;
2439
- /** Information about the new slot. */
2440
- slot?: Slot;
2747
+ export interface DeclineMultiServiceBookingRequest {
2441
2748
  /**
2442
- * Revision number, which increments by 1 each time the booking is updated.
2443
- * To prevent conflicting changes, the current revision must be passed when
2444
- * managing the booking.
2749
+ * ID of the multi service booking to decline.
2750
+ * @format GUID
2445
2751
  */
2446
- revision?: string | null;
2752
+ multiServiceBookingId: string | null;
2753
+ /** Information about the single-service bookings to decline. */
2754
+ declineBookingsInfo?: BookingInfo[];
2447
2755
  /**
2448
- * Information about whether to notify the customer about the rescheduling and
2756
+ * Information about whether to notify the customer and
2449
2757
  * the message to send.
2450
2758
  */
2451
2759
  participantNotification?: ParticipantNotification;
2760
+ /** Whether this booking has a conflict with at least 1 other confirmed booking. */
2761
+ doubleBooked?: boolean | null;
2762
+ /** Whether to return the declined single-service bookings. */
2763
+ returnFullEntity?: boolean;
2764
+ /**
2765
+ * Information about whether specific procedures of the standard Wix Bookings
2766
+ * declining flow are changed. For example, whether to issue a refund.
2767
+ */
2768
+ flowControlSettings?: DeclineBookingFlowControlSettings;
2452
2769
  }
2453
- /** @oneof */
2454
- export interface V2RescheduleBookingRequestParticipantsInfoOneOf {
2770
+ export interface DeclineMultiServiceBookingResponse {
2771
+ /** Declined multi-service booking. */
2772
+ multiServiceBooking?: MultiServiceBooking;
2455
2773
  }
2456
- export interface RescheduleBookingRequestFlowControlSettings {
2774
+ export interface BulkGetMultiServiceBookingAllowedActionsRequest {
2457
2775
  /**
2458
- * Whether the rescheduling policy applies when rescheduling the booking.
2459
- * When passing `false` you can only cancel a booking if the rescheduling
2460
- * policy allows it. Your app must have the `BOOKINGS.IGNORE_BOOKING_POLICY `
2461
- * permission scope when passing `true`.
2462
- *
2463
- * Default: `false`.
2776
+ * IDs of the multi-service bookings to retrieve allowed actions for.
2777
+ * @format GUID
2778
+ * @minSize 1
2779
+ * @maxSize 50
2464
2780
  */
2465
- ignoreReschedulePolicy?: boolean;
2781
+ multiServiceBookingIds: string[] | null;
2782
+ }
2783
+ export interface BulkGetMultiServiceBookingAllowedActionsResponse {
2466
2784
  /**
2467
- * Whether the availability is checked before rescheduling the booking.
2468
- * When passing `false` a booking is only created when the slot or
2469
- * schedule is available. Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY`
2470
- * permission scope when passing `true`.
2471
- *
2472
- * Default: `false`.
2785
+ * Information about the multi-service bookings that were retrieved.
2786
+ * Including their ID, index in the bulk request and whether they were
2787
+ * successfully updated.
2473
2788
  */
2474
- skipAvailabilityValidation?: boolean;
2789
+ results?: BulkCalculateAllowedActionsResult[];
2790
+ /** Total number of successes and failures for Bulk Update Bookings. */
2791
+ bulkActionMetadata?: BulkActionMetadata;
2792
+ }
2793
+ export interface GetMultiServiceBookingRequest {
2475
2794
  /**
2476
- * Whether the rescheduled booking's status is automatically set to
2477
- * `CONFIRMED` for services that normally require the owner's manual
2478
- * confirmation. Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY`
2479
- * permission scope when passing `true`.
2480
- *
2481
- * Default: `false`.
2795
+ * ID of the multi-service booking.
2796
+ * @format GUID
2482
2797
  */
2483
- skipBusinessConfirmation?: boolean;
2798
+ multiServiceBookingId: string | null;
2484
2799
  }
2485
- export interface V2RescheduleBookingResponse {
2486
- /** Rescheduled booking. */
2487
- booking?: Booking;
2800
+ export interface GetMultiServiceBookingResponse {
2801
+ /** Retrieved multi-service booking. */
2802
+ multiServiceBooking?: MultiServiceBooking;
2803
+ /** Details about how many single-service bookings belong to the multi-service booking. */
2804
+ metadata?: MultiServiceBookingMetadata;
2488
2805
  }
2489
- export interface V2ConfirmBookingRequest {
2490
- /** ID of the booking to confirm. */
2491
- bookingId?: string;
2492
- /**
2493
- * Revision number, which increments by 1 each time the booking is updated.
2494
- * To prevent conflicting changes, the current revision must be passed when
2495
- * managing the booking.
2496
- */
2497
- revision?: string | null;
2806
+ export interface MultiServiceBookingMetadata {
2498
2807
  /**
2499
- * Information about whether to notify the customer about the confirmation and
2500
- * the message to send.
2808
+ * Total number of `CONFIRMED` and `PENDING` single-service bookings belonging
2809
+ * to the multi-service booking. The total includes the number of single-service
2810
+ * bookings which couldn't be retrieved due to lack of permissions.
2501
2811
  */
2502
- participantNotification?: ParticipantNotification;
2503
- }
2504
- export interface V2ConfirmBookingResponse {
2505
- booking?: Booking;
2812
+ totalNumberOfScheduledBookings?: number | null;
2506
2813
  }
2507
- export interface V2DeclineBookingRequest {
2508
- /** ID of the booking to decline. */
2509
- bookingId?: string;
2814
+ export interface AddBookingsToMultiServiceBookingRequest {
2510
2815
  /**
2511
- * Revision number, which increments by 1 each time the booking is updated.
2512
- * To prevent conflicting changes, the current revision must be passed when
2513
- * managing the booking.
2816
+ * ID of the multi-service booking.
2817
+ * @format GUID
2514
2818
  */
2515
- revision?: string | null;
2819
+ multiServiceBookingId: string | null;
2516
2820
  /**
2517
- * Information about whether to notify the customer about the decline and
2518
- * the message to send.
2821
+ * List of single-service booking IDs and their revision.
2822
+ * @maxSize 8
2519
2823
  */
2520
- participantNotification?: ParticipantNotification;
2521
- }
2522
- export interface V2DeclineBookingResponse {
2523
- /** Declined booking. */
2524
- booking?: Booking;
2824
+ bookings: BookingIdAndRevision[];
2825
+ /** Whether to return the single-service bookings that were added to the multi-service booking. */
2826
+ returnFullEntity?: boolean;
2525
2827
  }
2526
- export interface V2UpdateNumberOfParticipantsRequest extends V2UpdateNumberOfParticipantsRequestParticipantsInfoOneOf {
2527
- /** ID of the booking to update the number of participants for. */
2528
- bookingId?: string;
2529
- /** Updated number of participants. */
2530
- numberOfParticipants?: number | null;
2828
+ export interface BookingIdAndRevision {
2829
+ /**
2830
+ * ID of the booking.
2831
+ * @format GUID
2832
+ */
2833
+ bookingId?: string | null;
2531
2834
  /**
2532
2835
  * Revision number, which increments by 1 each time the booking is updated.
2533
- * To prevent conflicting changes, the current revision must be passed when
2836
+ * To prevent conflicting changes, the current revision must be specified when
2534
2837
  * managing the booking.
2535
2838
  */
2536
2839
  revision?: string | null;
2537
2840
  }
2538
- /** @oneof */
2539
- export interface V2UpdateNumberOfParticipantsRequestParticipantsInfoOneOf {
2841
+ export interface AddBookingsToMultiServiceBookingResponse {
2842
+ /** Single-service bookings that were added to the multi-service booking. */
2843
+ bookings?: BookingResult[];
2540
2844
  }
2541
- export interface V2UpdateNumberOfParticipantsResponse {
2542
- /** Booking with updated number of participants. */
2543
- booking?: Booking;
2845
+ export interface RemoveBookingsFromMultiServiceBookingRequest {
2846
+ /**
2847
+ * ID of the multi-service booking.
2848
+ * @format GUID
2849
+ */
2850
+ multiServiceBookingId: string | null;
2851
+ /**
2852
+ * List of single-service booking IDs and their revision.
2853
+ * @maxSize 8
2854
+ */
2855
+ bookings?: BookingIdAndRevision[];
2856
+ /** Whether to return the single-service bookings. */
2857
+ returnFullEntity?: boolean;
2858
+ }
2859
+ export interface RemoveBookingsFromMultiServiceBookingResponse {
2860
+ /** Single-service bookings that were removed from the multi-service booking. */
2861
+ bookings?: BookingResult[];
2544
2862
  }
2545
2863
  interface DurationNonNullableFields {
2546
2864
  minutes: number;
@@ -2635,33 +2953,9 @@ interface BookingNonNullableFields {
2635
2953
  flowControlSettings?: FlowControlSettingsNonNullableFields;
2636
2954
  multiServiceBookingInfo?: MultiServiceBookingInfoNonNullableFields;
2637
2955
  }
2638
- interface BookingResultNonNullableFields {
2956
+ export interface ConfirmOrDeclineBookingResponseNonNullableFields {
2639
2957
  booking?: BookingNonNullableFields;
2640
2958
  }
2641
- interface MultiServiceBookingNonNullableFields {
2642
- bookings: BookingResultNonNullableFields[];
2643
- }
2644
- export interface CreateMultiServiceBookingResponseNonNullableFields {
2645
- multiServiceBooking?: MultiServiceBookingNonNullableFields;
2646
- }
2647
- export interface RescheduleMultiServiceBookingResponseNonNullableFields {
2648
- multiServiceBooking?: MultiServiceBookingNonNullableFields;
2649
- }
2650
- export interface GetMultiServiceBookingAvailabilityResponseNonNullableFields {
2651
- bookable: boolean;
2652
- }
2653
- export interface CancelMultiServiceBookingResponseNonNullableFields {
2654
- multiServiceBooking?: MultiServiceBookingNonNullableFields;
2655
- }
2656
- export interface MarkMultiServiceBookingAsPendingResponseNonNullableFields {
2657
- multiServiceBooking?: MultiServiceBookingNonNullableFields;
2658
- }
2659
- export interface ConfirmMultiServiceBookingResponseNonNullableFields {
2660
- multiServiceBooking?: MultiServiceBookingNonNullableFields;
2661
- }
2662
- export interface DeclineMultiServiceBookingResponseNonNullableFields {
2663
- multiServiceBooking?: MultiServiceBookingNonNullableFields;
2664
- }
2665
2959
  interface ApplicationErrorNonNullableFields {
2666
2960
  code: string;
2667
2961
  description: string;
@@ -2671,40 +2965,22 @@ interface ItemMetadataNonNullableFields {
2671
2965
  success: boolean;
2672
2966
  error?: ApplicationErrorNonNullableFields;
2673
2967
  }
2674
- interface AllowedActionsNonNullableFields {
2675
- cancel: boolean;
2676
- reschedule: boolean;
2677
- bookAnother: boolean;
2678
- }
2679
- interface BulkCalculateAllowedActionsResultNonNullableFields {
2968
+ interface BulkBookingResultNonNullableFields {
2680
2969
  itemMetadata?: ItemMetadataNonNullableFields;
2681
- item?: AllowedActionsNonNullableFields;
2970
+ item?: BookingNonNullableFields;
2682
2971
  }
2683
2972
  interface BulkActionMetadataNonNullableFields {
2684
2973
  totalSuccesses: number;
2685
2974
  totalFailures: number;
2686
2975
  undetailedFailures: number;
2687
2976
  }
2688
- export interface BulkGetMultiServiceBookingAllowedActionsResponseNonNullableFields {
2689
- results: BulkCalculateAllowedActionsResultNonNullableFields[];
2977
+ export interface BulkConfirmOrDeclineBookingResponseNonNullableFields {
2978
+ results: BulkBookingResultNonNullableFields[];
2690
2979
  bulkActionMetadata?: BulkActionMetadataNonNullableFields;
2691
2980
  }
2692
- export interface GetMultiServiceBookingResponseNonNullableFields {
2693
- multiServiceBooking?: MultiServiceBookingNonNullableFields;
2694
- }
2695
- export interface AddBookingsToMultiServiceBookingResponseNonNullableFields {
2696
- bookings: BookingResultNonNullableFields[];
2697
- }
2698
- export interface RemoveBookingsFromMultiServiceBookingResponseNonNullableFields {
2699
- bookings: BookingResultNonNullableFields[];
2700
- }
2701
2981
  export interface CreateBookingResponseNonNullableFields {
2702
2982
  booking?: BookingNonNullableFields;
2703
2983
  }
2704
- interface BulkBookingResultNonNullableFields {
2705
- itemMetadata?: ItemMetadataNonNullableFields;
2706
- item?: BookingNonNullableFields;
2707
- }
2708
2984
  export interface BulkCreateBookingResponseNonNullableFields {
2709
2985
  results: BulkBookingResultNonNullableFields[];
2710
2986
  bulkActionMetadata?: BulkActionMetadataNonNullableFields;
@@ -2727,11 +3003,53 @@ export interface CancelBookingResponseNonNullableFields {
2727
3003
  export interface UpdateNumberOfParticipantsResponseNonNullableFields {
2728
3004
  booking?: BookingNonNullableFields;
2729
3005
  }
2730
- export interface ConfirmOrDeclineBookingResponseNonNullableFields {
3006
+ interface BookingResultNonNullableFields {
2731
3007
  booking?: BookingNonNullableFields;
2732
3008
  }
2733
- export interface BulkConfirmOrDeclineBookingResponseNonNullableFields {
2734
- results: BulkBookingResultNonNullableFields[];
3009
+ interface MultiServiceBookingNonNullableFields {
3010
+ bookings: BookingResultNonNullableFields[];
3011
+ }
3012
+ export interface CreateMultiServiceBookingResponseNonNullableFields {
3013
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
3014
+ }
3015
+ export interface RescheduleMultiServiceBookingResponseNonNullableFields {
3016
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
3017
+ }
3018
+ export interface GetMultiServiceBookingAvailabilityResponseNonNullableFields {
3019
+ bookable: boolean;
3020
+ }
3021
+ export interface CancelMultiServiceBookingResponseNonNullableFields {
3022
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
3023
+ }
3024
+ export interface MarkMultiServiceBookingAsPendingResponseNonNullableFields {
3025
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
3026
+ }
3027
+ export interface ConfirmMultiServiceBookingResponseNonNullableFields {
3028
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
3029
+ }
3030
+ export interface DeclineMultiServiceBookingResponseNonNullableFields {
3031
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
3032
+ }
3033
+ interface AllowedActionsNonNullableFields {
3034
+ cancel: boolean;
3035
+ reschedule: boolean;
3036
+ bookAnother: boolean;
3037
+ }
3038
+ interface BulkCalculateAllowedActionsResultNonNullableFields {
3039
+ itemMetadata?: ItemMetadataNonNullableFields;
3040
+ item?: AllowedActionsNonNullableFields;
3041
+ }
3042
+ export interface BulkGetMultiServiceBookingAllowedActionsResponseNonNullableFields {
3043
+ results: BulkCalculateAllowedActionsResultNonNullableFields[];
2735
3044
  bulkActionMetadata?: BulkActionMetadataNonNullableFields;
2736
3045
  }
3046
+ export interface GetMultiServiceBookingResponseNonNullableFields {
3047
+ multiServiceBooking?: MultiServiceBookingNonNullableFields;
3048
+ }
3049
+ export interface AddBookingsToMultiServiceBookingResponseNonNullableFields {
3050
+ bookings: BookingResultNonNullableFields[];
3051
+ }
3052
+ export interface RemoveBookingsFromMultiServiceBookingResponseNonNullableFields {
3053
+ bookings: BookingResultNonNullableFields[];
3054
+ }
2737
3055
  export {};