Updates a serviceOptionsAndVariants
object.
Currently, only a single option is supported per serviceOptionsAndVariants
object.
If you want to update variants
, you must pass the entire list of supported
variants, not only newly added variants.
If you want to update options
, you must pass the entire list of supported
options, not only newly added options.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the serviceOptionsAndVariants
object.
ServiceOptionsAndVariants
object to update.
Updated serviceOptionsAndVariants
object.
curl -X PATCH \
'https://wixapis.com/bookings/v1/serviceOptionsAndVariants/7e7eac53-21c9-41fd-844b-25b287aa38ce' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: <AUTH>' \
-d '{
"serviceOptionsAndVariants": {
"serviceId": "6072fbad-5c95-4bf6-a9bc-4280aadc1ae8",
"options": {
"values": [
{
"customData": {
"choices": [
"Student",
"Adult",
"Child"
],
"name": "Customer Type"
},
"id": "0b78af72-0ba0-4e71-ba39-b4386555a353",
"type": "CUSTOM"
}
]
},
"variants": {
"values": [
{
"choices": [
{
"optionId": "0b78af72-0ba0-4e71-ba39-b4386555a353",
"custom": "Student"
}
],
"price": {
"value": "8",
"currency": "EUR"
}
},
{
"choices": [
{
"optionId": "0b78af72-0ba0-4e71-ba39-b4386555a353",
"custom": "Adult"
}
],
"price": {
"value": "12",
"currency": "EUR"
}
},
{
"choices": [
{
"optionId": "0b78af72-0ba0-4e71-ba39-b4386555a353",
"custom": "Child"
}
],
"price": {
"currency": "EUR",
"value": "5"
}
}
]
},
"revision": "1",
"id": "7e7eac53-21c9-41fd-844b-25b287aa38ce"
}
}'
{
"serviceOptionsAndVariants": {
"id": "7e7eac53-21c9-41fd-844b-25b287aa38ce",
"serviceId": "6072fbad-5c95-4bf6-a9bc-4280aadc1ae8",
"options": {
"values": [
{
"id": "0b78af72-0ba0-4e71-ba39-b4386555a353",
"type": "CUSTOM",
"customData": {
"name": "Customer Type",
"choices": ["Student", "Adult", "Child"]
}
}
]
},
"variants": {
"values": [
{
"choices": [
{
"optionId": "0b78af72-0ba0-4e71-ba39-b4386555a353",
"custom": "Student"
}
],
"price": {
"value": "8",
"currency": "EUR"
}
},
{
"choices": [
{
"optionId": "0b78af72-0ba0-4e71-ba39-b4386555a353",
"custom": "Adult"
}
],
"price": {
"value": "12",
"currency": "EUR"
}
},
{
"choices": [
{
"optionId": "0b78af72-0ba0-4e71-ba39-b4386555a353",
"custom": "Child"
}
],
"price": {
"value": "5",
"currency": "EUR"
}
}
]
},
"minPrice": {
"value": "5",
"currency": "EUR"
},
"maxPrice": {
"value": "12",
"currency": "EUR"
},
"revision": "2"
}
}
There are 8 errors with this status code.
This method may also return standard errors. Learn more about standard Wix errors.