Clones a service.
By default, not all entities connected to the service are cloned.
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.
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.
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.
The original service's booking form isn't cloned, whether it's the default or a custom booking form.
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.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the service to clone.
Cloned service.
Information about connected entities that couldn't be cloned. For example, future recurring events, the booking form, service variants, and connected pricing plans.
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
}'
{
"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"
}
}
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.