Related Documents
Document Properties
Kbid255V85
Last Modified14-Sep-2018
Added to KB11-Mar-2014
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.6
  • ICM 7.7
  • ICM 7.8
  • ICM 7.9
  • ICM 7.10

REST API - Get Search Suggestions


Note

Starting with 7.10 our REST API is documented using Swagger notation accessible at developer.cloud.intershop.com.

URI

/suggest

Http Method

GET

Short Description

Retrieves the suggestions for a search term

Query Parameters

SearchTerm - defines the search term to find suggestion for

Example Requests

/suggest?SearchTerm=Ne

HTTP Status Codes

200 OK

Description

Retrieves search suggestions from the installed search engine for a search term.

These suggestions are also used in the Storefront during a Search is typed in the Search field like this:

If no search engine is active or the are no suggestions available for the given search term an empty collection is returned.

Cartridge

app_sf_rest

Application

B2C Web Shop, SMB Web Shop

Product Version

7.4

Product To Version

 

Status

final

JSON

Request Data Format

Request related java object

n/a

Request Example

n/a

Response Data Format

application/json

Response related java object

com.intershop.sellside.rest.common.capi.resource.SearchSuggestResource

Response Example

Empty list:

{
    "elements": [],
    "type": "SuggestTerms",
    "name": "suggest"
}

and list with suggestions:

{
    "elements": [
        {
            "type": "SuggestTerm",
            "term": "networking software"
        },
        {
            "type": "SuggestTerm",
            "term": "netbooks"
        },
        {
            "type": "SuggestTerm",
            "term": "networks"
        },
        {
            "type": "SuggestTerm",
            "term": "networking cables"
        },
        {
            "type": "SuggestTerm",
            "term": "network media converters"
        },
        {
            "type": "SuggestTerm",
            "term": "newstar"
        },
        {
            "type": "SuggestTerm",
            "term": "new products"
        },
        {
            "type": "SuggestTerm",
            "term": "network switches"
        },
        {
            "type": "SuggestTerm",
            "term": "netgear"
        },
        {
            "type": "SuggestTerm",
            "term": "nec"
        },
        {
            "type": "SuggestTerm",
            "term": "network cards & adapters"
        }
    ],
    "type": "SuggestTerms",
    "name": "suggest"
}

XML

XML Request Data Format

XML Request Java Objects

n/a

XML Request Example

n/a

XML Response Data Format

text/xml

XML Response Java Objects

com.intershop.sellside.rest.common.capi.resource.SearchSuggestResource

XML Response Example

Empty list:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<SuggestTerms name="suggest" type="SuggestTerms">
    <elements/>
</SuggestTerms>

and list with suggestions:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<SuggestTerms name="suggest" type="SuggestTerms">
    <elements>
        <SuggestTerm type="SuggestTerm">
            <value>netgear</value>
        </SuggestTerm>
        <SuggestTerm type="SuggestTerm">
            <value>networking cables</value>
        </SuggestTerm>
        <SuggestTerm type="SuggestTerm">
            <value>network cards &amp; adapters</value>
        </SuggestTerm>
        <SuggestTerm type="SuggestTerm">
            <value>newstar</value>
        </SuggestTerm>
        <SuggestTerm type="SuggestTerm">
            <value>network switches</value>
        </SuggestTerm>
        <SuggestTerm type="SuggestTerm">
            <value>networks</value>
        </SuggestTerm>
        <SuggestTerm type="SuggestTerm">
            <value>networking software</value>
        </SuggestTerm>
        <SuggestTerm type="SuggestTerm">
            <value>nec</value>
        </SuggestTerm>
        <SuggestTerm type="SuggestTerm">
            <value>new products</value>
        </SuggestTerm>
        <SuggestTerm type="SuggestTerm">
            <value>network media converters</value>
        </SuggestTerm>
        <SuggestTerm type="SuggestTerm">
            <value>netbooks</value>
        </SuggestTerm>
    </elements>
</SuggestTerms>

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets