queryVariants( )


Retrieve product variants using structured queries with cursor-based pagination.

Use this endpoint for simple filtering operations on id and productId. For complex queries with free-text search and aggregations, use Search Variants instead.

Up to 1,000 variants can be returned per request.

To learn about working with Query endpoints, see API Query Language, and Sorting and Paging.

Learn more about the differences between Query and Search methods.

PROPERTYSUPPORTED FILTERS & SORTING
_ideq(),ne(),exists(),in(),hasSome(),startsWith(),gt(),lt(),le(),ge(),ascending(),descending()
productData.productIdeq(),ne(),exists(),in(),hasSome(),startsWith(),gt(),lt(),le(),ge(),ascending(),descending()
Authentication

This method may require higher-level permissions than the caller has, based on their identity and roles and permissions. In these cases, you can ensure the method is called with the required level of authorization by using one of the following:

Permissions
Read products in v3 catalog
Product v3 read admin
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
optionsQueryVariantsOptions
Returns
Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?