创建每周计划
- 接口功能
创建每周计划,不生效,需要再开启计划;
同一时间,一个智能锁只允许被一个用户操作;
- 请求地址
https://open.ys7.com/api/component/saas/smartlock/openplan/week/add
- 请求方式
POST
- 参数列表
参数名 | 类型 | 描述 | 是否必填 |
---|---|---|---|
accessToken | String | 开放平台授权获取的访问令牌 | Y |
planName | String | 计划名称 | Y |
deviceSerial | String | 智能锁序列号 | Y |
weekDay | String | 周几(1~7) | Y |
timePairEntityList | Object[] | 计划时间段列表 | Y |
timePairEntityList[i].beginTime | Time | 时间段开始时间(HH:ss:mm) | Y |
timePairEntityList[i].endTime | Time | 时间段结束时间(HH:ss:mm) | Y |
- 请求报文
POST https://open.ys7.com/api/component/saas/smartlock/openplan/week/add HTTP/1.1
Host: open.ys7.com
content-type: application/x-www-form-urlencoded
accessToken=at.0l99iqik8zwycxie3pn74on632amm7py-3d448c4jz3-1pkjlze-zpjbs9x5d&deviceSerial=K43763512&planName=adsvc&weekDay=6&timePairEntityList%5B0%5D.beginTime=00%3A00%3A00&timePairEntityList%5B0%5D.endTime=02%3A00%3A00
- 返回数据
{
"code": "200",
"msg": "操作成功",
"planId": "140"
}
- 参数说明
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
code | int | 状态码-200,表示通过云端校验,成功开始与设备交互; 权限是否下发成功请根据data中authorityStatus判断 |
Y |
msg | String | 具体错误描述信息 | Y |
planId | Long | 计划id | Y |