XOMNI: Experience Omni-Channel

Last Updated: February 19, 2016

This API posts a social comment for an existing social comment in XOMNI. The post method uses the token assigned for the current PII User.

Request

{
        "TargetCommentId":5,
        "Content":"This is an another sample comment."
}
HTTP Method Resource URI
POST https://{tenantName}.api.xomni.com/social/comment

Request Body Description

Parameter Name Description Type Conditions
TargetCommentId The unique ID for the social XOMNI comment which the current comment replies to. Number
Required
Content The text content of the comment. String
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=
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":{  
      "TargetPostId":16,
      "TargetCommentId":5,
      "Id":15,
      "CreatedDate":"2013-08-14T14:40:01.3508349+03:00",
      "Content":"This is an another sample comment.",
      "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.TargetPostId The unique ID for the social XOMNI post which the current comment replies to and belongs to. Number
Data.TargetCommentId The unique ID for the social XOMNI comment which the current comment replies to. Number
Data.Id The unique ID for the social comment. Number
Data.CreatedDate The date when the post is created. Date
Data.Content The text content of the comment. 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

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
400 (Bad Request) When you try to post a comment you need to specify a comment Id or a XOMNI social post ID to reply to.
404 (Not Found) The comment you are trying to reply to could not be found.