打印机绑定


接口及参数

请求方式 POST
服务地址 https://open.sw-aiot.com/api/device/bindPrint
Content-Type application/json
Header token=d1d9d0b2992c99e56d9462607383c50f
参数字段 字段描述 类型 必须
devid 机器码 String
key 设备校验码 String
timeout 设备消息保留时间(设备故障修复后,设备将继续打印该时间内的消息,单位:s。建议设置120s以上,不超过1周604800s) int
pwidth 纸张宽度:mm。例:58、80、40 int
pheight 打印高度:mm。 int
nickname 设备名称(请使用文字、字母、_组合,不要使用其他特殊字符) String

示例:

返回参数

Content-Type application/json
参数字段 字段描述 类型
code 应答码:200成功,非200则失败 int
message 应答信息,应答码对应的描述 String
success 请求成功标志 Boolean
data 响应数据内容 Json

示例: