Query endpoints allow you to filter and sort results based on service variant and options properties. This article covers field support for filtering and sorting.
Specify the Query Service Options and Variants filter
object in the following format:
The following table shows field support for filters and sorting
for the serviceOptionsAndVariants
object:
Field | Supported Filters | Sortable |
---|---|---|
id | $eq , $ne , $in | Sortable |
serviceId | $eq , $ne , $in | Sortable |
options.values | $exists | |
options.values.id | $hasSome , $hasAll | |
options.values.type | $hasSome , $hasAll | |
options.values.optionSpecificData.customData.name | $hasSome , $hasAll | |
variants.values | $exists | |
variants.values.choices.choice.custom.value | $hasSome , $hasAll | |
variants.values.price | $hasSome , $hasAll | |
variants.values.choices.optionId | $hasSome , $hasAll |
Query Service Options and Variants runs with this default:
id
in ASC
orderSpecify the sort
object in the following format:
By default pagingMetadata.cursors
are returned, unless you specifically pass
query.paging
.
The maximum for cursorPaging.limit
is 100
.
If you pass a cursor token that you have received in a previous query response, passing additional sort or filter information results in an invalid cursor error. This is because the received cursor token already holds all the needed information for sort and filter. Changing the sort and filter properties during the span of a cursor query isn't supported. You may provide a different limit though.
Related content: