文档
测试

11.1 设备心跳接口

POST
heartbeat

接口描述

设备心跳接口,每隔一定时间(如30秒),调用一次,以监测设备是否在线。

请求参数

参数名
类型
描述
必填
token
String
登录TOKEN
必填
appid
String
商户appid
必填
sn
String
设备序列号SN
必填

响应参数

参数名
类型
描述
必填
code
int
错误码,成功返回 200,失败返回其它
必填
message
String
错误描述
必填

说明 / 示例

### 请求示例 ``` https://api2.XXX.cn/cm/heartbeat?token=TOKEN&appid=jb25112e65f20e7dfe&sn=ADB1224 ``` ### 返回示例 #### 请求成功返回 ##### 业务成功返回 JSON ``` { "code": 200, "message": "success", } ``` #### 请求失败返回 ``` "code": 1502, "message": "business.error.netShopId.isnotExist", "data": "" } ``` ==business.error.netShopId.isnotExist== 商户appid不存在 ``` "code": 3301, "message": "business.error.auth.device.notFound", "data": "" } ``` ==business.error.auth.device.notFound== 设备不存在