该接口用于修改指定日历的信息。
注意,更新操作是覆盖式,而不是增量式
企业微信需要更新到3.0.2及以上版本
请求方式: POST(HTTPS)
请求地址: https://qyapi.weixin.qq.com/cgi-bin/oa/calendar/update?access_token=ACCESS_TOKEN
请求包体:
{
"calendar" : {
"cal_id":"wcjgewCwAAqeJcPI1d8Pwbjt7nttzAAA",
"readonly" : 1,
"summary" : "test_summary",
"color" : "#FF3030",
"description" : "test_describe_1",
"shares" : [
{
"userid" : "userid1"
},
{
"userid" : "userid2",
"readonly" : 1
}
]
}
}
参数说明:
参数 | 是否必须 | 说明 |
---|---|---|
calendar | 是 | 日历信息 |
cal_id | 是 | 日历ID |
readonly | 否 | 日历组织者对日历是否只读权限(即不可编辑日历,不可在日历上添加日程,仅可作为组织者删除日历)。0-否;1-是。默认为1,即只读 |
summary | 是 | 日历标题。1 ~ 128 字符 |
color | 是 | 日历颜色,RGB颜色编码16进制表示,例如:”#0000FF” 表示纯蓝色 |
description | 否 | 日历描述。0 ~ 512 字符 |
shares | 否 | 日历共享成员列表。最多2000人 |
shares.userid | 是 | 日历共享成员的id |
shares.readonly | 否 | 共享成员对日历是否只读权限(即不可编辑日历,不可在日历上添加日程,仅可以退出日历)。0-否;1-是。默认为1,即只读 |
注意, 不可更新组织者。
返回结果:
{
"errcode": 0,
"errmsg" : "ok"
}
参数说明:
参数 | 说明 |
---|---|
errcode | 错误码 |
errmsg | 错误码说明 |