Service Variants and Options: Supported Filters and Sorting

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.

Filtering

Specify the Query Service Options and Variants filter object in the following format:

Copy
1

The following table shows field support for filters and sorting for the serviceOptionsAndVariants object:

FieldSupported FiltersSortable
id$eq, $ne, $inSortable
serviceId$eq, $ne, $in
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

Sorting

Query Service Options and Variants runs with this default:

  • sorted by id in ASC order

Specify the sort object in the following format:

Copy
1

Paging

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:

Was this helpful?
Yes
No