This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates a query to retrieve a list of items.
The queryItems() function builds a query to retrieve a list of items and returns a ItemsQueryBuilder object.
The returned object contains the query definition, which is used to run the query using the find() function.
You can refine the query by chaining ItemsQueryBuilder functions onto the query. ItemsQueryBuilder functions enable you to filter, sort, and control the results that queryItems() returns.
queryItems() runs with the following ItemsQueryBuilder defaults, which you can override:
The following ItemsQueryBuilder functions are supported for queryItems(). For a full description of the item object, see the object returned for the items property in ItemsQueryResult.
| PROPERTY | SUPPORTED FILTERS & SORTING |
|---|---|
priceVariants.variants | exists() |
priceVariants.variants.price | eq(),ne() |
_id | eq(),ne(),in() |
_createdDate | eq(),ne(),gt(),le(),lt() |
_updatedDate | eq(),ne(),gt(),le(),lt() |
name | eq(),ne(),in(),startsWith() |
description | eq(),ne(),in(),startsWith() |
image | exists() |
image.id | eq(),ne() |
labels | exists() |
orderSettings | exists() |
orderSettings.inStock | eq(),ne(),in() |
orderSettings.acceptSpecialRequests | eq(),ne(),in() |
This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.