XOMNI: Experience Omni-Channel

Last Updated: May 05, 2016

This API enables a client application to retrieve a list of sub-categories for the given category based on its unique ID. If you send parentCategoryId as 0, the root categories will be returned.

Request

HTTP Method Resource URI
GET https://{tenantName}.api.xomni.com/catalog/categories?parentCategoryId={categoryId}&includeMetadata={includeMetadata} &imageAssetDetail={imageAssetDetail}&videoAssetDetail={videoAssetDetail} &documentAssetDetail={documentAssetDetail}

URI Parameters

Parameter Name Description Type Conditions
parentCategoryId The unique ID of the parent category where sub categories should be returned. Number
includeMetadata Boolean field indicating if the result set should contain category metadata or not. Boolean
imageAssetDetail An integer field enumerating if the response contains category image assets. (See Possible values for ImageAssetDetail below.) Number
videoAssetDetail An integer field enumerating if the response contains category video assets. (See Possible values for VideoAssetDetail below.) Number
documentAssetDetail An integer field enumerating if the response contains category document assets. (See Possible values for DocumentAssetDetail below.) Number

Possible values for image asset detail

Value Description
0 Default Value – Image assets are not included in response.
1 Includes only default image asset.
2 Includes only default image asset with metadata.
4 Includes all image assets.
8 Includes all image assets with metadata.

Possible values for video asset detail

Value Description
0 Default Value – Video assets are not included in response.
1 Includes only default video asset.
2 Includes only default video asset with metadata.
4 Includes all video assets.
8 Includes all video assets with metadata.

Possible values for document asset detail

Value Description
0 Default Value – Document assets are not included in response.
1 Includes only default document asset.
2 Includes only default document asset with metadata.
4 Includes all document assets.
8 Includes all document assets with metadata.

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": [
        {
            "Id": 1,
            "Name": "SampleCategory0",
            "ShortDescription": "SampleCategory0",
            "LongDescription": "SampleCategory0",
            "SubCategoryCount": 2,
            "CategoryMetadata": [
                {
                    "Key": "categorymetadatakey1",
                    "Value": "categorymetadatavalue1"
                },
                {
                    "Key": "categorymetadatakey2",
                    "Value": "categorymetadatavalue2"
                }
            ],
            "ImageAssets": [
                {
                    "ResizedAssets": [
                        {
                            "ImageSizeProfile": {
                                "Id": 1,
                                "Height": 300,
                                "Width": 500
                            },
                            "AssetUrl": "https: //xomni.blob.core.windows.net/images/6D16EE1F-73A1-4BB0-9BAA-8FD27C0B3568"
                        },
                        {
                            "ImageSizeProfile": {
                                "Id": 2,
                                "Height": 600,
                                "Width": 1000
                            },
                            "AssetUrl": "https: //xomni.blob.core.windows.net/images/6D16EE1F-73A1-4BB0-9BAA-8FD27C0B3568"
                        },
                        {
                            "ImageSizeProfile": {
                                "Id": 3,
                                "Height": 900,
                                "Width": 1500
                            },
                            "AssetUrl": "https: //xomni.blob.core.windows.net/images/6D16EE1F-73A1-4BB0-9BAA-8FD27C0B3568"
                        }
                    ],
                    "AssetMetadata": [
                        {
                            "Key": "assetmetadatakey1",
                            "Value": "assetmetadatavalue1"
                        },
                        {
                            "Key": "assetmetadatakey2",
                            "Value": "assetmetadatavalue2"
                        },
                        {
                            "Key": "assetmetadatakey3",
                            "Value": "assetmetadatavalue3"
                        }
                    ],
                    "AssetId": 1,
                    "AssetUrl": "https: //xomni.blob.core.windows.net/images/5e2dd075-957f-4884-8992-030d1eabcc79",
                    "IsDefault": true
                }
            ],
            "DocumentAssets": [
                {
                    "AssetMetadata": [
                        {
                            "Key": "assetmetadatakey3",
                            "Value": "assetmetadatavalue3"
                        },
                        {
                            "Key": "assetmetadatakey6",
                            "Value": "assetmetadatavalue6"
                        },
                        {
                            "Key": "assetmetadatakey5",
                            "Value": "assetmetadatavalue5"
                        }
                    ],
                    "AssetId": 3,
                    "AssetUrl": "https: //xomni.blob.core.windows.net/images/5e2dd075-957f-4884-8992-030d1eabcc79"
                }
            ],
            "VideoAssets": [],
            "ParentCategoryId": 1,
            "ParentCategoryName": "Shoes"
        },
        {
            "Id": 2,
            "Name": "SampleCategory1",
            "ShortDescription": "SampleCategory1ShortDescription",
            "LongDescription": "SampleCategory1LongDescription: ",
            "SubCategoryCount": 0,
            "CategoryMetadata": [
                {
                    "Key": "categorymetadatakey1",
                    "Value": "categorymetadatavalue1"
                },
                {
                    "Key": "categorymetadatakey5",
                    "Value": "categorymetadatavalue5"
                }
            ],
            "ParentCategoryId": 1,
            "ParentCategoryName": "Shoes"
        }
    ]
}

Response Body Description

Parameter Name Description Type
Data[0..N].Id The unique ID of the category. Number
Data[0..N].Name The name of the category. String
Data[0..N].ShortDescription The short description of the category. String
Data[0..N].LongDescription The long description of the category. String
Data[0..N].SubCategoryCount The count of subcategories of this category. Number
Data[0..N].ParentCategoryId The unique ID of the parent category. Number
Data[0..N].ParentCategoryName The name of the parent category. String
Data[0..N].CategoryMetadata[0..N].Key The key for the metadata. String
Data[0..N].CategoryMetadata[0..N].Value The value of the metadata. String
Data[0..N].VideoAssets[0..N].AssetMetadata A list of key/value metadata pairs Array
Data[0..N].VideoAssets[0..N].AssetId The unique ID of the asset. Number
Data[0..N].VideoAssets[0..N].AssetUrl The unique URL of the asset. String
Data[0..N].VideoAssets[0..N].IsDefault A boolean field indicating whether the asset is default or not. Boolean
Data[0..N].DocumentAssets[0..N].AssetMetadata A list of key/value metadata pairs Array
Data[0..N].DocumentAssets[0..N].AssetId The unique ID of the asset. Number
Data[0..N].DocumentAssets[0..N].AssetUrl The unique URL of the asset. String
Data[0..N].DocumentAssets[0..N].IsDefault A boolean field indicating whether the asset is default or not. Boolean
Data[0..N].ImageAssets[0..N].IsDefault Boolean field indicating whether this asset is the default image of the related object or not. Boolean
Data[0..N].ImageAssets[0..N].AssetId The unique ID of the asset. Number
Data[0..N].ImageAssets[0..N].AssetUrl The unique URL of the asset. String
Data[0..N].ImageAssets[0..N].AssetMetadata[0..N].Key The key for the metadata. String
Data[0..N].ImageAssets[0..N].AssetMetadata[0..N].Value The value of the metadata. String
Data[0..N].ImageAssets[0..N].ResizedAssets[0..N].AssetUrl The unique URL of the asset. String
Data[0..N].ImageAssets[0..N].ResizedAssets[0..N].ImageSizeProfile.Id The unique ID of the resized asset size profile. Number
Data[0..N].ImageAssets[0..N].ResizedAssets[0..N].ImageSizeProfile.Height Height of the resized asset. Number
Data[0..N].ImageAssets[0..N].ResizedAssets[0..N].ImageSizeProfile.Width Width of the resized asset. Number

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.