客户提交留言 (doLeaveMessage)
场景描述
用于提交用户的留言内容。用户接入座席侧失败后,调用该接口提交用户的留言信息
接口方法
POST
接口URI
https://域名/apiaccess/ccmessaging/doLeaveMessage,例如域名是service.besclouds.com
请求说明
|
序号 |
名称 |
参数类型 |
是否必选 |
说明 |
|---|---|---|---|---|
|
1 |
ccmessaging-token |
string |
True |
applyToken接口生成的ccmessagign-token |
|
2 |
x-app-key |
string |
True |
appKey字段,用户标识,在API Fabric工具上配置 |
|
3 |
Authorization |
string |
True |
鉴权字段,内容格式为: Bearer +tokenByAKSK接口的返回值中AccessToken(Bearer后有空格) |
|
序号 |
名称 |
参数类型 |
是否必选 |
说明 |
|---|---|---|---|---|
|
1.1 |
callId |
string |
True |
用户ID,取值范围:1到24位字符串。 |
|
1.2 |
caller |
string |
True |
留言号码 |
|
1.3 |
leaveMessage |
string |
True |
留言信息 |
|
1.4 |
channel |
string |
True |
渠道名称,WEB |
响应说明
- 响应状态码: 200
|
序号 |
名称 |
参数类型 |
说明 |
|---|---|---|---|
|
1.1 |
resultCode |
string |
响应返回码 |
|
1.2 |
resultDesc |
string |
响应返回描述。 如果resultCode返回0:无返回或Save leaveMessage success! 如果resultCode返回3:the leaveMessageParams is error. 如果resultCode返回13:Exception appeared!或Save leaveMessage failed! |
- 响应状态码: 400
错误的请求:请检查请求路径及参数。
- 响应状态码: 401
未授权:1.请确认是否购买了相关服务。2.请联系客服人员检查您账号的当前状态。
- 响应状态码: 404
请求的内容未找到:请检查请求的路径。
- 响应状态码: 500
业务失败:请依次确认您请求中各参数的取值。
错误码
无。
报文样例
请求头:
{
"ccmessaging-token": "eyJjcmVhdGV*************2hhbm5lbElkIjoiMjAyMTAyMTkzMTk2ODY5NzA4In0%3D",
"x-app-key": "ea5c29a3*************a3dbeb4c32c",
"Authorization": "Bearer 57042f*************968c4e0",
"Content-Type": "application/json"
}
请求参数:
{
"callId": "111111222111",
"caller": "138****7777",
"leaveMessage": "请回复电话",
"channel": "WEB"
}
响应参数:
{
"resultCode": "0",
"resultDesc": "Save leaveMessage success!"
}