文档中心 > API类目 > 阿里健康随访

alibaba.alihealth.followup.send (随访IM发送会话)

随访IM发送会话

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
request1 ChickenImDialogCreateRequest 必须 服务入参
  • └ session_id
  • String
  • 必须
  • 78bfcced948a65d29c5c77f1cd3367a2
  • 会话ID
  • └ bterm_user_id
  • String
  • 可选
  • 2034131106552037
  • 医生ID或医生组ID
  • └ cterm_user_id
  • String
  • 可选
  • 5394977607673890
  • 就诊人ID
  • └ rs_type
  • String
  • 必须
  • 2
  • 谁发的
  • └ content
  • String
  • 必须
  • {"text":"abc"}
  • 内容
  • └ user_id
  • String
  • 可选
  • 153315451244705
  • 医生自己的id
auth_token String 可选 9eae09db243df99bd67af033decfd257 token用于安全验证

响应参数

名称 类型 示例值 描述
result1 Result 接口返回model
  • └ success
  • Boolean
  • false
  • 是否成功
  • └ msg_code
  • String
  • 1
  • msgCode
  • └ msg_info
  • String
  • 1
  • msgInfo
  • model
  • DialogVo
  • 134523^4351232
  • 将本次发送的内容重新返回给调用方
  • └ content_type
  • byte
  • 1
  • 内容格式
  • └ content
  • String
  • {}
  • 自己本次发送的会话内容
  • └ id
  • String
  • 1111111
  • 本次发送的数据id
  • └ time_stamp
  • String
  • 1111111
  • 本次发送的时间戳

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlihealthFollowupSendRequest req = new AlibabaAlihealthFollowupSendRequest();
AlibabaAlihealthFollowupSendRequest.ChickenImDialogCreateRequest obj1 = new AlibabaAlihealthFollowupSendRequest.ChickenImDialogCreateRequest();
obj1.setSessionId("78bfcced948a65d29c5c77f1cd3367a2");
obj1.setBtermUserId("2034131106552037");
obj1.setCtermUserId("5394977607673890");
obj1.setRsType("2");
obj1.setContent("{\"text\":\"abc\"}");
obj1.setUserId("153315451244705");
req.setRequest1(obj1);
req.setAuthToken("9eae09db243df99bd67af033decfd257");
AlibabaAlihealthFollowupSendResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alihealth_followup_send_response>
    <result1>
        <success>false</success>
        <msg_code>1</msg_code>
        <msg_info>1</msg_info>
        <model>
            <content_type>1</content_type>
            <content>{}</content>
            <id>1111111</id>
            <time_stamp>1111111</time_stamp>
        </model>
    </result1>
</alibaba_alihealth_followup_send_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部