XOMNI: Experience Omni-Channel

Last Updated: May 05, 2016

The Auto Complete API for Brands, Categories and Items provides an API endpoint to fetch a full list of distinct brand names, category names and item titles in a single response filtered by a given search keyword.

Request

HTTP Method Resource URI
GET https://{tenantName}.api.xomni.com/catalog/autocomplete/{searchType}?searchTerm={searchTerm}&top={top}&includeOnlyMasterItems={includeOnlyMasterItems}

URI Parameters

Parameter Name Description Type Conditions
searchType Search operation will be executed given context. See URI Parameter Descriptions section for possible values of this field. String
searchTerm Results will be filtered by this keyword. Filtering based on “Starts With” algorithm. String
includeOnlyMasterItems A Boolean field indicating whether the result should only cover master items or not. If the field value is “false”, the result set will contain variant items as well. Boolean
top The number of items to retrieve. Number

Possible values for search type

Value Description
All Search operation will be executed on Category, Brand and Item.
Category Search operation will be executed on category.
Brand Search operation will be executed on brand.
Item Search operation will be executed on item.

Request Headers

Header Field Name Description
Content-Type
Content type of the response entity. The value of this header is always application/json.
Authorization
Access or identity token taken from oauth APIs.
Sample: Bearer dc8f1dcdbe454da8a25621839a93569337522968019e4bd7becd6e01285444da
Accept
Includes minor version header.
Sample: application/vnd.xomni.api-v4-1, */*

Response

{
    "Data": {
        "SearchTerm": "br",
        "SearchType": "All",
        "Results": [
            {
                "Id": 1,
                "SearchType": "Brand",
                "FullText": "Brand 1"
            },
            {
                "Id": 2,
                "SearchType": "Brand",
                "FullText": "Brand 2"
            },
            {
                "Id": 3,
                "SearchType": "Brand",
                "FullText": "Brand 3"
            },
            {
                "Id": 4,
                "SearchType": "Brand",
                "FullText": "Brand 4"
            }
        ]
    }
}

Response Body Description

Parameter Name Description Type
Data.SearchTerm Filtering value. String
Data.SearchType The data collection type to filter. String
Data.Results[0..N].Id The unique ID for the specified type in SearchType Number
Data.Results[0..N].SearchType Result type. String
Data.Results[0..N].FullText Brand Name or Category Name or Item Title String

Response Headers

Header Field Name Description
Content-Type
Content type of the response entity. The value of this header is always application/json.

Status Codes

A successful operation returns status code 200 (OK) for GET operations. Possible response status codes are as listed below:

Status Code Description
400 (Bad Request) Invalid SearchType parameter.
400 (Bad Request) Top parameter must be between 1 and 100.
400 (Bad Request) searchTerm must be at least 3 characters, and no more than 25 characters.