POST

Clone Service


Clones a service.

Connected entities

By default, not all entities connected to the service are cloned.

Schedule

Wix Bookings automatically creates a new active schedule (SDK | REST) for the cloned service. If Wix Bookings can't create this schedule, the Clone Service* call fails.

  • For appointment-based services: Future appointments aren't added to the cloned service's schedule. Use the Events API (SDK | REST) to add them as needed.
  • For classes and courses: Future one-time events aren't added to the cloned service's schedule, while future recurring events are added asynchronously. The Clone Service call always succeeds, whether or not recurring events are added. If the response includes RECURRING_EVENTS in the errors array, it means the cloned service doesn't have future recurring events, even though the original service does. You can either delete the cloned service and try again or use the Events API (SDK | REST) to add missing events to the schedule.

Wix Bookings never adds past events to the cloned service's schedule.

Service options and variants

If the original service has variants (SDK | REST), they're cloned asynchronously. The Clone Service call always succeeds, regardless of whether variants were cloned.

If the response includes OPTIONS_AND_VARIANTS in the errors array, the cloned service doesn't have variants, even though the original service does. You can delete the cloned service and call Clone Service again, or use the Service Options And Variants API* (SDK | REST) to add variants.

Booking form

The original service's booking form isn't cloned, whether it's the default or a custom booking form.

Pricing plans

If the original service's accepts payments via pricing plans (SDK | REST), the cloned service's payment.options.pricingPlan is also set to true. To accept specific pricing plans, call Enable Pricing Plans For Service (SDK | REST), after cloning the service. If the original service accepts only pricing plan payments and you don't call Enable Pricing Plans For Service after cloning the service, customers will be unable to book the service.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Bookings - all permissions
Manage Bookings
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/_api/bookings/v2/services/clone

Body Params
sourceServiceIdstringRequiredformat GUID

ID of the service to clone.

Response Object
serviceService

Cloned service.


errorsArray <string>

Information about connected entities that couldn't be cloned. For example, future recurring events, the booking form, service variants, and connected pricing plans.

Clone a service
Request
cURL
curl -X POST 'https://www.wixapis.com/bookings/v2/services/clone' \ -H 'Authorization: <AUTH>' \ -d '{ "sourceServiceId": "353aa3b7-00ef-42bd-86ff-720d7ef60443", "cloneServiceName": "Cloned service", "hideService": true, "copyPricingPlans": false, "copyRecurringSessions": false }'
Response
JSON
{ "pricingPlanIds": ["0044b1ad-2ab2-4a0e-a584-07e526b62cdb"], "service": { "id": "353aa3b7-00ef-42bd-86ff-720d7ef60443", "type": "CLASS", "sortOrder": 0, "name": "Cloned service", "description": "Get ready to downward dog with your furry best friend! In this unique class, you and your pup will strike a pose and find your zen. With a mix of stretching, breathing exercises, and playtime, this class is sure to be a tail-waggin' good time. Whether you're a seasoned yogi or a pup-tastic beginner, this class is pawsitively perfect for all levels. Don't forget to bring your sense of humor, as there's sure to be a few doggy distractions and playful paw-terruptions along the way. Namaste!", "tagLine": "Unleash your zen with downward dog and a wagging tail in our pup-poseful yoga class!", "defaultCapacity": 50, "media": { "items": [], "mainMedia": { "image": { "id": "nsplsh_4d7639686a6e4555485234~mv2_d_3024_4032_s_4_2.jpg", "url": "nsplsh_4d7639686a6e4555485234~mv2_d_3024_4032_s_4_2.jpg", "height": 4032, "width": 3024, "filename": "nsplsh_4d7639686a6e4555485234~mv2_d_3024_4032_s_4_2.jpg" } } }, "hidden": true, "category": { "id": "7b5b9862-490f-491c-8477-d39baed078a1", "name": "Best for fun dogs", "sortOrder": 1 }, "form": { "id": "00000000-0000-0000-0000-000000000000" }, "payment": { "rateType": "FIXED", "fixed": { "price": { "value": "15", "currency": "USD" } }, "pricingPlansIds": [], "options": { "online": true, "inPerson": false, "deposit": false, "pricingPlan": false } }, "onlineBooking": { "enabled": true, "requireManualApproval": false, "allowMultipleRequests": false }, "staffMemberIds": [], "conferencing": { "enabled": true }, "locations": [ { "type": "BUSINESS" } ], "bookingPolicy": { "id": "2a8cbc1b-7968-44e7-899a-d1df1ecbeefe", "revision": "3", "createdDate": "2023-04-11T08:51:43.025Z", "updatedDate": "2023-05-19T11:32:27.930Z", "name": "Default policy", "customPolicyDescription": { "enabled": false, "description": "" }, "default": true, "limitEarlyBookingPolicy": { "enabled": false, "earliestBookingInMinutes": 604800 }, "limitLateBookingPolicy": { "enabled": false, "latestBookingInMinutes": 1440 }, "bookAfterStartPolicy": { "enabled": false }, "cancellationPolicy": { "enabled": true, "limitLatestCancellation": false, "latestCancellationInMinutes": 1440 }, "reschedulePolicy": { "enabled": true, "limitLatestReschedule": false, "latestRescheduleInMinutes": 1440 }, "waitlistPolicy": { "enabled": false, "capacity": 10, "reservationTimeInMinutes": 10 }, "participantsPolicy": { "enabled": false, "maxParticipantsPerBooking": 1 }, "resourcesPolicy": { "enabled": false, "autoAssignAllowed": false } }, "schedule": { "id": "8acb939f-34d1-4ac9-8564-b24c29e11ef7", "firstSessionStart": "2023-02-13T15:30:00Z" }, "supportedSlugs": [ { "name": "dog-yoga", "custom": false, "createdDate": "2023-02-09T16:40:45.267Z" } ], "mainSlug": { "name": "dog-yoga", "custom": false, "createdDate": "2023-02-09T16:40:45.267Z" }, "urls": { "servicePage": { "relativePath": "/service-page/dog-yoga", "url": "https://example.com/services-v2" }, "bookingPage": { "relativePath": "/book-online/dog-yoga/book", "url": "https://example.com/services-v2" }, "calendarPage": { "relativePath": "/booking-calendar/dog-yoga", "url": "https://example.com/services-v2" } } } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?