GET api/Search?searchTerm={searchTerm}&brandNodeId={brandNodeId}&hitLimit={hitLimit}&page={page}

Search parts within a specific brand

Request Information

URI Parameters

NameDescriptionTypeAdditional information
searchTerm

Search term string

string

Required

brandNodeId

ID of brand to search within

integer

Required

hitLimit

Limit of how many parts to return

integer

Required

page

Which page of results to return

integer

Required

Body Parameters

None.

Response Information

Resource Description

Most relevant search results

SearchResults
NameDescriptionTypeAdditional information
TotalHits

Total number of hits for the search term

integer

None.

PageNumber

Which page has been served up

integer

None.

HitLimit

Limit of how many results per page are served up

integer

None.

SearchQuery

Original query sent to server

string

None.

BrandNodeFilter

The ID of the brand node within which the search was applied (if any)

integer

None.

QueryTimeInMs

The time in milliseconds the query took

decimal number

None.

Documents

The list of relevant documents matching the search term.

Collection of SearchDocument

None.

Response Formats

application/json, text/json

Sample:
{
  "Documents": [
    {
      "Boost": 1.1,
      "fields": [
        {
          "internalName": "sample string 1",
          "fieldsData": "sample string 2"
        },
        {
          "internalName": "sample string 1",
          "fieldsData": "sample string 2"
        }
      ]
    },
    {
      "Boost": 1.1,
      "fields": [
        {
          "internalName": "sample string 1",
          "fieldsData": "sample string 2"
        },
        {
          "internalName": "sample string 1",
          "fieldsData": "sample string 2"
        }
      ]
    }
  ],
  "TotalHits": 1,
  "PageNumber": 2,
  "HitLimit": 3,
  "SearchQuery": "sample string 4",
  "BrandNodeFilter": 1,
  "QueryTimeInMs": 5.1
}

text/html

Sample:
{"Documents":[{"Boost":1.1,"fields":[{"internalName":"sample string 1","fieldsData":"sample string 2"},{"internalName":"sample string 1","fieldsData":"sample string 2"}]},{"Boost":1.1,"fields":[{"internalName":"sample string 1","fieldsData":"sample string 2"},{"internalName":"sample string 1","fieldsData":"sample string 2"}]}],"TotalHits":1,"PageNumber":2,"HitLimit":3,"SearchQuery":"sample string 4","BrandNodeFilter":1,"QueryTimeInMs":5.1}

application/xml, text/xml

Sample:
<SearchResults xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Jotunheim.Models.Search">
  <BrandNodeFilter>1</BrandNodeFilter>
  <Documents>
    <SearchDocument>
      <Boost>1.1</Boost>
      <fields>
        <SearchField>
          <fieldsData>sample string 2</fieldsData>
          <internalName>sample string 1</internalName>
        </SearchField>
        <SearchField>
          <fieldsData>sample string 2</fieldsData>
          <internalName>sample string 1</internalName>
        </SearchField>
      </fields>
    </SearchDocument>
    <SearchDocument>
      <Boost>1.1</Boost>
      <fields>
        <SearchField>
          <fieldsData>sample string 2</fieldsData>
          <internalName>sample string 1</internalName>
        </SearchField>
        <SearchField>
          <fieldsData>sample string 2</fieldsData>
          <internalName>sample string 1</internalName>
        </SearchField>
      </fields>
    </SearchDocument>
  </Documents>
  <HitLimit>3</HitLimit>
  <PageNumber>2</PageNumber>
  <QueryTimeInMs>5.1</QueryTimeInMs>
  <SearchQuery>sample string 4</SearchQuery>
  <TotalHits>1</TotalHits>
</SearchResults>