XOMNI: Experience Omni-Channel

Last Updated: May 05, 2016

This API enables you to post a social interaction to XOMNI by using the token assigned for the current PII User.

Request

{
    "RelatedItemId":"1",
    "Content":"This is a sample post"
}
HTTP Method Resource URI
POST https://{tenantName}.api.xomni.com/social/post

Request Body Description

Parameter Name Description Type Conditions
Content The text content of the message. String
Required
RelatedItemId The integer ID of an item/product related to the social post. Number
Required

Request Headers

Header Field Name Description
Content-Type
Content type of the response entity. The value of this header is always application/json.
PIIToken
Includes the base64-encoded “Personally Identifiable Information” data.
Sample: dXNlcm5hbWU6SW5uQXBwc1VzZXI7cGFzc3dvcmQ6SW5uQXBwc1Bhc3M=
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": {
        "Comments": [],
        "Author": "Test User",
        "Id": 16,
        "CreatedDate": "2013-08-14T13:51:03.5642685+03:00",
        "Content": "This is a sample post",
        "RelatedItemId": 1,
        "AvailablePlatforms": [
            {
                "Platform": "Facebook",
                "Status": "Succeed",
                "Author": "TestUserinFacebook",
                "AuthorPictureUrl": "http: //graph.facebook.com/100005333233573/picture"
            }
        ]
    }
}

Response Body Description

Parameter Name Description Type
Data.Author The name of the PII User. String
Data.Id The unique ID for the social XOMNI post. Number
Data.CreatedDate The date when the post is created. Date
Data.Content The text content of the message. String
Data.RelatedItemId The integer ID of an item/product related to the social post. Number
Data.AvailablePlatforms[0..N].Platform Name of the social platform. String
Data.AvailablePlatforms[0..N].Status Status of the social interaction. String
Data.AvailablePlatforms[0..N].Author Display name of the user in the social platform. String
Data.AvailablePlatforms[0..N].AuthorPictureUrl Profile picture of the user in the social platform. String
Data.Comments[0..N].TargetPostId The unique ID for the social XOMNI post which the current comment replies to and belongs to. Number
Data.Comments[0..N].TargetCommentId The unique ID for the social XOMNI comment which the current comment replies to. Number
Data.Comments[0..N].Id The unique ID for the social comment. Number
Data.Comments[0..N].CreatedDate The date when the post is created. Date
Data.Comments[0..N].Content The text content of the comment. String
Data.Comments[0..N].RelatedItemId The integer ID of an item/product related to the social post. Number
Data.Comments[0..N].AvailablePlatforms[0..N].Platform Name of the social platform. String
Data.Comments[0..N].AvailablePlatforms[0..N].Status Status of the social interaction. String
Data.Comments[0..N].AvailablePlatforms[0..N].Author Display name of the user in the social platform. String
Data.Comments[0..N].AvailablePlatforms[0..N].AuthorPictureUrl Profile picture of the user in the social platform. String

Possible values for available platforms

Value Description
facebook The key used for the Facebook social platform.
twitter The key used for the Twitter social platform.

Possible values for available platform status

Value Description
Succeed Post has been successfully send to the social platform.
Failed Post has been failed. System will retry to send it at a later point.
TokenExpired User token is expired. Execute getting access token process and send a new access token to the API.
PermissionRequired Your access token does not have related permission for the operation you are trying to do. Execute getting access token process and send a new access token to the API.
AppRemoved Facebook application was de-authorized from related user. The client application may execute getting access token process and send a new access token to the API.
ConfigurationError Configuration of this social platform is invalid. Please check social platform settings in tenant settings.

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
404 (Not Found) Related item could not be found.
404 (Not Found) No suitable social platform found for current PII.
409 (Conflict) There can be only one social post per product. If there is already a social post made for a particular product, you should try posting a comment to that post instead of trying to post another social post.