All messaging via REX can be forwarded to a specified external web service. Transfers are bulk: messages received by the service are sent in a list. Expose a RESTful web service accepting JSON via HTTP/HTTPS POST. HTTP POST: no auth. HTTPS POST: basic auth with the service definition username/password. External WS address is registered in REX by Turkcell Ops. Messages exchanged with Customer Services are not forwarded due to confidentiality. All message types are supported:
Messages are sent as a list; a single request can include requests/responses for multiple users.
{
"list":[
{
"request":{
"msgId":"1",
"transactionId":"1",
"serviceId":8309,
"receiveDate":"12/10/2015 08:00:00",
"sender":"9053XXXXXXXX",
"type":"M",
"content":{
"type":0,
"message":"WELCOME"
}
},
"response":{
"composition":{
"list":[
{
"type":0,
"message":"Unfortunately we couldn't find content for the word you sent."
}
]
}
}
},
{
"request":{
"msgId":"2",
"transactionId":"2",
"serviceId":8309,
"receiveDate":"12/10/2015 08:00:00",
"sender":"9053XXXXXXXX",
"type":"M",
"content":{
"type":0,
"message":"support"
}
},
"response":{
"composition":{
"list":[
{
"type":0,
"message":"Hello, this is Deniz from Customer Services. How may I help you?"
},
{
"type":0,
"message":"To disconnect from Customer Services, type EXIT."
}
]
}
}
}
]
}
{
"list":[
{
"request":{
"msgId":"793181",
"transactionId":"x5aPmZ1N-2233",
"serviceId":8309,
"receiveDate":"10/08/2017 15:28:35",
"sender":"9053XXXXXXXX",
"type":"M",
"content":{
"type":0,
"message":"Tmp1"
}
},
"response":{
"composition":{
"list":[
{
"type":13,
"tmmType":0,
"tmmSingle":{
"title":"Enter title",
"description":"Enter description",
"image":{
"url":"https://timsac.turkcell.com.tr/scontent/p2p/14112016/11/P1e646f5c03a7b4b44f6da1329ac218e322da72356e79e5116dff86e3fc255a228.png",
"ratio":1.8658537,
"button":{
"type":0,
"name":"Button-1",
"url":"https://www.bip.ai"
}
},
"buttonlist":[
{
"type":0,
"name":"Button-2",
"url":"https://www.bip.ai"
},
{
"type":1,
"name":"Button-3",
"payload":"Payload-Button-3"
}
],
"postbackid":"@singlePostbackS1000@83099053045500001502368115549__#TX#"
}
}
]
}
}
}
]
}
{
"list":[
{
"request":{
"msgId":"793188",
"transactionId":"x5aPmZ1N-2264",
"serviceId":8309,
"receiveDate":"10/08/2017 15:33:40",
"sender":"9053XXXXXXXX",
"type":"M",
"content":{
"type":103,
"tmmType":0,
"tmmPostbackResponse":{
"payload":"Payload-Button-3",
"postbackid":"@singlePostbackS1000@83099053045500001502368115549__#TX#"
}
}
}
}
]
}
{
"list":[
{
"request":{
"msgId":"793190",
"transactionId":"x5aPmZ1N-2266",
"serviceId":8309,
"receiveDate":"10/08/2017 15:34:30",
"sender":"9053XXXXXXXX",
"type":"M",
"content":{
"type":0,
"message":"Tmp2"
}
},
"response":{
"composition":{
"list":[
{
"type":13,
"tmmType":1,
"tmmMultiple":{
"maintitle":"Enter title",
"maindescription":"Enter description",
"mainimage":{
"url":"https://timsac.turkcell.com.tr/scontent/p2p/14112016/11/P1e646f5c03a7b4b44f6da1329ac218e322da72356e79e5116dff86e3fc255a228.png",
"ratio":1.8658537,
"button":{
"type":0,
"name":"Button-1",
"url":"https://www.bip.ai"
}
},
"mainbuttonlist":[
{
"type":0,
"name":"Button-2",
"url":"https://www.bip.ai"
},
{
"type":1,
"name":"Button-3",
"payload":"Payload-Button-3"
}
],
"sublist":[
{
"title":"Enter title",
"description":"Enter description",
"image":{
"url":"https://timsac.turkcell.com.tr/scontent/p2p/14112016/11/P1e646f5c03a7b4b44f6da1329ac218e322da72356e79e5116dff86e3fc255a228.png",
"ratio":1.8658537
},
"buttonlist":[
{
"type":0,
"name":"Button-4",
"url":"https://www.bip.ai"
},
{
"type":1,
"name":"Button-5",
"payload":"Payload-Button-5"
}
]
},
{
"title":"Enter title",
"description":"Enter description",
"image":{
"url":"https://timsac.turkcell.com.tr/scontent/p2p/14112016/11/P1e646f5c03a7b4b44f6da1329ac218e322da72356e79e5116dff86e3fc255a228.png",
"ratio":1.8658537
},
"buttonlist":[
{
"type":0,
"name":"Button-6",
"url":"https://www.bip.ai"
},
{
"type":1,
"name":"Button-7",
"payload":"Payload-Button-7"
}
]
}
],
"postbackid":"@multiplePostbackM1000@83099053045500001502368470440__#TX#"
}
}
]
}
}
}
]
}
{
"list":[
{
"request":{
"msgId":"793193",
"transactionId":"x5aPmZ1N-2269",
"serviceId":8309,
"receiveDate":"10/08/2017 15:35:35",
"sender":"9053XXXXXXXX",
"type":"M",
"content":{
"type":103,
"tmmType":1,
"tmmPostbackResponse":{
"payload":"Payload-Button-3",
"postbackid":"@multiplePostbackM1000@83099053045500001502368470440__#TX#"
}
}
}
}
]
}
{
"list":[
{
"request":{
"msgId":"793198",
"transactionId":"x5aPmZ1N-2271",
"serviceId":8309,
"receiveDate":"10/08/2017 15:37:07",
"sender":"9053XXXXXXXX",
"type":"M",
"content":{
"type":0,
"message":"Tmp3"
}
},
"response":{
"composition":{
"list":[
{
"type":13,
"tmmType":4,
"tmmCarousel":{
"list":[
{
"title":"Enter title",
"description":"Enter description",
"image":{
"url":"https://timsac.turkcell.com.tr/scontent/p2p/14112016/11/P1e646f5c03a7b4b44f6da1329ac218e322da72356e79e5116dff86e3fc255a228.png",
"ratio":1.8658537
},
"buttonlist":[
{
"type":0,
"name":"Button-1",
"url":"https://www.bip.ai"
},
{
"type":1,
"name":"Button-2",
"payload":"Payload-Button-2"
}
]
},
{
"title":"Enter title",
"description":"Enter description",
"image":{
"url":"https://timsac.turkcell.com.tr/scontent/p2p/14112016/11/P1e646f5c03a7b4b44f6da1329ac218e322da72356e79e5116dff86e3fc255a228.png",
"ratio":1.8658537
},
"buttonlist":[
{
"type":0,
"name":"Button-3",
"url":"https://www.bip.ai"
},
{
"type":1,
"name":"Button-4",
"payload":"Payload-Button-4"
}
]
}
],
"postbackid":"@carouselPostbackCRS10@83099053045500001502368627642__#TX#"
}
}
]
}
}
}
]
}
{
"list":[
{
"request":{
"msgId":"793200",
"transactionId":"x5aPmZ1N-2272",
"serviceId":8309,
"receiveDate":"10/08/2017 15:37:46",
"sender":"9053XXXXXXXX",
"type":"M",
"content":{
"type":103,
"tmmType":4,
"tmmPostbackResponse":{
"payload":"Payload-Button-2",
"postbackid":"@carouselPostbackCRS10@83099053045500001502368627642__#TX#"
}
}
}
}
]
}
{
"list":[
{
"request":{
"msgId":"793219",
"transactionId":"x5aPmZ1N-2296",
"serviceId":8309,
"receiveDate":"10/08/2017 15:46:09",
"sender":"9053XXXXXXXX",
"type":"M",
"content":{
"type":0,
"message":"Tmp4"
}
},
"response":{
"composition":{
"list":[
{
"type":13,
"tmmType":3,
"tmmQuickReply":{
"buttonlist":[
{
"type":1,
"name":"Button-1",
"payload":"Payload-Button-1"
},
{
"type":1,
"name":"Button-2",
"payload":"Payload-Button-2"
}
],
"postbackid":"@qreplyPostbackQR100@83099053045500001502369169896__#TX#"
}
}
]
}
}
}
]
}
{
"list":[
{
"request":{
"msgId":"793220",
"transactionId":"x5aPmZ1N-2298",
"serviceId":8309,
"receiveDate":"10/08/2017 15:46:36",
"sender":"9053XXXXXXXX",
"type":"M",
"content":{
"type":103,
"tmmType":3,
"tmmPostbackResponse":{
"payload":"Payload-Button-2",
"postbackid":"@qreplyPostbackQR100@83099053045500001502369169896__#TX#"
}
}
}
}
]
}
{
"list":[
{
"request":{
"msgId":"793226",
"transactionId":"x5aPmZ1N-2331",
"serviceId":8309,
"receiveDate":"10/08/2017 15:54:17",
"sender":"9053XXXXXXXX",
"type":"M",
"content":{
"type":0,
"message":"Tmp6"
}
},
"response":{
"composition":{
"list":[
{
"type":13,
"tmmType":2,
"tmmPoll":{
"title":"Enter title",
"description":"Enter description",
"image":{
"url":"https://timsac.turkcell.com.tr/scontent/p2p/14112016/11/P1e646f5c03a7b4b44f6da1329ac218e322da72356e79e5116dff86e3fc255a228.png",
"ratio":1.8658537
},
"polltype":1,
"pollid":"@pollPollPM100@83099053045500001502369657479__#TX#",
"pollendtime":"16.08.2017 14:36:50.116 +0000",
"optionlist":[
{
"optionid":4,
"name":"option-1"
},
{
"optionid":1,
"name":"option-2"
},
{
"optionid":2,
"name":"option-3"
},
{
"optionid":3,
"name":"option-4"
}
],
"buttonname":"Button-1"
}
}
]
}
}
}
]
}
{
"list":[
{
"request":{
"msgId":"793227",
"transactionId":"x5aPmZ1N-2332",
"serviceId":8309,
"receiveDate":"10/08/2017 15:54:43",
"sender":"9053XXXXXXXX",
"type":"M",
"content":{
"type":104,
"tmmType":2,
"tmmPollResponse":{
"pollid":"@pollPollPM100@83099053045500001502369657479__#TX#",
"optionids":[
1,
3
]
}
}
}
}
]
}
{
"list":[
{
"request":{
"msgId":"793224",
"transactionId":"x5aPmZ1N-2322",
"serviceId":8309,
"receiveDate":"10/08/2017 15:52:31",
"sender":"9053XXXXXXXX",
"type":"M",
"content":{
"type":0,
"message":"Tmp5"
}
},
"response":{
"composition":{
"list":[
{
"type":13,
"tmmType":2,
"tmmPoll":{
"title":"Enter title",
"description":"Enter description",
"image":{
"url":"https://timsac.turkcell.com.tr/scontent/p2p/14112016/11/P1e646f5c03a7b4b44f6da1329ac218e322da72356e79e5116dff86e3fc255a228.png",
"ratio":1.8658537
},
"polltype":0,
"pollid":"@pollPollPS100@83099053045500001502369551979__#TX#",
"pollendtime":"16.08.2017 14:36:50.116 +0000",
"optionlist":[
{
"optionid":4,
"name":"option-1"
},
{
"optionid":1,
"name":"option-2"
},
{
"optionid":2,
"name":"option-3"
},
{
"optionid":3,
"name":"option-4"
}
],
"buttonname":"Button-1"
}
}
]
}
}
}
]
}
{
"list":[
{
"request":{
"msgId":"793225",
"transactionId":"x5aPmZ1N-2323",
"serviceId":8309,
"receiveDate":"10/08/2017 15:52:58",
"sender":"9053XXXXXXXX",
"type":"M",
"content":{
"type":104,
"tmmType":2,
"tmmPollResponse":{
"pollid":"@pollPollPS100@83099053045500001502369551979__#TX#",
"optionids":[
3
]
}
}
}
}
]
}