跳到主要内容

检查固件更新

检查当前设备固件是否有可用更新,若需更新则返回固件下载链接。

信息

本接口无需签名验证,属于设备接入前的初始化接口。

请求接口

POST /open/cashier/check/update

请求参数

参数必填类型说明
client_infoObject客户端信息
versionString当前固件版本

client_info 结构

参数必填类型说明
snString设备序列号
nameString设备名称
ipString设备IP
appString应用标识
versionString应用版本

响应参数

参数类型说明
need_updateBoolean是否需要更新
download_urlString固件下载链接

请求示例

{
"client_info": {
"sn": "SN-DEVICE-001",
"name": "收银台A01",
"ip": "192.168.1.100",
"app": "cashier-pos",
"version": "2.0.0"
},
"version": "2.0.0"
}

响应示例

无需更新

{
"code": 0,
"msg": "success",
"data": {
"need_update": false,
"download_url": ""
}
}

需要更新

{
"code": 0,
"msg": "success",
"data": {
"need_update": true,
"download_url": "https://download.example.com/firmware/cashier-pos-2.1.0.bin"
}
}