获取常开计划列表
- 接口功能
常开计划列表;
同一时间,一个智能锁只允许被一个用户操作;
- 请求地址
https://open.ys7.com/api/component/saas/smartlock/openplan/list
- 请求方式
POST
- 参数列表
参数名 | 类型 | 描述 | 是否必填 |
---|---|---|---|
accessToken | String | 开放平台授权获取的访问令牌 | Y |
planId | Long | 计划id | N |
deviceSerial | String | 智能锁序列号 | Y |
- 请求报文
POST https://open.ys7.com/api/component/saas/smartlock/openplan/list HTTP/1.1
Host: open.ys7.com
content-type: application/x-www-form-urlencoded
accessToken=at.0l99iqik8zwycxie3pn74on632amm7py-3d448c4jz3-1pkjlze-zpjbs9x5d&deviceSerial=K43763512&planId=1
- 返回数据
{
"code": "200",
"data": [
{
"deviceSerial": "K43763512",
"holidayChannel": "1",
"isDelete": "0",
"isPlanHas": 0,
"planBegin": "2023-02-27 00:00:00",
"planEnd": "2023-02-28 23:59:59",
"planId": "137",
"planName": "计划1",
"planStatus": "1",
"planStyle": "2",
"saasCompanyId": "985",
"synchroStatus": 1,
"timePairEntityList": [
{
"beginTime": "00:00:00",
"endTime": "23:55:59",
"id": "487",
"planId": "137"
}
],
"weekDay": "1"
},
{
"deviceSerial": "K43763512",
"holidayChannel": "0",
"isDelete": "0",
"isPlanHas": 0,
"planId": "138",
"planName": "杨航的周计划",
"planStatus": "0",
"planStyle": "1",
"saasCompanyId": "985",
"synchroStatus": 1,
"timePairEntityList": [
{
"beginTime": "21:00:00",
"endTime": "01:00:00",
"id": "488",
"planId": "138"
}
],
"weekDay": "4"
},
{
"deviceSerial": "K43763512",
"holidayChannel": "0",
"isDelete": "0",
"isPlanHas": 0,
"planId": "139",
"planName": "杨航的周计划",
"planStatus": "0",
"planStyle": "1",
"saasCompanyId": "985",
"synchroStatus": 1,
"timePairEntityList": [
{
"beginTime": "21:01:51",
"endTime": "01:00:00",
"id": "489",
"planId": "139"
}
],
"weekDay": "1"
}
],
"msg": "操作成功"
}
- 参数说明
参数名 | 类型 | 描述 | 是否必须 |
---|---|---|---|
code | int | 状态码-200,表示通过云端校验,成功开始与设备交互; 权限是否下发成功请根据data中authorityStatus判断 |
Y |
msg | String | 具体错误描述信息 | Y |
data | Object[] | 业务结果 | N |
data[i].weekDay | String | 周几(1~7,每周计划时有用) | N |
data[i].deviceSerial | String | 设备序列号 | Y |
data[i].planId | String | 计划id | Y |
data[i].planStatus | String | 计划状态:0-关;1-开 | Y |
data[i].planStyle | String | 计划类型:0-当日常开;1-每周常开;2-假日常开 | Y |
data[i].holidayChannel | String | 假日计划通道(1~16,假日计划时有用) | N |
data[i].planName | String | 计划名称 | Y |
data[i].planBegin | Date | 计划开始时间(每周计划没有) | N |
data[i].planEnd | Date | 计划结束时间(每周计划没有) | N |
data[i].timePairEntityList | Object | 时间段列表 | N |
data[i].timePairEntityList[i].planId | Long | 对应的计划id | Y |
data[i].timePairEntityList[i].beginTime | Time | 时间段开始时间 | Y |
data[i].timePairEntityList[i].endTime | Time | 时间段结束时间 | Y |