更新日期:     浏览次数:

1. 日程相关接口

1.1. 1、新增单个日程接口

http://yunzhijia.com/gateway/cloudwork/newwork/create?accessToken=xxx

header:

Content-Type:application/json

参数:

参数 类型 注释
openid String 日程创建者的oid
content String 日程内容
startDate Long 日程开始时间戳
endDate Long 日程结束时间戳
noticeTime int 提醒时间(-1:不提醒、0:开始时间提醒、15:开始时间前15分钟提醒、60:开始时间前1小时提醒)
topState int 是否标记为重要(0:否、1:是)
actors 集合 协作人oid的集合
submitExperience boolean 是否需要提交日程纪要(新的体会、总结)
{
    "openid": "5a67e08d00b0e8dfe4aab4fa",
    "content": "新增单个日程接口",
    "startDate": 1530002768912,
    "endDate": 1530687800000,
    "noticeTime": 0,
    "topState": 0,
    "actors": ["xxxxxx"],
    "submitExperience": true
}

返回结果示例:

参数 类型 注释
workId String 添加成功后日程id
{
    "data": {
        "workId": "5b33291f14cada713f839b49"
    },
    "error": null,
    "errorCode": 0,
    "success": true
}

1.2. 2、修改单个日程接口

http://yunzhijia.com/gateway/cloudwork/newwork/modify?accessToken=xxxx

header:

Content-Type:application/json

参数:

参数 类型 注释
id String 日程id
openid String 日程创建者的oid
content String 日程内容
startDate Long 日程开始时间戳
endDate Long 日程结束时间戳
noticeTime int 提醒时间(-1:不提醒、0:开始时间提醒、15:开始时间前15分钟提醒、60:开始时间前1小时提醒)
topState int 是否标记为重要(0:否、1:是)
addActors 集合 新加协作人oid的集合
delActors 集合 被删除协作人oid的集合
submitExperience boolean 是否需要提交日程纪要(新的体会、总结)
{
    "id": "5b33262e14cada62e4e44822",
    "openid": "5a67e08d00b0e8dfe4aab4fa",
    "content": "修改单个日程接口",
    "startDate": 1530002768912,
    "endDate": 1530687800000,
    "noticeTime": 0,
    "topState": 0,
    "addActors": ["xxxxxx","xxxxxx"],
    "delActors": ["xxxxxx","xxxxxx"],
    "submitExperience": true
}

返回结果示例:

{
    "success": true,
    "errorCode": 0,
    "error": null,
    "data":null
}

1.3. 3、批量删除日程接口

http://yunzhijia.com/gateway/cloudwork/newwork/delete?accessToken=xxxx

header:

Content-Type:application/json

参数:

参数 类型 注释
ids 集合 日程id的集合
openid String 日程创建者的oid

PS:必须是创建人创建的日程,才可以删除

{
    "ids": ["5b33275f14cada62e4e44840"],
    "openid": "5a67e08d00b0e8dfe4aab4fa"
}

返回结果示例:

{
    "success": true,
    "errorCode": 0,
    "error": null,
    "data":null
}

1.4. 4、日程设置为完成

http://yunzhijia.com/gateway/cloudwork/newwork/finish?accessToken=xxxx

header:

Content-Type:application/json

参数:

参数 类型 注释
id String 日程id
openid String 日程创建者的oid
{
    "id": "5b33275f14cada62e4e44840",
    "openid": "5a67e08d00b0e8dfe4aab4fa"
}

返回结果示例:

{
    "success": true,
    "errorCode": 0,
    "error": null,
    "data":null
}

1.5. 5、日程设置为未完成

http://yunzhijia.com/gateway/cloudwork/newwork/unfinish?accessToken=xxxx

header:

Content-Type:application/json

参数:

参数 类型 注释
id String 日程id
openid String 日程创建者的oid
{
    "id": "5b33275f14cada62e4e44840",
    "openid": "5a67e08d00b0e8dfe4aab4fa"
}

