A query composed of one or more different types of filters to narrow the scope of targeted objects when calling the SearchCatalogObjects
endpoint.
Although a query can have multiple filters, only certain query types can be combined per call to SearchCatalogObjects. Any combination of the following types may be used together:
- exact_query
- prefix_query
- range_query
- sorted_attribute_query
- text_query All other query types cannot be combined with any others.
When a query filter is based on an attribute, the attribute must be searchable. Searchable attributes are listed as follows, along their parent types that can be searched for with applicable query filters.
- Searchable attribute and objects queryable by searchable attributes **
name
:CatalogItem
,CatalogItemVariation
,CatalogCategory
,CatalogTax
,CatalogDiscount
,CatalogModifier
, 'CatalogModifierList,
CatalogItemOption,
CatalogItemOptionValue`description
:CatalogItem
,CatalogItemOptionValue
abbreviation
:CatalogItem
upc
:CatalogItemVariation
sku
:CatalogItemVariation
caption
:CatalogImage
display_name
:CatalogItemOption
For example, to search for CatalogItem objects by searchable attributes, you can use
the "name"
, "description"
, or "abbreviation"
attribute in an applicable query filter.
CatalogQuery
Name | Type | Tags | Description |
---|---|---|---|
sortedAttributeQuery |
CatalogQuerySortedAttribute | undefined |
Optional | The query expression to specify the key to sort search results. |
exactQuery |
CatalogQueryExact | undefined |
Optional | The query filter to return the search result by exact match of the specified attribute name and value. |
setQuery |
CatalogQuerySet | undefined |
Optional | The query filter to return the search result(s) by exact match of the specified attribute_name and any ofthe attribute_values . |
prefixQuery |
CatalogQueryPrefix | undefined |
Optional | The query filter to return the search result whose named attribute values are prefixed by the specified attribute value. |
rangeQuery |
CatalogQueryRange | undefined |
Optional | The query filter to return the search result whose named attribute values fall between the specified range. |
textQuery |
CatalogQueryText | undefined |
Optional | The query filter to return the search result whose searchable attribute values contain all of the specified keywords or tokens, independent of the token order or case. |
itemsForTaxQuery |
CatalogQueryItemsForTax | undefined |
Optional | The query filter to return the items containing the specified tax IDs. |
itemsForModifierListQuery |
CatalogQueryItemsForModifierList | undefined |
Optional | The query filter to return the items containing the specified modifier list IDs. |
itemsForItemOptionsQuery |
CatalogQueryItemsForItemOptions | undefined |
Optional | The query filter to return the items containing the specified item option IDs. |
itemVariationsForItemOptionValuesQuery |
CatalogQueryItemVariationsForItemOptionValues | undefined |
Optional | The query filter to return the item variations containing the specified item option value IDs. |
{
"sorted_attribute_query": null,
"exact_query": null,
"set_query": null,
"prefix_query": null,
"range_query": null,
"text_query": null,
"items_for_tax_query": null,
"items_for_modifier_list_query": null,
"items_for_item_options_query": null,
"item_variations_for_item_option_values_query": null
}