Retrieves a list of serviceOptionsAndVariants
objects, given the provided
paging, filtering, and sorting.
Query Service Options And Variants* runs with these defaults, which you can override:
id
sorted in ASC
order.cursorPaging.limit
set to 100
.For a detailed list of supported filtering operations refer to the supported filters article (REST).
To learn about working with Query endpoints, see API Query Language, Sorting and Paging, and Field Projection.
Information about filters, paging, and returned fields.
Retrieved serviceOptionsAndVariants
objects.
Paging metadata.
curl -X POST \
'https://wixapis.com/bookings/v1/serviceOptionsAndVariants/query' \
-H 'Authorization: <AUTH>' \
-d '{
"query": {
"sort": [],
"fieldsets": [],
"fields": [],
"filter": {
"options.values.optionSpecificData.customData.name": {
"$hasSome": ["Client type"]
}
}
}
}'
{
"serviceOptionsAndVariantsList": [
{
"id": "28b44cf3-e52d-4f49-a9fb-4fc31bb5147b",
"serviceId": "1e016051-f008-46e8-a6da-b4b26134e36a",
"options": {
"values": [
{
"id": "07ea0b3b-6138-4ed6-85d7-2f9101cc8353",
"type": "CUSTOM",
"customData": {
"name": "Client type",
"choices": ["Adult", "Child", "Student"]
}
}
]
},
"variants": {
"values": [
{
"choices": [
{
"optionId": "07ea0b3b-6138-4ed6-85d7-2f9101cc8353",
"custom": "Adult"
}
],
"price": {
"value": "16",
"currency": "EUR",
"formattedValue": null
}
},
{
"choices": [
{
"optionId": "07ea0b3b-6138-4ed6-85d7-2f9101cc8353",
"custom": "Child"
}
],
"price": {
"value": "3",
"currency": "EUR",
"formattedValue": null
}
},
{
"choices": [
{
"optionId": "07ea0b3b-6138-4ed6-85d7-2f9101cc8353",
"custom": "Student"
}
],
"price": {
"value": "10",
"currency": "EUR",
"formattedValue": null
}
}
]
},
"minPrice": {
"value": "3",
"currency": "EUR",
"formattedValue": null
},
"maxPrice": {
"value": "16",
"currency": "EUR",
"formattedValue": null
},
"revision": "4"
},
{
"id": "76668eb0-fd3e-42fe-8810-896a9df830a7",
"serviceId": "cf6f3f7f-d5d3-4461-b670-276cc8573fe9",
"options": {
"values": [
{
"id": "85ad3b32-e324-4af1-95d6-746f2a8a4019",
"type": "CUSTOM",
"customData": {
"name": "Client type",
"choices": ["Adult", "Child"]
}
}
]
},
"variants": {
"values": [
{
"choices": [
{
"optionId": "85ad3b32-e324-4af1-95d6-746f2a8a4019",
"custom": "Adult"
}
],
"price": {
"value": "100",
"currency": "EUR",
"formattedValue": null
}
},
{
"choices": [
{
"optionId": "85ad3b32-e324-4af1-95d6-746f2a8a4019",
"custom": "Child"
}
],
"price": {
"value": "40",
"currency": "EUR",
"formattedValue": null
}
}
]
},
"minPrice": {
"value": "40",
"currency": "EUR",
"formattedValue": null
},
"maxPrice": {
"value": "100",
"currency": "EUR",
"formattedValue": null
},
"revision": "3"
}
],
"pagingMetadata": {
"count": 2,
"offset": null,
"total": null,
"tooManyToCount": null,
"cursors": {
"next": null,
"prev": null
},
"hasNext": false
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.