Skip to content
You are reading the pinned copy of v1.0, which is also the latest release. Read the latest.

Search (storefront API)

Storefront and customer routes of the search module. Send Accept-Language (or X-Locale from a browser) on every call; a customer route needs the session cookie.

Search products

Parameters:

  • brand in query (string, max length 100, optional).
  • categoryId in query (string, optional).
  • inStock in query (boolean, optional).
  • page in query (number, min 1, optional).
  • pageSize in query (number, min 1, max 100, optional).
  • priceMax in query (number, min 0, optional).
  • priceMin in query (number, min 0, optional).
  • q in query (string, max length 200, optional).
  • rating in query (number, min 1, max 5, optional).
  • sortBy in query ("createdAt", "name", "price", "rating", "relevance", optional).
  • sortOrder in query ("asc", "desc", optional).

Responses:

  • 200: Search results.

Log product click

Parameters:

  • id in path (string, required).

Request body: LogClickDto.

Responses:

  • 204: Click logged.

Log product conversion

Parameters:

  • id in path (string, required).

Responses:

  • 204: Conversion logged.

Get search filters

Parameters:

  • q in query (string, optional).

Responses:

  • 200: Filters retrieved.

Get search suggestions

Parameters:

  • q in query (string, min length 1, max length 100, required).

Responses:

  • 200: Suggestions retrieved.
  • clickedProductId (string, required).
  • clickPosition (number, min 0, required).
As seen on Open Source Alternatives The Merchant Engine badge