# 查询会议室预定数据

查询会议室预定数据，具体权限要求请参考「资源介绍」。

## 请求

基本 | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/vc/v1/resource_reservation_list
HTTP Method | GET
接口频率限制 | [100 次/分钟](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
支持的应用类型 | Custom App、Store App
权限要求<br>**调用该 API 所需的权限。开启其中任意一项权限即可调用** | 获取视频会议室信息(vc:room:readonly)

### 请求头

名称 | 类型 | 必填 | 描述
---|---|---|---
Authorization | string | 是 | `tenant_access_token`<br>或<br>`user_access_token`<br>**值格式**："Bearer `access_token`"<br>**示例值**："Bearer u-7f1bcd13fc57d46bac21793a18e560"<br>[了解更多：如何选择与获取 access token](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)

### 查询参数

名称 | 类型 | 必填 | 描述
---|---|---|---
room_level_id | string | 是 | 层级ID，如传递非omb前缀的异常ID时，会默认使用租户层级进行兜底<br>**示例值**：omb_57c9cc7d9a81e27e54c8fabfd02759e7
need_topic | boolean | 否 | 是否展示会议主题<br>**示例值**：true
start_time | string | 是 | 查询开始时间（unix时间，单位sec）<br>**示例值**：1655276858
end_time | string | 是 | 查询结束时间（unix时间，单位sec）<br>**示例值**：1655276858
room_ids | string\[\] | 是 | 待筛选的会议室ID列表；如需要传递多个会议室ID，需要通过room_ids=aaaa&room_ids=bbbb&room_ids=cccc的形式传递<br>**示例值**：omm_eada1d61a550955240c28757e7dec3af
is_exclude | boolean | 否 | 默认为false；若为false，则获取room_ids字段传入的会议室列表预定数据；若为true，则根据room_level_id字段获取层级下的会议室列表，并过滤掉room_ids范围的会议室，获取剩余会议室的预定数据<br>**示例值**：false
page_size | int | 否 | 分页尺寸大小<br>**示例值**：20<br>**默认值**：`20`<br>**数据校验规则**：<br>- 取值范围：`20` ～ `100`
page_token | string | 否 | 分页标记，第一次请求不填，表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token，下次遍历可采用该 page_token 获取查询结果<br>**示例值**：20

## 响应

### 响应体

名称 | 类型 | 描述
---|---|---
code | int | 错误码，非 0 表示失败
msg | string | 错误描述
data | \- | \-
room_reservation_list | room_meeting_reservation\[\] | 会议室预定列表
room_id | string | 会议室ID
room_name | string | 会议室名称
event_title | string | 会议标题
reserver | string | 预定人
reserver_user_id | string | 预定人ID
department_of_reserver | string | 预定人所属部门
guests_number | string | 邀约人数
accepted_number | string | 接受人数
event_start_time | string | 会议开始时间
event_end_time | string | 会议结束时间
event_duration | string | 会议时长
reservation_status | string | 会议室预定状态
check_in_device | string | 签到设备
room_check_in_status | string | 会议室签到状态
check_in_time | string | 会议室签到时间
is_release_early | string | 是否提前释放
releasing_person | string | 释放人
releasing_time | string | 释放时间
page_token | string | 分页标记，当 has_more 为 true 时，会同时返回新的 page_token，否则不返回 page_token
has_more | boolean | 是否还有更多项

### 响应体示例
```json
{
    "code": 0,
    "msg": "success",
    "data": {
        "room_reservation_list": [
            {
                "room_id": "omm_4de32cf10a4358788ff4e09e37ebbf9b",
                "room_name": "VIP Meeting Room",
                "event_title": "飞书邀请的日程",
                "reserver": "kehan",
                "reserver_user_id": "ou_1234567(UserID);cli_123123(BotID)",
                "department_of_reserver": "development",
                "guests_number": "5",
                "accepted_number": "2",
                "event_start_time": "2022.12.17 21:00:00 (GMT+08:00)",
                "event_end_time": "2022.12.17 22:00:00 (GMT+08:00)",
                "event_duration": "1:00:00",
                "reservation_status": "预定成功",
                "check_in_device": "签到板",
                "room_check_in_status": "已签到",
                "check_in_time": "2022.12.09 13:35:30 (GMT+08:00)",
                "is_release_early": "已释放（手动释放）",
                "releasing_person": "kehan",
                "releasing_time": "2022.12.20 11:25:15 (GMT+08:00)"
            }
        ],
        "page_token": "20",
        "has_more": true
    }
}
```

### 错误码

HTTP状态码 | 错误码 | 描述 | 排查建议
---|---|---|---
500 | 121001 | internal error | 服务器内部错误，如果重试无效可联系管理员
400 | 121002 | not support | 暂不支持该功能
400 | 121003 | param error | 参数错误，检查参数的取值范围（请按照上面字段说明自查）
400 | 126005 | start time error (cannot larger than now or smaller than 0) | 开始时间不能大于当前时间或者小于0
400 | 126006 | end time cannot exceed start time for one day or smaller than start time | 结束时间不能超过开始时间一天或者小于开始时间
404 | 121004 | data not exist | 无效的请求体，请确保请求方法、请求信息、请求数据格式等是正确的
403 | 121005 | no permission | 无权限进行该操作，建议检查token类型、操作者身份以及资源的归属

