XOMNI: Experience Omni-Channel

Last Updated: May 05, 2016

This API allows a client application to retrieve a list of key/value in-store metadata pairs for a particular item. The in-store metadata may be used to store contextual and optional data about an item.

Request

HTTP Method Resource URI
GET https://{tenantName}.api.xomni.com/catalog/items/{id}/storemetadata?key={key}&value={value}&keyPrefix={keyPrefix}&companyWide={companyWide}&longitude={longitude}&latitude={latitude}&searchDistance={searchDistance}

URI Parameters

Parameter Name Description Type Conditions
id The unique ID of an item. Number
key The key for the in-store metadata String
value The value for the in-store metadata String
keyPrefix In store metadata key prefix. You can execute startswith query on metadata keys using this field. Ex. If you send "inv" value for this field, result set will contain metadata whose key starts with "inv". String
companyWide A Boolean field indicating whether the search operation runs on all stores or the store attached to the current license. Boolean
longitude Latitude value of the search location. In store metadata search query will be executed on stores nearby to given location. If you want to execute location based search,you must set companyWide parameter to true. Number
latitude Longitude value of the search location. In store metadata search query will be executed on stores nearby to given location. If you want to execute location based search,you must set companyWide parameter to true. Number
searchDistance Max search distance in miles for given search location. Location based search will be executed on nearby stores to given location in given search distance. If you want to execute location based search,you must set companyWide parameter to true. Number

Request Headers

Header Field Name Description
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": [
    {
      "Metadata": [
        {
          "Key": "inv_instock",
          "Value": "true"
        },
        {
          "Key": "inv_stockvalue",
          "Value": "10"
        }
      ],
      "Id": 1,
      "Description": "New York Store",
      "Location": {
        "Longitude": 10.0,
        "Latitude": 10.0
      },
      "Name": "New York Store",
      "Address": "5th avenue"
    },
    {
      "Metadata": [
        {
          "Key": "inv_instock",
          "Value": "false"
        },
        {
          "Key": "inv_stockvalue",
          "Value": "0"
        }
      ],
      "Id": 2,
      "Description": "Seattle Store",
      "Location": {
        "Longitude": 5.0,
        "Latitude": 5.0
      },
      "Name": "Seattle Store",
      "Address": "Redmond"
    }
  ]
}

Response Body Description

Parameter Name Description Type
Data[0..N].Id Unique ID of the store. Number
Data[0..N].Description Description of the store. String
Data[0..N].Name Name of the store. String
Data[0..N].Address Address of the store. String
Data[0..N].Location.Longitude Longitude value of the store location. Number
Data[0..N].Location.Latitude Latitude value of the store location. Number
Data[0..N].Metadata[0..N].Key Key of the metadata. String
Data[0..N].Metadata[0..N].Value Value of the metadata. 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) ItemId is malformed.
400 (Bad Request) Specified license is not assigned to a store.
400 (Bad Request) Key and key prefix parameters cannot be sent at the same time in a in store metadata query.
404 (Not Found) The given item not found.