临时密码添加
- 接口功能
添加智能锁临时密码,单个锁最大支持5组临时密码
- 请求地址
https://open.ys7.com/api/component/saas/smartlock/tmppwd/add
- 请求方式
POST
- 参数列表
参数名 | 类型 | 描述 | 是否必填 |
---|---|---|---|
accessToken | String | 开放平台授权获取的访问令牌 | Y |
deviceSerial | String | 智能锁序列号 | Y |
tmpPwdEnable | String | 临时密码是否使能(0-不使能;1-使能) | Y |
userName | String | 用户名 | Y |
beginTime | String | 卡效期起始时间 | Y |
endTime | String | 卡效期结束时间 | Y |
tmpPwd | String | 临时密码(6位数字,使用时须先在锁上输入67#) | Y |
tmpPwdNum | String | 使用次数 | Y |
- 请求报文
POST https://open.ys7.com/api/component/saas/smartlock/tmppwd/add HTTP/1.1
Host: open.ys7.com
content-type: application/x-www-form-urlencoded
accessToken=at.axk5tx9j6y2pkjnacqzz461x7qyy7oej-837w5x8x8a-1qwxmsq-goctoffs8&deviceSerial=C74528358&tmpPwdEnable=1
&userName=YY&beginTime=2018-11-25%2008%3A30%3A00&endTime=2020-11-25%2008%3A30%3A00&tmpPwd=444459&tmpPwdNum=100
- 返回数据
{
"code": "200",
"data": {
"tmpPwdIndex": "1"
},
"msg": "操作成功"
}
- 参数说明
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
code | int | 状态码-200,表示成功 | Y |
msg | String | 具体错误描述信息 | Y |
data | object | 业务结果 | Y |
data.tmpPwdIndex | String | 下发的临时密码索引 | Y |