差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 | 后一修订版 两侧同时换到之后的修订记录 | ||
cs:400systemintegration:api-open-platform [2019/06/25 12:22] tinychang [查询坐席信息] |
cs:400systemintegration:api-open-platform [2019/06/27 03:35] tinychang [获取历史会话列表] |
||
---|---|---|---|
行 807: | 行 807: | ||
| enquiryTagNames | String | 满意度评价标签的名字 | | | enquiryTagNames | String | 满意度评价标签的名字 | | ||
| summarysDetail | String | 会话小结文本内容 | | | summarysDetail | String | 会话小结文本内容 | | ||
+ | |||
+ | ==== 获取历史会话详情 ==== | ||
+ | |||
+ | 根据会话ID查询历史会话详情。 | ||
+ | |||
+ | * Path: http://kefu.easemob.com/api/platform/tenants/{tenantId}/servicesessions/{sessionServiceId}/messages | ||
+ | * HTTP Method: GET | ||
+ | * Request Headers: Kefu-Token=${accessToken} | ||
+ | * 可能的错误码:详见:[[#错误码说明|错误码说明]] | ||
+ | |||
+ | **Curl示例:** | ||
+ | |||
+ | <code php> | ||
+ | curl --request GET \ | ||
+ | --url 'http://kefu.easemob.com/tenants/8019/servicesessions/05303239-dd9e-4afe-bf69-92469da17612/messages?page=0&size=10&_=1561514960554' \ | ||
+ | --header 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | ||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^是否非空(Y:是;N:否)^说明^ | ||
+ | |Kefu-Token| String |Y|调用接口的accessToken| | ||
+ | |tenantId|int|Y|租户ID| | ||
+ | |sessionServiceId|String|N|会话ID| | ||
+ | |page|int|N|查询页码索引,默认为0| | ||
+ | |size|int|N|每页显示的数据容量,默认为10,最大为50| | ||
+ | |||
+ | |||
+ | **Response示例:** | ||
+ | |||
+ | <code json> | ||
+ | { | ||
+ | "status": "OK", | ||
+ | "entities": [ | ||
+ | { | ||
+ | "msgId": "332d6236-df15-46e9-b4e8-7b797351264b", | ||
+ | "tenantId": 55899, | ||
+ | "chatGroupId": 118488700, | ||
+ | "sessionServiceId": "f109dbe1-bf97-4562-9627-8acb30957181", | ||
+ | "messageType": "ChatMessage", | ||
+ | "fromUser": { | ||
+ | "tenantId": 0, | ||
+ | "userId": "_2", | ||
+ | "userType": "Scheduler", | ||
+ | "userScope": "Tenant", | ||
+ | "nicename": "调度员", | ||
+ | "scope": "Tenant", | ||
+ | "bizId": "0", | ||
+ | "status": "Disable", | ||
+ | "roles": "" | ||
+ | }, | ||
+ | "contentType": "application/easemob-msg", | ||
+ | "body": { | ||
+ | "bodies": [ | ||
+ | { | ||
+ | "action": "ServiceSessionClosedEvent", | ||
+ | "type": "cmd" | ||
+ | } | ||
+ | ], | ||
+ | "ext": { | ||
+ | "weichat": { | ||
+ | "msgId": "332d6236-df15-46e9-b4e8-7b797351264b", | ||
+ | "originType": "webim", | ||
+ | "agent": {}, | ||
+ | "queueId": 95953, | ||
+ | "queueName": "售前", | ||
+ | "event": { | ||
+ | "eventName": "ServiceSessionClosedEvent" | ||
+ | }, | ||
+ | "service_session": { | ||
+ | "serviceSessionId": "f109dbe1-bf97-4562-9627-8acb30957181", | ||
+ | "robotId": 0, | ||
+ | "state": "Terminal", | ||
+ | "messageSeqId": 4, | ||
+ | "agentUserId": "56a353b5-453b-4ecb-a3c3-4bf0f00e24b9", | ||
+ | "agentUserType": 1, | ||
+ | "expire": false | ||
+ | }, | ||
+ | "official_account": { | ||
+ | "official_account_id": "da4f72df-e405-486d-b153-cf7b203b6769", | ||
+ | "name": "个人-7", | ||
+ | "type": "SYSTEM", | ||
+ | "img": "//kefu.easemob.com/v1/tenants/55899/mediafiles/c08adf10-b217-4b81-95ca-1f8345e4d6186ZSu55uYLmpwZw==/cutout?arg=699_291_1865_1865_300_300", | ||
+ | "schedule_info": {} | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | "from": "调度员", | ||
+ | "to": "webim-visitor-KTTG7XMBG9P482C93HCP", | ||
+ | "channelType": "easemob", | ||
+ | "timestamp": 1556174648179, | ||
+ | "tenantId": 55899, | ||
+ | "visitorUserId": "94a6efed-38d1-45cd-a784-41e94df55186", | ||
+ | "originType": "webim", | ||
+ | "channel_id": 81029 | ||
+ | }, | ||
+ | "chatGroupSeqId": 55, | ||
+ | "sessionServiceSeqId": 0, | ||
+ | "createDateTime": 1556174648179, | ||
+ | "timestamp": 1559133258854, | ||
+ | "createMicroTimestamp": 1556174648179000 | ||
+ | }, | ||
+ | { | ||
+ | "msgId": "9b9bcb78-e257-46bd-bddc-df271af229db", | ||
+ | "tenantId": 55899, | ||
+ | "chatGroupId": 118488700, | ||
+ | "sessionServiceId": "f109dbe1-bf97-4562-9627-8acb30957181", | ||
+ | "messageType": "ChatMessage", | ||
+ | "fromUser": { | ||
+ | "tenantId": 0, | ||
+ | "userId": "_2", | ||
+ | "userType": "Scheduler", | ||
+ | "userScope": "Tenant", | ||
+ | "nicename": "调度员", | ||
+ | "scope": "Tenant", | ||
+ | "bizId": "0", | ||
+ | "status": "Disable", | ||
+ | "roles": "" | ||
+ | }, | ||
+ | "contentType": "application/easemob-msg", | ||
+ | "body": { | ||
+ | "bodies": [ | ||
+ | { | ||
+ | "action": "ServiceSessionOpenedEvent", | ||
+ | "type": "cmd" | ||
+ | } | ||
+ | ], | ||
+ | "ext": { | ||
+ | "weichat": { | ||
+ | "msgId": "9b9bcb78-e257-46bd-bddc-df271af229db", | ||
+ | "originType": "webim", | ||
+ | "agent": {}, | ||
+ | "queueId": 95953, | ||
+ | "queueName": "售前", | ||
+ | "event": { | ||
+ | "eventName": "ServiceSessionOpenedEvent", | ||
+ | "eventObj": { | ||
+ | "userId": "56a353b5-453b-4ecb-a3c3-4bf0f00e24b9", | ||
+ | "agentUserNiceName": "xu8", | ||
+ | "agentType": 1, | ||
+ | "sessionId": "f109dbe1-bf97-4562-9627-8acb30957181" | ||
+ | } | ||
+ | }, | ||
+ | "service_session": { | ||
+ | "serviceSessionId": "f109dbe1-bf97-4562-9627-8acb30957181", | ||
+ | "robotId": 0, | ||
+ | "state": "Processing", | ||
+ | "messageSeqId": 3, | ||
+ | "agentUserId": "56a353b5-453b-4ecb-a3c3-4bf0f00e24b9", | ||
+ | "agentUserType": 1, | ||
+ | "expire": false | ||
+ | }, | ||
+ | "official_account": { | ||
+ | "official_account_id": "da4f72df-e405-486d-b153-cf7b203b6769", | ||
+ | "name": "个人-7", | ||
+ | "type": "SYSTEM", | ||
+ | "img": "//kefu.easemob.com/v1/tenants/55899/mediafiles/c08adf10-b217-4b81-95ca-1f8345e4d6186ZSu55uYLmpwZw==/cutout?arg=699_291_1865_1865_300_300", | ||
+ | "schedule_info": {} | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | "from": "调度员", | ||
+ | "to": "webim-visitor-KTTG7XMBG9P482C93HCP", | ||
+ | "channelType": "easemob", | ||
+ | "timestamp": 1556174639110, | ||
+ | "tenantId": 55899, | ||
+ | "visitorUserId": "94a6efed-38d1-45cd-a784-41e94df55186", | ||
+ | "originType": "webim", | ||
+ | "channel_id": 81029 | ||
+ | }, | ||
+ | "chatGroupSeqId": 54, | ||
+ | "sessionServiceSeqId": 0, | ||
+ | "createDateTime": 1556174639110, | ||
+ | "timestamp": 1559133258854, | ||
+ | "createMicroTimestamp": 1556174639110000 | ||
+ | }, | ||
+ | { | ||
+ | "msgId": "aa4ab60b-5534-4327-bc58-8b8064b925cb", | ||
+ | "tenantId": 55899, | ||
+ | "chatGroupId": 118488700, | ||
+ | "sessionServiceId": "f109dbe1-bf97-4562-9627-8acb30957181", | ||
+ | "messageType": "ChatMessage", | ||
+ | "fromUser": { | ||
+ | "tenantId": 0, | ||
+ | "userId": "_2", | ||
+ | "userType": "Scheduler", | ||
+ | "userScope": "Tenant", | ||
+ | "nicename": "调度员", | ||
+ | "scope": "Tenant", | ||
+ | "bizId": "0", | ||
+ | "status": "Disable", | ||
+ | "roles": "" | ||
+ | }, | ||
+ | "contentType": "application/easemob-msg", | ||
+ | "body": { | ||
+ | "bodies": [ | ||
+ | { | ||
+ | "action": "ServiceSessionCreatedEvent", | ||
+ | "type": "cmd" | ||
+ | } | ||
+ | ], | ||
+ | "ext": { | ||
+ | "weichat": { | ||
+ | "msgId": "aa4ab60b-5534-4327-bc58-8b8064b925cb", | ||
+ | "originType": "webim", | ||
+ | "agent": {}, | ||
+ | "queueId": 95953, | ||
+ | "queueName": "售前", | ||
+ | "event": { | ||
+ | "eventName": "ServiceSessionCreatedEvent", | ||
+ | "eventObj": { | ||
+ | "sessionId": "f109dbe1-bf97-4562-9627-8acb30957181" | ||
+ | } | ||
+ | }, | ||
+ | "service_session": { | ||
+ | "serviceSessionId": "f109dbe1-bf97-4562-9627-8acb30957181", | ||
+ | "robotId": 0, | ||
+ | "state": "Processing", | ||
+ | "messageSeqId": 2, | ||
+ | "agentUserId": "56a353b5-453b-4ecb-a3c3-4bf0f00e24b9", | ||
+ | "agentUserType": 1, | ||
+ | "expire": false | ||
+ | }, | ||
+ | "official_account": { | ||
+ | "official_account_id": "da4f72df-e405-486d-b153-cf7b203b6769", | ||
+ | "name": "个人-7", | ||
+ | "type": "SYSTEM", | ||
+ | "img": "//kefu.easemob.com/v1/tenants/55899/mediafiles/c08adf10-b217-4b81-95ca-1f8345e4d6186ZSu55uYLmpwZw==/cutout?arg=699_291_1865_1865_300_300", | ||
+ | "schedule_info": {} | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | "from": "调度员", | ||
+ | "to": "webim-visitor-KTTG7XMBG9P482C93HCP", | ||
+ | "channelType": "easemob", | ||
+ | "timestamp": 1556174638984, | ||
+ | "tenantId": 55899, | ||
+ | "visitorUserId": "94a6efed-38d1-45cd-a784-41e94df55186", | ||
+ | "originType": "webim", | ||
+ | "channel_id": 81029 | ||
+ | }, | ||
+ | "chatGroupSeqId": 53, | ||
+ | "sessionServiceSeqId": 0, | ||
+ | "createDateTime": 1556174638984, | ||
+ | "timestamp": 1559133258854, | ||
+ | "createMicroTimestamp": 1556174638984000 | ||
+ | }, | ||
+ | { | ||
+ | "msgId": "44b5e9fe-40eb-42ed-b93b-6545404ddb74", | ||
+ | "tenantId": 55899, | ||
+ | "chatGroupId": 118488700, | ||
+ | "sessionServiceId": "f109dbe1-bf97-4562-9627-8acb30957181", | ||
+ | "messageType": "ChatMessage", | ||
+ | "fromUser": { | ||
+ | "tenantId": 0, | ||
+ | "userId": "_2", | ||
+ | "userType": "Scheduler", | ||
+ | "userScope": "Tenant", | ||
+ | "nicename": "调度员", | ||
+ | "scope": "Tenant", | ||
+ | "bizId": "0", | ||
+ | "status": "Disable", | ||
+ | "roles": "" | ||
+ | }, | ||
+ | "contentType": "application/easemob-msg", | ||
+ | "body": { | ||
+ | "bodies": [ | ||
+ | { | ||
+ | "msg": "您好,有什么可以帮助您的吗?", | ||
+ | "type": "txt" | ||
+ | } | ||
+ | ], | ||
+ | "ext": { | ||
+ | "weichat": { | ||
+ | "msgId": "44b5e9fe-40eb-42ed-b93b-6545404ddb74", | ||
+ | "originType": "webim", | ||
+ | "visitor": null, | ||
+ | "agent": { | ||
+ | "avatar": null, | ||
+ | "userNickname": null | ||
+ | }, | ||
+ | "queueId": 95953, | ||
+ | "queueName": "售前", | ||
+ | "agentUsername": null, | ||
+ | "ctrlType": null, | ||
+ | "ctrlArgs": null, | ||
+ | "event": null, | ||
+ | "metadata": null, | ||
+ | "callcenter": null, | ||
+ | "language": "zh-CN", | ||
+ | "marketing": null, | ||
+ | "service_session": { | ||
+ | "serviceSessionId": "f109dbe1-bf97-4562-9627-8acb30957181", | ||
+ | "robotId": 0, | ||
+ | "state": "Processing", | ||
+ | "messageSeqId": 1, | ||
+ | "agentUserId": "56a353b5-453b-4ecb-a3c3-4bf0f00e24b9", | ||
+ | "agentUserType": 1, | ||
+ | "expire": false | ||
+ | }, | ||
+ | "html_safe_body": { | ||
+ | "type": "txt", | ||
+ | "msg": "您好,有什么可以帮助您的吗?" | ||
+ | }, | ||
+ | "msg_id_for_ack": "94086d60-e8dc-45db-94ae-f96087bb1f1d", | ||
+ | "ack_for_msg_id": null, | ||
+ | "recall_flag": null, | ||
+ | "recall_msg_id": null, | ||
+ | "official_account": { | ||
+ | "official_account_id": "da4f72df-e405-486d-b153-cf7b203b6769", | ||
+ | "name": "个人-7", | ||
+ | "type": "SYSTEM", | ||
+ | "img": "//kefu.easemob.com/v1/tenants/55899/mediafiles/c08adf10-b217-4b81-95ca-1f8345e4d6186ZSu55uYLmpwZw==/cutout?arg=699_291_1865_1865_300_300", | ||
+ | "schedule_info": {} | ||
+ | }, | ||
+ | "reserve_queue": null, | ||
+ | "match_flag": null | ||
+ | } | ||
+ | }, | ||
+ | "from": "调度员", | ||
+ | "to": "webim-visitor-KTTG7XMBG9P482C93HCP", | ||
+ | "channelType": "easemob", | ||
+ | "timestamp": 1556174638854, | ||
+ | "tenantId": 55899, | ||
+ | "visitorUserId": "94a6efed-38d1-45cd-a784-41e94df55186", | ||
+ | "originType": "webim", | ||
+ | "channel_id": 81029 | ||
+ | }, | ||
+ | "chatGroupSeqId": 52, | ||
+ | "sessionServiceSeqId": 0, | ||
+ | "createDateTime": 1556174638854, | ||
+ | "timestamp": 1559133258854, | ||
+ | "createMicroTimestamp": 1556174638854000 | ||
+ | }, | ||
+ | { | ||
+ | "msgId": "45159d25-68ce-4b91-84f1-8e9fb918d0fb", | ||
+ | "tenantId": 55899, | ||
+ | "chatGroupId": 118488700, | ||
+ | "sessionServiceId": "f109dbe1-bf97-4562-9627-8acb30957181", | ||
+ | "messageType": "ChatMessage", | ||
+ | "fromUser": { | ||
+ | "tenantId": 0, | ||
+ | "userId": "94a6efed-38d1-45cd-a784-41e94df55186", | ||
+ | "userType": "Visitor", | ||
+ | "userScope": "Tenant", | ||
+ | "nicename": "webim-visitor-KTTG7XMBG9P482C93HCP", | ||
+ | "scope": "Tenant", | ||
+ | "bizId": "0", | ||
+ | "status": "Disable", | ||
+ | "roles": "" | ||
+ | }, | ||
+ | "contentType": "application/easemob-msg", | ||
+ | "body": { | ||
+ | "bodies": [ | ||
+ | { | ||
+ | "msg": "cdasc", | ||
+ | "type": "txt" | ||
+ | } | ||
+ | ], | ||
+ | "ext": { | ||
+ | "weichat": { | ||
+ | "msgId": "45159d25-68ce-4b91-84f1-8e9fb918d0fb", | ||
+ | "originType": "webim", | ||
+ | "visitor": null, | ||
+ | "agent": null, | ||
+ | "queueId": null, | ||
+ | "queueName": null, | ||
+ | "agentUsername": null, | ||
+ | "ctrlType": null, | ||
+ | "ctrlArgs": null, | ||
+ | "event": null, | ||
+ | "metadata": null, | ||
+ | "callcenter": null, | ||
+ | "language": "zh-CN", | ||
+ | "marketing": null, | ||
+ | "service_session": null, | ||
+ | "html_safe_body": { | ||
+ | "type": "txt", | ||
+ | "msg": "cdasc" | ||
+ | }, | ||
+ | "msg_id_for_ack": "94086d60-e8dc-45db-94ae-f96087bb1f1d", | ||
+ | "ack_for_msg_id": null, | ||
+ | "recall_flag": null, | ||
+ | "recall_msg_id": null, | ||
+ | "official_account": { | ||
+ | "official_account_id": "da4f72df-e405-486d-b153-cf7b203b6769", | ||
+ | "name": "个人-7", | ||
+ | "type": "SYSTEM", | ||
+ | "img": "//kefu.easemob.com/v1/tenants/55899/mediafiles/c08adf10-b217-4b81-95ca-1f8345e4d6186ZSu55uYLmpwZw==/cutout?arg=699_291_1865_1865_300_300", | ||
+ | "schedule_info": {} | ||
+ | }, | ||
+ | "reserve_queue": null, | ||
+ | "match_flag": null | ||
+ | } | ||
+ | }, | ||
+ | "from": "webim-visitor-KTTG7XMBG9P482C93HCP", | ||
+ | "to": "169704", | ||
+ | "channelType": "easemob", | ||
+ | "timestamp": 1556174638385, | ||
+ | "tenantId": 55899, | ||
+ | "serviceSessionId": "f109dbe1-bf97-4562-9627-8acb30957181", | ||
+ | "visitorUserId": "94a6efed-38d1-45cd-a784-41e94df55186", | ||
+ | "originType": "webim", | ||
+ | "to_jid": "experience-kefu#sandbox_169704@easemob.com", | ||
+ | "msg_id": "595324722682528396", | ||
+ | "channel_id": 81029, | ||
+ | "channel_name": "体验关联" | ||
+ | }, | ||
+ | "chatGroupSeqId": 51, | ||
+ | "sessionServiceSeqId": 0, | ||
+ | "createDateTime": 1556174638745, | ||
+ | "timestamp": 1559133258854, | ||
+ | "createMicroTimestamp": 1556174638745000 | ||
+ | } | ||
+ | ], | ||
+ | "first": true, | ||
+ | "last": true, | ||
+ | "size": 10, | ||
+ | "number": 0, | ||
+ | "numberOfElements": 5, | ||
+ | "totalPages": 1, | ||
+ | "totalElements": 5 | ||
+ | } | ||
+ | </code> | ||
===== 错误码说明 ===== | ===== 错误码说明 ===== |