XOMNI: Experience Omni-Channel

Last Updated: May 05, 2016

This operation returns full information about a social post including all the comments made to the post. The {relatedItemId} parameter requires the item unique ID to which the social post is send. The PIIToken header is used to identify the PIIUser and the API will return only the related post for that particular user and item/product.

Request

HTTP Method Resource URI
GET https://{tenantName}.api.xomni.com/social/post?relatedItemId={relatedItemId}

URI Parameters

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

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":[
           {
               "TargetPostId":16,
               "TargetCommentId":0,
               "Id":14,
               "CreatedDate":"2013-08-14T14:07:54.813",
               "Content":"This is a sample comment.",
               "RelatedItemId":5,
               "AvailablePlatforms":[
                  {
                      "Platform":"Facebook",
                      "Status":"Succeed",
                      "Author":"Test User",
                      "AuthorPictureUrl":"http://graph.facebook.com/100005333233573/picture"
                  }
               ]
           }
        ],
        "Author":"Test PII User",
        "Id":16,
        "CreatedDate":"2013-08-14T13:51:03.563",
        "Content":"This is a sample post.",
        "RelatedItemId":5,
        "AvailablePlatforms":[
           {
               "Platform":"Facebook",
               "Status":"Succeed",
               "Author":"Test User",
               "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 GET operations. Possible response status codes are as listed below:

Status Code Description
404 (Not Found) Social post could not found.