- discard(废弃)
- demo(模板-参考示例)
- usmile-wx(微信)
- uc(用户统一中心)
- user-web(健康&设备&我的)
- bff-cloud
- iot-sevice(IOT平台)
- cloud-admin(运营后台)
上传用户报告结果及问题选项
POST
https://test.myusmile.online/user/scale/saveResult
请求参数
Header 参数
TOK
string
可选
默认值:
{{token}}
Body 参数application/json
deviceId
string
设备mac
score
integer
得分
healthIndex
integer
口腔健康指数
livingHabit
integer
生活习惯
dietaryHabit
integer
饮食习惯
nursingAwareness
integer
护理意识
nursingHabit
integer
护理习惯
oralDisease
integer
口腔疾病
nursingSuggestion
string
护理建议
recommendedMode
integer
推荐模式
status
integer
导入设备状态
detail
array[string]
各个选项的选择情况
示例
{
"deviceId": "aa:bb:cc:dd:55:ee",
"healthIndex": 12,
"livingHabit": 13,
"dietaryHabit": 14,
"nursingAwareness": 15,
"nursingHabit": 16,
"oralDisease": 17,
"nursingSuggestion": "sugg",
"recommendedMode": 18,
"status": 2,
"detail": [{
"questionCode": "qc1",
"optionCodeList": ["oc1"]
}, {
"questionCode": "qc2",
"optionCodeList": ["oc2", "oc3", "oc5"]
}, {
"questionCode": "qc1",
"optionCodeList": ["oc3"]
}]
}
示例代码
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://test.myusmile.online/user/scale/saveResult' \
--header 'TOK: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"deviceId": "aa:bb:cc:dd:55:ee",
"healthIndex": 12,
"livingHabit": 13,
"dietaryHabit": 14,
"nursingAwareness": 15,
"nursingHabit": 16,
"oralDisease": 17,
"nursingSuggestion": "sugg",
"recommendedMode": 18,
"status": 2,
"detail": [{
"questionCode": "qc1",
"optionCodeList": ["oc1"]
}, {
"questionCode": "qc2",
"optionCodeList": ["oc2", "oc3", "oc5"]
}, {
"questionCode": "qc1",
"optionCodeList": ["oc3"]
}]
}'
返回响应
🟢200成功
application/json
Body
flag
boolean
必需
code
integer
必需
message
null
必需
data
object
必需
id
integer
必需
desc
null
必需
示例
{
"flag": true,
"code": 0,
"message": null,
"data": {
"id": 0
},
"desc": null
}