添加设备并绑定老人


HTTP方法


POST

HTTP URL

/v1/device/add

Header参数


  • Content-Type采用 application/json
  • 认证相关头字段,请参考wsse认证

Body数据


参数 类型 必需 描述
deviceId string 设备Id 只允许填入字母、数字、字母数字组合
deviceName string 设备名称
network string 设备网络类型
deviceType string 设备类型
deviceManufacturer string 第三方接入取值请咨询哈哈云运营人员
deviceBelongs string 设备所属 1-老人, 2-机构, 默认为 1
identityNo string 老人身份证号 (传此参数代表添加设备的同时绑定该老人)
customerId string 设备绑定老人的唯一Id(传此参数代表添加设备的同时绑定该老人)

: identityNo 和 customerId 不能均不传


设备网络类型

取值 定义
0 4G
1 Wifi
2 GPRS
3 NB-IoT

设备类型

取值 定义
1 智能网关
2 智能手表/手环
3 燃气探测器
4 水浸探测器
5 无线呼叫器
6 门磁传感器
7 红外传感器
8 烟感探测器
9 拉线报警器
10 智能床垫
11 门铃
12 一氧化碳报警器
13 智能枕头
14 睡眠带
15 考勤机
16 摄像头
17 睡眠监测仪
18 跌倒检测仪
19 客流统计设备
20 随诊包
21 智能工卡
22 天猫精灵
23 小度
24 血压血糖仪
25 电力脉象仪
26 sos语音呼叫器
27 水流拉线报警器
28 AI跌倒检测仪
29 度目盒子
30 中控屏
31 水表
32 心电

请求示例

{
    "deviceId": "DY09013455", 
    "deviceName": "测试设备", 
    "deviceType": "1",
    "deviceManufacturer": "1", 
    "identityNo":"320102195703076892"
}

HTTP响应


参数 类型 描述
code int 状态码,0为成功,非0为失败
message string 对于状态码的简单描述

正常响应

{
    "code": 0,
    "message": "Success"
}

异常响应

新增设备异常,设备ID不能为空

{
    "code": 312007,
    "message": "设备ID不能为空"
}

新增设备异常,该设备ID已存在

{
    "code": 312008,
    "message": "新增设备异常,该设备ID已存在"
}

新增设备异常,设备类型不能为空

{
    "code": 312009,
    "message": "新增设备异常,设备类型不能为空"
}

新增设备异常,设备厂商不能为空

{
    "code": 312010,
    "message": "新增设备异常,设备厂商不能为空"
}

新增设备异常,customerId或身份证号对应老人不存在

{
    "code": 312011,
    "message": "对应老人不存在"
}

新增设备异常,设备厂商类型不存在

{
    "code": 312014,
    "message": "新增设备异常,设备厂商类型不存在"
}

新增设备异常,设备类型不存在

{
    "code": 312015,
    "message": "新增设备异常,设备类型不存在"
}

身份信息不能为空,identityNo 和 customerId 不能均为空

{
    "code": 312017,
    "message": "身份信息不能为空"
}

results matching ""

    No results matching ""