XOMNI: Experience Omni-Channel

Last Updated: February 19, 2016

The youtube video management systems provides APIs to relate a youtube video with an item. When we’re creating a relationship between a youtube video and an item, we’re adding youtube video details as asset metadata ın backend. These metadata include youtube video id, title, publish date and video links. Possible keys for youtube videos are Youtube_VideoId, Title, Published, SWF, H263, MPEG4, MP4_480P, MP4_720P, and MP4_1080P.

Request

{
    "VideoId":"v64kB94j-Fw",
    "IsDefault":"True",
}
HTTP Method Resource URI
POST https://{tenantName}.api.xomni.com/private/youtube/videoRelation?itemId={itemId}

URI Parameters

Parameter Name Description Type Conditions
itemId The unique ID of the item. Number

Request Body Description

Parameter Name Description Type Conditions
VideoId The unique ID of the youtube video. String
Required
IsDefault Boolean field indicating if this asset is the default video of this item or not. Unknown

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

{
    "AssetId":4,
    "RelatedId":14,
    "IsDefault":true
}

Response Body Description

Parameter Name Description Type
AssetId The unique ID of the created asset. Number
RelatedId The unique ID of the relationship member. Brand ID, Category ID or Item ID. Number
IsDefault Boolean field indicating if this asset is the default asset of the relationship member 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 POST operations. Possible response status codes are as listed below:

Status Code Description
400 (Bad Request) Given relationship already exists in backend.
404 (Not Found) Given item or youtube video not found.
500 (Internal Server Error) An error occured while searching video in youtube.