Clones a serviceOptionsAndVariants
object and connects it to a service
(SDK | REST).
The call fails if the service already has a connected
serviceOptionsAndVariants
object.
The cloned serviceOptionsAndVariants
object gets a new, unique option ID.
The option ID of the existing serviceOptionsAndVariants
object isn't reused.
For example, you may call this method after cloning a service (SDK | REST).
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the serviceOptionsAndVariants
object to clone.
ID of the service to which the cloned serviceOptionsAndVariants
are
connected.
Cloned serviceOptionsAndVariants
object.
curl -X POST \
'https://wixapis.com/bookings/v1/serviceOptionsAndVariants/0cf0c708-58f0-408b-a10f-a6d9b6e2a6de/clone' \
-H 'Authorization: <AUTH>' \
-d '{
"targetServiceId": "cea2bc29-9f05-4523-a4d7-cd52983b43dc"
}'
{
"serviceOptionsAndVariants": {
"id": "6f6a0b65-dd9f-497f-8e29-88518b6aed26",
"serviceId": "cea2bc29-9f05-4523-a4d7-cd52983b43dc",
"options": {
"values": [
{
"id": "e60a6e55-bd30-4610-8d7e-dfa8ecd2293a",
"type": "STAFF_MEMBER"
}
]
},
"variants": {
"values": [
{
"choices": [
{
"optionId": "e60a6e55-bd30-4610-8d7e-dfa8ecd2293a",
"staffMemberId": "5a79026c-36f9-4839-ad4a-9a3132af5895"
}
],
"price": {
"value": "55",
"currency": "EUR"
}
},
{
"choices": [
{
"optionId": "e60a6e55-bd30-4610-8d7e-dfa8ecd2293a",
"staffMemberId": "963c5a66-e4be-490c-9e79-556c9a4d8807"
}
],
"price": {
"value": "105",
"currency": "EUR"
}
},
{
"choices": [
{
"optionId": "e60a6e55-bd30-4610-8d7e-dfa8ecd2293a",
"staffMemberId": "59581285-876b-4581-8f4c-cf90452d94e9"
}
],
"price": {
"value": "50",
"currency": "EUR"
}
},
{
"choices": [
{
"optionId": "e60a6e55-bd30-4610-8d7e-dfa8ecd2293a",
"staffMemberId": "9a3d4d6c-0ff9-4671-9fad-0aa2cbcd8b0f"
}
],
"price": {
"value": "60",
"currency": "EUR"
}
}
]
},
"minPrice": {
"value": "50",
"currency": "EUR"
},
"maxPrice": {
"value": "105",
"currency": "EUR"
},
"revision": "1"
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.