返回结果示例:

{
    "success": true,
    "errorCode": 0,
    "error": null,
    "data":null
}

1.6. 6、查询工作圈下日程

批量查询accessToken对应工作圈下面的日程 开发指引: 第一页默认的lastId为空,size为每页多少条数据 第二页的lastId为上一页最后一条日程的ID,以此类推

http://yunzhijia.com/gateway/cloudwork/newwork/teamWorks?accessToken=xxxx

header:

Content-Type:application/json

参数:

参数 类型 注释
lastId String 最后一条日程id(默认为空,第一页是为空)
size int 每次查多少条(最多不能超过1000条)
{
    "lastId": "5a67e08d00b0e8dfe4aab4fa",
    "size": 50
}

返回结果示例:

参数 类型 注释
id String 日程id
openid String 日程创建者的oid
personName String 日程创建者的姓名
type String 日程类型(cooperationWork:协作日程、generalWork:普通日程)
channel String 日程产生渠道(默认为空,只有第三方渠道产生的才有这个标识。recordWork:记事、birthday:生日祝福、workReport:工作汇报、boss:报表秀秀)
content String 日程内容
startDate Long 日程开始时间戳
endDate Long 日程结束时间戳
createDate Long 日程创建时间
doneTime Long 日程完成时间
noticeTime int 提醒时间(-1:不提醒、0:开始时间提醒、15:开始时间前15分钟提醒、60:开始时间前1小时提醒)
workStatus int 日程状态(0:待办、1:已办、2:删除)
readStatus int 是否已读(0:未读、1:已读)
acceptStatus int 接受状态(0:未响应、1:不接受、2:接受)
record boolean 是否提交纪要
{
    "success": true,
    "errorCode": 0,
    "error": null,
    "data": [
        {
            "id": "5b86ed2fbeb7cc35af769eb8",
            "openid": "5a67e1e1e4b02f1de22a70a3",
            "personName": "张三",
            "type": "generalWork",
            "channel": "workReport",
            "content": "别忘了今天要提交【日报】咯",
            "startDate": 1535558400000,
            "endDate": 1535644799999,
            "createDate": 1535569199741,
            "doneTime": 1535569199741,
            "noticeTime": 0,
            "workStatus": 0,
            "readStatus": 0,
            "acceptStatus": 0,
            "record": false
        }
    ]
}

1.7. 7、按天查询工作圈下日程

按天查询accessToken对应工作圈下面当天的日程 开发指引: day为需查询的当天任意时间点的时间戳即可

http://yunzhijia.com/gateway/cloudwork/newwork/queryByDay?accessToken=xxxx

header:

Content-Type:application/json

参数:

参数 类型 注释
day Long 需查询当天任意时间点的时间戳
{
    "day": 1533549600000
}

返回结果示例:

{
    "success": true,
    "errorCode": 0,
    "error": null,
    "data": [
        {
            "workStatus": 0,
            "readStatus": 0,
            "endDate": 1535644799999,
            "openid": "5a67e1e1e4b02f1de22a70a3",
            "channel": "workReport",
            "acceptStatus": 0,
            "type": "generalWork",
            "title": null,
            "content": "别忘了今天要提交【日报】咯",
            "url": null,
            "personName": "张三",
            "record": false,
            "workType": null,
            "doneTime": 1535569199741,
            "id": "5b86ed2fbeb7cc35af769eb8",
            "noticeTime": 0,
            "startDate": 1535558400000,
            "createDate": 1535569199741
        }
    ]
}

1.8. 8、新增重复日程接口

http://yunzhijia.com/gateway/cloudwork/newwork/repeatWork?accessToken=xxxx

header:

Content-Type:application/json

参数:

