# 创建日程参与人
基于当前用户身份批量添加日程参与人。
注意事项:
- 若日程不允许参与人添加参与者,则当前身份必须是日程的组织者
- 若日程允许参与人添加参与者,当前身份必须是日程的组织者或参与者
- 新添加参与人和组织者必须在同一个企业内
- 每个日程最多有3000个参与人(不包含群聊)
# 请求
基本 | |
---|---|
HTTP URL | https://hi-qa.weizhipin.com/open-apis/calendar/v2/events/:event_id/attendees |
HTTP Method | POST |
支持的应用类型 | 自建应用 |
权限要求 | 更新日历及日程信息 |
# 请求头
名称 | 类型 | 必填 | 描述 |
---|---|---|---|
Authorization | string | 是 | tenant_access_token 或 user_access_token 值格式:"Bearer access_token "示例值:"Bearer u-7f1bcd13fc57d46bac21793a18e560" |
Content-Type | string | 是 | 固定值:"application/json; charset=utf-8" |
# 路径参数(url中冒号标识的参数,如":xxxx"请连同:整体替换成对应值)
名称 | 类型 | 描述 |
---|---|---|
event_id | string | 日程ID。 示例值:"xxxxxxxxx_0" |
# 查询参数
名称 | 类型 | 描述 |
---|---|---|
need_notification | boolean | 是否发送通知(非必填,默认为TRUE) |
user_id_type | string | 用户 ID 类型示例值:"open_id" 可选值有: open_id:用户的 open id union_id:用户的 union id user_id:用户的 user id 默认值:open_id 当值为 user_id,字段权限要求: 获取用户 user ID |
user_id | string | 用户ID,需要与查询参数中的user_id_type类型保持一致。 示例值:"ou_7dab8a3d3cdcc9da365777c7ad535d62" |
# 请求体
名称 | 类型 | 必填 | 描述 |
---|---|---|---|
attendee_ids | list | 是 | 日程参与人user_id列表。参与人ID列表和群聊ID列表不能同时为空 |
chat_ids | list | 否 | 群聊ID列表。参与人ID列表和群聊ID列表不能同时为空 |
# 请求体示例
{
"attendee_ids":["100001", "100002"],
"chat_ids":["a834589b634fa2801HFz2dQ~"]
}
1
2
3
4
2
3
4
# 响应
# 响应体
名称 | 类型 | 描述 |
---|---|---|
code | int | 错误码,非 0 表示失败 |
msg | string | 错误描述 |
data | list | - |
∟type | string | 参与人类型 示例值:"user" 可选值有: * user :用户* chat :群组 |
∟user_id | string | 参与人的用户id |
∟chat_id | string | chat类型参与人的群组chat_id |
∟rsvp_Status | string | 参与人状态 可选值有: * accept :已确定* decline :已拒绝 * tentative :未回应 |
∟is_organizer | boolean | 参与人是否为日程组织者 |
∟display_name | string | 参与人名称 |
# 响应体示例
{
"code": 0,
"traceId": "_Ao59UOIBLPCeAAu",
"data": [
{
"type": "chat",
"user_id": null,
"chat_id": "a834589b634fa2801HFz2dQ~",
"rsvp_status": "tentative",
"is_organizer": false,
"display_name": "群聊名称"
},
{
"type": "user",
"user_id": "10001",
"chat_id": null,
"rsvp_status": "tentative",
"is_organizer": false,
"display_name": "xxx"
}
],
"msg": "操作成功"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23