Object Index / Definition

You are viewing an old version of the API
Catalog​Query

A query to be applied to a SearchCatalogObjectsRequest

Only one query field may be present.

Where an attribute name is required, it should be specified as the name of any field marked "searchable" from the structured data types for the desired result object type(s) (CatalogItem, CatalogItemVariation, CatalogCategory, CatalogTax, CatalogDiscount, CatalogModifierList, CatalogModifier).

For example, a query that should return Items may specify attribute names from any of the searchable fields of the CatalogItem data type, namely "name", "description", and "abbreviation".

Properties

Name Description
exact_query
Catalog​Query​Exact

A query that returns only objects for which the given (string-valued) attribute has the given case-insensitive value.

item_variations_for_item_option_values_query
Catalog​Query​Item​Variations​For​Item​Option​Values

Beta

A query that returns all CatalogItemVariations that have all of the given CatalogItemOption values.

items_for_item_options_query
Catalog​Query​Items​For​Item​Options

Beta

A query that returns all CatalogItems that have all of the given CatalogItemOptions.

items_for_modifier_list_query
Catalog​Query​Items​For​Modifier​List

A query that returns all CatalogItems that have any of the given CatalogModifierLists enabled.

items_for_tax_query
Catalog​Query​Items​For​Tax

A query that returns all CatalogItems that have any of the given CatalogTaxes enabled.

prefix_query
Catalog​Query​Prefix

A query that returns only objects for which the given (string-valued) attribute has the given case-insensitive prefix.

range_query
Catalog​Query​Range

A query that returns only objects for which the given (integer-valued) attribute lies in the given range.

sorted_attribute_query
Catalog​Query​Sorted​Attribute

A query that returns all objects, sorted by the given attribute.

text_query
Catalog​Query​Text

A query that returns only objects whose searchable attributes contain all of the given keywords as prefixes. For example, if a CatalogItem contains attributes {"name": "t-shirt"} and {"description": "Small, Purple"}, it will be matched by the query {"keywords": ["shirt", "sma", "purp"]}.

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?