参数 类型 注释
openid String 日程创建者的oid
content String 日程内容
startDate Long 日程开始时间戳
endDate Long 日程结束时间戳
noticeTime int 提醒时间(-1:不提醒、0:开始时间提醒、15:开始时间前15分钟提醒、60:开始时间前1小时提醒)
topState int 是否标记为重要(0:否、1:是)
actors 集合 协作人oid的集合
submitExperience boolean 是否需要提交日程纪要(新的体会、总结)
repeat int 重复周期(0:不重复、1:每工作日、2:每日、3:每周、4:每两周、5:每月)
repeatEndDate long 重复截止时间
{
    "openid": "5a67e08d00b0e8dfe4aab4fa",
    "content": "新增重复日程接口",
    "startDate": 1530002768912,
    "endDate": 1530687800000,
    "noticeTime": 0,
    "topState": 0,
    "actors": ["xxxxxx","xxxxxx"],
    "submitExperience": true,
    "repeat": 1,
    "repeatEndDate": 1530687800000
}

返回结果示例:

workIds为添加成功后的日程id集合,其中第一个是父日程ID

{
    "data": {
        "workIds": ["5b614fe80e4f78209cb99689", "5b61504e0e4f78209cb99690", "5b61504e0e4f78209cb9968f"]
    },
    "error": null,
    "errorCode": 0,
    "success": true
}

1.9. 9、批量修改重复日程接口

http://yunzhijia.com/gateway/cloudwork/newwork/batchModify?accessToken=xxxx

header:

Content-Type:application/json

参数:

参数 类型 注释
id String 日程id
openid String 日程创建者的oid
content String 日程内容
startDate Long 日程开始时间戳
endDate Long 日程结束时间戳
noticeTime int 提醒时间(-1:不提醒、0:开始时间提醒、15:开始时间前15分钟提醒、60:开始时间前1小时提醒)
topState int 是否标记为重要(0:否、1:是)
actors 集合 协作人oid的集合(即原来的actors加上addActors减去delActors)
addActors 集合 新加的协作人oid集合
delActors 集合 删除的协作人oid集合
submitExperience boolean 是否需要提交日程纪要(新的体会、总结)
repeat int 重复周期(0:不重复、1:每工作日、2:每日、3:每周、4:每两周、5:每月)
repeatEndDate long 重复截止时间
batchId String 批量ID(如果是父日程,则没有批量ID,可以不传)

如何判断batchId是不是父日程ID? 调用上面创建重复日程的接口,返回的workIds集合的第一个id即为父日程ID

{
    "id": "5b33262e14cada62e4e44822",
    "openid": "5a67e08d00b0e8dfe4aab4fa",
    "content": "批量修改重复日程接口",
    "startDate": 1530002768912,
    "endDate": 1530687800000,
    "noticeTime": 0,
    "topState": 0,
    "actors": ["xxxxxx","xxxxxx"],
    "addActors": ["xxxxxx","xxxxxx"],
    "delActors": ["xxxxxx","xxxxxx"],
    "submitExperience": true,
    "repeat": "1",
    "repeatEndDate": 1533549600000,
    "batchId": "5b6986c514cada6af0f03821"
}

返回结果示例:

{
    "success": true,
    "errorCode": 0,
    "error": null,
    "data":null
}

1.10. 10、批量删除重复日程接口

http://yunzhijia.com/gateway/cloudwork/newwork/batchDelete?accessToken=xxxx

header:

Content-Type:application/json

参数:

参数 类型 注释
id String 日程id
openid String 日程创建者的oid
batchId String 批量id(如果是父日程的话,没有批量ID,可以不传)

PS:必须是创建人创建的日程,才可以删除 如何判断batchId是不是父日程ID? 调用上面创建重复日程的接口,返回的workIds集合的第一个id即为父日程ID

{
    "id": "1234567890",
    "openid": "5a67e08d00b0e8dfe4aab4fa",
    "batchId": "1234567890"
}

返回结果示例:

{
    "success": true,
    "errorCode": 0,
    "error": null,
    "data":null
}

results matching ""

    No results matching ""