- 首页
- 公共分类
- 消息
- 个人中心
- 聊天对话
- 订单通用接口
- 找医生、极速问诊、开药问诊
- 医生客户端接口
- 药品订单
聊天-接收对话信息
开发中
POST
/receiveChatMsg
聊天对话
当前事件为客户端接收聊天信息,定义的返回数据就是聊天信息返回的内容
请求参数
Header 参数
Content-Type
string
必需
示例值:
application/json
authorization
string
可选
示例值:
{{Btoken}}
Body 参数application/json
object {0}
示例
{}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://consult-api.itheima.net/receiveChatMsg' \
--header 'Content-Type: application/json' \
--data-raw ''
返回响应
🟢200成功
application/json
Body
id
string
聊天消息id
from
string
发送人
fromAvatar
string
发送人头像
to
string
接收人
toAvatar
string
接收人头像
msgType
number
必需
21卡片-患者病情 22卡片-处方信息 23未提交评价24已提交评价
31通知-普通通知(白底黑色)32通知-温馨提示33通知-订单取消(灰色底黑字)4图片
createTime
string
发送时间
msg
object
可选
consultRecord
object
可选
prescription
object
可选
content
string
可选
picture
object
msgType为4
evaluateDoc
object
可选
示例
{
"id": "string",
"from": "string",
"fromAvatar": "string",
"to": "string",
"toAvatar": "string",
"msgType": 0,
"createTime": "string",
"msg": {
"consultRecord": {
"id": "string",
"orderNo": "string",
"type": 0,
"createTime": "string",
"illnessDesc": "string",
"illnessTime": 0,
"consultFlag": 0,
"liverFunction": 0,
"renalFunction": 0,
"allergicHistory": 0,
"fertilityStatus": 0,
"pictures": [
{
"id": "string",
"url": "string"
}
],
"patientInfo": {
"id": "string",
"name": "string",
"idCard": "string",
"gender": 0,
"genderValue": "string",
"age": "string"
},
"medicines": [
{
"id": "string",
"name": "string",
"specs": "string",
"usageDosag": "string",
"quantity": 0
}
]
},
"prescription": {
"id": "string",
"createTime": "string",
"name": "string",
"recordId": "string",
"gender": 0,
"genderValue": "string",
"age": 0,
"diagnosis": "string",
"status": 1,
"medicines": [
{
"id": "string",
"name": "string",
"amount": "string",
"avatar": "string",
"specs": "string",
"usageDosag": "string",
"prescriptionFlag": 0,
"quantity": 0
}
],
"orderId": "string"
},
"content": "string",
"picture": {
"id": "string",
"url": "string"
},
"evaluateDoc": {
"id": "string",
"score": 0,
"content": "string",
"createTime": "string",
"creator": "string"
}
}
}
修改于 2024-03-30 02:12:44