XOMNI: Experience Omni-Channel

Last Updated: February 19, 2016

This API is used to fetch relationships between assets and brands. Using this API, you can get a list of documents assigned to a particular brand. You can also specify asset metadata key/value pair to get the specific documents for a particular brand.

Request

HTTP Method Resource URI
GET https://{tenantName}.api.xomni.com/catalog/brands/{brandId}/documents?metadataKey={metadataKey}&metadataValue={metadataValue}&assetDetail={assetDetail}

URI Parameters

Parameter Name Description Type Conditions
brandId The unique ID of the brand. Number
metadataKey Optional field for querying assets with their metadata. You can send metadata key filter using this field. String
metadataValue Optional field for querying assets with their metadata. You can send metadata value filter using this field. String
assetDetail An integer field indicating whether the response contains item assets details (Default value is 4. See Possible values for AssetDetail below). Number

Possible Values For ImageAssetDetail

Value Description
1 Includes only default asset.
2 Includes only default asset with metadata.
4 Includes all assets.
8 Includes all assets with metadata.

Request Headers

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

Response

{
    "Data": [
        {
            "AssetMetadata": [
                {
                    "Key": "assetmetadatakey1",
                    "Value": "assetmetadatavalue1"
                },
                {
                    "Key": "assetmetadatakey2",
                    "Value": "assetmetadatavalue2"
                }
            ],
            "AssetId": 129,
            "AssetUrl": "https://xomni.blob.core.windows.net/documents/ec7421f00-b9bf-49c8-a618-33e419695717",
           "IsDefault": false
        },
        {
            "AssetMetadata": [
                {                    
                    "Key": "assetmetadatakey1",
                    "Value": "assetmetadatavalue1"
                },
                {
                    "Key": "assetmetadatakey5",
                    "Value": "assetmetadatavalue5"
                }
            ],
            "AssetId": 120,
            "AssetUrl": " https://xomni.blob.core.windows.net/documents/bd20b8aba-3194-4e73-93d8-f5a2c6832d7f",
            "IsDefault": false
        }
    ]
}

Response Body Description

Parameter Name Description Type
Data[0..N].AssetMetadata A list of key/value metadata pairs Array
Data[0..N].AssetId The unique ID of the asset. Number
Data[0..N].AssetUrl The unique URL of the asset. String
Data[0..N].IsDefault A boolean field indicating whether the asset is default or not. Boolean

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
404 (Not Found) Given brand could not be found.
404 (Not Found) No document has been found for the given brand.