v1

latestOpenAPI 3.0.02026-07-26221117272.0 KB
AutocompleteV2

Autocomplete

The Autocomplete method is to be called when users have typed part of the keyword. The endpoint returns suggestions from HawkSearch.

post/api/v2/autocomplete

Request body

FacetSelectionsobject

Selected facets names with values

CustomUrlstring

Landing page Custom URL

SortBystring

Sort by a filed name

SortingSetCodestring

Set sorting set evaluation override

PageIdinteger
NestedIdstring

Nested Id

ClientGuidstring

API Client Guid

Keywordstring

Search term. If term isn’t included we search everything

IsInPreviewboolean

Flag set to true will display elements in a preview mode. Flag set to false will display live data

Type0 | 1 | 2 | 3

To control the ability of returning numbers of rows from Elastic Search, both ‘Type’ and ‘ProductCount’ parameters needs to be set e.g.: Type=Category, ProductCount=2. Search response will return max 2 items for category suggestions.

ProductCountinteger

The maximum number of results to return for selected ‘Type’ (see above)

DisplayFullResponseboolean

Flag set to true will display also full Document object from Elastic for Products and Content suggestions

FieldOverridestring[]

An array of field names that Elastic Search will return in a response

IndexNamestring

Search a given index

Querystring

Custom search query

Example request

{
  "ClientData": {
    "VisitorId": "00000000-0000-0000-0000-000000000000",
    "VisitId": "00000000-0000-0000-0000-000000000000"
  }
}

Response

OK

object required