# 创建日程

基于当前用户身份在日历上创建一个日程。


注意事项:

  • 创建使用的身份需要为日历所有者才可以创建成功
  • 日历类型只能为默认日历或自定义日历
  • 创建重复日程后,会根据重复规则生成相应的n个日程实例

# 请求

基本
HTTP URL https://hi-qa.weizhipin.com/open-apis/calendar/calendars/:calendar_id/events
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"请连同:整体替换成对应值)

名称 类型 描述
calendar_id string 日历ID。

# 查询参数

名称 类型 必填 描述
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"

# 请求体

名称 类型 必填 描述
summary string 日程标题
示例值:"日程标题"
description string 日程描述
all_date_start_time string 日程全天开始时间。
示例值:"2022-09-07"
not_all_date_start_time string 日程非全天开始时间。注:非全天开始时间和非全天结束时间同时为空或同时不为空
示例值:"14:00"
not_all_date_end_time string 日程非全天结束时间。注:非全天开始时间和非全天结束时间同时为空或同时不为空
示例值:"15:00"
attendee_ability string 参与人权限
示例值:"can_modify_event"
可选值有
* none:参与人无法编辑日程,也不能邀请人
* can_modify_event:参与人可以编辑日程,不可以邀请人
* can_invite_modify:参与人可以编辑日程,也可以邀请人
address_name string 日程地点名称
address string 日程地址
minutes list[int] 日程提醒列表 不传时默认为5分钟前
示例值:[1,2,3]
可选值有
* 1: 开始时
* 2: 5分钟前
* 3: 15分钟前
* 4: 30分钟前
* 5: 一小时前
* 6: 一天前
* -1: 不提醒
recurrence string 日程重复规则
示例值:"none"
可选值有
* none: 不重复
* every_day: 每天
* every_week: 每周
* monday_to_friday: 周一到周五
* every_week_2: 每两周
* every_month: 每月
* every_year: 每年
ui_names list[string] ui名称
示例值:[forward,accept]
可选值有
* forward: 日程转发
* accept: 接受/拒绝/待定区域
* partner: 参与者区域
* creator: 组织者/创建者区域
recurrence_end_date string 重复日程结束时间。
示例值:"2022-01-01"
room_id string 会议室房间号

# 请求体示例

{
    "summary":"整体日程测试",
    "description":"整体日程测试",
    "all_date_start_time":"2022-09-07",
    "not_all_date_start_time":"14:00",
    "not_all_date_end_time":"15:00",
    "attendee_ability":"can_invite_modify",
    "address_name":"自贸大厦",
    "address":"aaaa",
    "minutes":[1,2,3,4,5,6],
    "recurrence":"none",
    "ui_names":["accept", "forward", "partner", "creator"],
    "recurrence_end_date": "2022-01-01",
    "room_id": "0123aa"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

# 响应

# 响应体

名称 类型 描述
code int 错误码,非 0 表示失败
msg string 错误描述
data - -
 ∟event_id string 日程ID
 ∟organizer_calendar_id string 日程在组织者处的日历id
 ∟summary string 日程标题
示例值:"日程标题"
 ∟description string 日程描述
 ∟all_date_start_time string 日程全天开始时间。
示例值:"2022-09-07"
 ∟not_all_date_start_time string 日程非全天开始时间。注:非全天开始时间和非全天结束时间同时为空或同时不为空
示例值:"14:00"
 ∟not_all_date_end_time string 日程非全天结束时间。注:非全天开始时间和非全天结束时间同时为空或同时不为空
示例值:"15:00"
 ∟attendee_ability string 参与人权限
示例值:"can_modify_event"
可选值有
* none:参与人无法编辑日程,也不能邀请人
* can_modify_event:参与人可以编辑日程,不可以邀请人
* can_invite_modify:参与人可以编辑日程,也可以邀请人
 ∟address_name string 日程地点名称
 ∟address string 日程地址
 ∟minutes list[int] 日程提醒列表
示例值:[1,2,3]
可选值有
* 1: 开始时
* 2: 5分钟前
* 3: 15分钟前
* 4: 30分钟前
* 5: 一小时前
* 6: 一天前
 ∟recurrence string 日程重复规则
示例值:"none"
可选值有
* none: 不重复
* every_day: 每天
* every_week: 每周
* monday_to_friday: 周一到周五
* every_week_2: 每两周
* every_month: 每月
* every_year: 每年
 ∟ui_names list[string] ui名称
示例值:[forward,accept]
可选值有
* forward: 日程转发
* accept: 接受/拒绝/待定区域
* partner: 参与者区域
* creator: 组织者/创建者区域
 ∟deleted boolean 是否删除
 ∟recurrence_end_date string 重复日程结束时间。
示例值:"2022-01-01"

# 响应体示例

{
    "code": 0,
    "traceId": "_Ao59UOIBLPCeAAu",
    "data": {
        "event_id": "41c92d3b5eb06bf4xi6K1MA~",
        "organizer_calendar_id": "ce5168c91d31723cwi-L3A~~",
        "summary": "整体日程测试",
        "description": "整体日程测试",
        "all_date_start_time": "2022-09-07",
        "not_all_date_start_time": "00:00",
        "not_all_date_end_time": "24:00",
        "attendee_ability": "can_invite_modify",
        "address_name": "xxx",
        "address": "xxx",
        "minutes": [1,2,3,4,5,6],
        "recurrence": "none",
        "ui_names": ["accept","forward","partner","creator"],
        "deleted": false,
        "recurrence_end_date": "2022-01-01"
    },
    "msg": "操作成功"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
最后更新于 : 6/17/2024, 2:32:12 PM