v1

latestOpenAPI 3.0.32026-07-173196215.4 KB
search-v1

Typeahead v1

The endpoint searches and returns:

  • brands by their name
  • categories by their name or their synonyms
  • products by their name, brand, and attributes (or attribute synonyms)

When there is an exact one-to-one match present in the results, it is placed under the topMatch property. The rest of the results are sorted by relevancy and placed under the suggestions property. Sorting gives more weight to categories and brands, so products are generally placed below categories and brands.

The suggestions array has two types of objects:

  • BrandOrCategory object, which is either a brand or category. Whether it is a brand or category can be identified by the property primaryMatch. The brand suggestions will also include the most relevant category under the category property.
  • product object

When the search term finds a matching attribute, the attribute is then applied as a filter to the brand and category searches, adjusting the product count. Applied filters can be found under the attributeFilters property.

Please use the ?fullAttributeValue=true parameter for all searches. The old response that returns only attribute IDs is deprecated. The response will default to full attribute values in the future.

post/v1/typeahead

Query parameters

termstring required

The term parameter specifies the search term.

fullAttributeValueboolean

Changes the values within the attributeFilters array to following format: {"id": 1, "name": "black"}

limitinteger

The limit parameter allows limiting the number of suggested products returned.

withstring[]

The with parameter can be applied to include related resources, for example, the attributes of a product can be attached using with=product.attributes. It is also possible to filter product attributes by key with=product.attributes:key(plusSize) or by type with=product.attributes:type(material_care). Nested includes can also be attached when available with=product.variants.attributes and multiple combinations are likewise accepted with=prodcut.siblings,product.variants,category.children. When using with=category.children, you can provide categoryDepth parameter to increase child depth. In the following table, there is more information about possible includes.

IncludeincludesAvailable Filters
product.attributeskey, type
product.advancedAttributeskey, type
product.variantsSee available includes for variants at variants endpoint
product.images (default)images.attributes
product.categorieshidden(true)
product.definingAttributes
product.siblings
product.priceRange
product.reductionRange
product.lowestPriorPrice
product.searchCategoryIds
product.baseCategories
category.parents
category.children
category.properties:name(property_name)
categoryDepthinteger
Example:3

Defines the number of nested child categories to include in the response.

categoryIdinteger
Example:20201

The categoryId parameter is used to filter the results and limit the returned data to items that belong to the specified category or its child categories.

Request body

categoryIdinteger

The categoryId parameter can filter by category ID.

limitinteger

The limit parameter allows limiting the number of suggested products returned.

termstring

The term parameter allows you to query for any entity with a full or partial match with the given term.

Example request

{
  "categoryId": 20201,
  "limit": 10
}

Response

successful operation