中国互联网办公室·imo运营中心
目录
1 概要 4
1.1 第三方应用同步数据到imo 4
1.2 imo同步数据到第三方应用 4
1.3 使用imo同步数据功能的前提(管理后台功能限制) 4
2 业务流程 5
2.1.1 接入方发送申请邮件,邮件内容包括要获得授权的公司账号列表和服务器ip地址 5
2.1.2 Imo 开放平台通过接入申请,为接入方发放特定API_KEY(1个32个字节长的字符串) 5
3 API 5
3.1 注册公司(新增) 5
3.1.1 获取企业信息 5
3.1.2 获取部门信息 7
3.1.3 获取组织架构信息 8
3.1.4 获取员工信息 10
3.1.5 获取企业总人数 11
3.2 同步数据 12
3.2.1 第三方应用同步数据到imo 12
3.2.2 添加员工 12
3.2.3 修改员工(管理员密码无法修改,邮箱不能为空) 13
3.2.4 删除员工 15
3.2.5 添加部门信息。 15
3.2.6 修改部门信息(不需要修改的项无需传) 16
3.2.7 删除部门信息(不支持包含子部门的删除) 18
3.2.8 修改企业信息(不需要修改的项无需传) 18
3.2.9 移动员工 20
3.2.10 移动部门 21
3.3 变动数据获取 21
3.3.1 获取变动的公司信息 22
3.3.2 获取详细的变动信息 22
4 错误代码说明 24
5 操作流程图 26
6 接入范例 28
通过POST方式直接提交数据至API,通过数据合法性验证后更新到imo端。
返回的数据为json_encode格式数据,编码为utf-8。
第三方应用,通过合法性验证,通过接口获取公司信息,和组织架构,然后根据组织架构的数据结构,通过API获取相应部门和员工信息,并保存至第三方数据库。
1. 企业邮箱(尚易邮箱)感知不能使用(已绑定的,需要解绑)
2. 被删除成员不能为群主(一般需要先解散群)
3. 修订历史里面没有记录
URL
http://open.imoffice.com:5186/sync/sync.php
支持格式
JSON
HTTP请求方式
POST
请求参数
|
必选 |
类型及范围 |
说明 |
cid |
true |
string |
(默认为appcid) |
appKey |
true |
string |
App key |
appcid |
true |
string |
Appcid |
evno |
true |
string |
12 |
CorpCName |
true |
string |
公司名称 |
ContactEmail |
true |
string |
公司邮箱 |
返回结果
{
"Result": "true",
"cid": "149102",
"caccount": "66019442"
}
注:此接口暂不提供使用
URL
http:// open.imoffice.com:5186/sync/getsync.php
支持格式
JSON
HTTP请求方式
POST
请求参数
|
必选 |
类型及范围 |
说明 |
cid |
true |
string |
企业 ID |
appKey |
true |
string |
App key |
appcid |
true |
string |
appcid |
evno |
true |
string |
3 |
调试地址
返回结果
{
"cid":"123456789",
"logo":"http:\/\/data.imoffice.com:8000\/upload\/imo_server\/data\/corplogo\/43\/43.png",
"account":"510086",
"domain":"",
"name_cn":"u6613\u7766\u7f51\u7edc\u79d1\u6280\u6709\u9650\u516c\u53f8",
"name_en":"imo",
"name":"imo\u4e91\u529e\u516c\u5ba4",
"country":"\u4e2d\u56fd",
"city":"\u4e0a\u6d77",
"province":"\u4e0a\u6d77",
"district":"u95f8\u5317\u533a",
"address":"\u4e0a\u6d77\u5e02\u95f8\u5317\u533a\u6c5f\u573a\u4e09\u8def286-288\u53f77\u5c42",
"tel":"021-51086575",
"fax":"021-61927549",
"contact_person":"\u674e\u8302\u7acb",
"email":"[email protected]",
"zip":"200082",
"website":"http://www.imoffice.com",
"intro":"\u4e2d\u56fd\u4e92\u8054\u7f51\u529e\u516c\u5ba4-imo\u8fd0\u8425\u4e2d\u5fc3\u57fa\u4e8e\u201c\u5feb\u901f\u63d0\u5347\u4e2d\u56fd\u6570\u767e\u4e07\u4e0a\u7f51\u4f01\u4e1a\u7684\u6574\u4f53\u4fe1\u606f\u5316\u6c34\u5e73\u201d\u4e4b\u4e8b\u4e1a\u5b97\u65e8\u800c\u6210\u7acb\u3002"
}
字段说明
返回值字段 |
字段类型 |
字段说明 |
cid |
string |
企业 ID |
logo |
string |
企业logo图片URL |
account |
string |
企业账号 |
domain |
string |
企业登陆域名 |
name_cn |
string |
企业中文名称 |
name_en |
string |
企业英文名称 |
name |
string |
企业简称 |
country |
string |
企业所在国家 |
city |
string |
企业所在市 |
province |
string |
企业所在省份 |
district |
string |
企业所在区 |
address |
string |
企业地址 |
tel |
string |
企业电话 |
fax |
string |
企业传真 |
contact_person |
string |
企业联系人 |
|
string |
企业联系人的email地址 |
zip |
string |
企业邮编 |
website |
string |
企业网站 |
intro |
string |
企业简介 |
URL
http:// open.imoffice.com:5186/sync/getsync.php
支持格式
JSON
HTTP请求方式
POST
请求参数
|
必选 |
类型及范围 |
说明 |
cid |
true |
string |
企业 ID |
appKey |
true |
string |
App key |
appcid |
true |
string |
appcid |
dids |
true |
string |
部门 ID(1,2), ,最多支持100个部门 |
evno |
true |
string |
4 |
调试地址
返回结果
{
"did":"4",
"pdid":"3",
"name":"\u5206\u652f1",
"address":"",
"tel":"",
"website":"",
"intro":"\u5206\u652f1",
"fax":"02133250437-802"
}
错误
{“Result”:false, ”Msg”:” overstep dept number”,”MsgNo”:10001}超出部门数限制
字段说明
返回值字段 |
字段类型 |
字段说明 |
did |
string |
部门编号 |
pdid |
string |
父级部门编号 |
name |
string |
部门名称 |
address |
string |
部门地址 |
tel |
string |
部门电话 |
website |
string |
网址 |
intro |
string |
部门简介 |
fax |
string |
部门传真 |
URL
http:// open.imoffice.com:5186/sync/getsync.php
支持格式
JSON
HTTP请求方式
POST
请求参数
|
必选 |
类型及范围 |
说明 |
cid |
true |
string |
企业 ID |
appKey |
true |
string |
App key |
appcid |
true |
string |
appcid |
did |
true |
string |
部门 ID 1. 传入0表示显示企业全部组织架构以及部门下的员工。 2. 传入非0表示只显示你传入的组织架构ID的信息以及部门下的员工。 |
evno |
true |
string |
1 |
调试地址
返回结果
{
"did":"4",
"uids":["1010","1011","1015","1378796"],
"uas":["name1"," name2"," name3"," name4"],
"children":[
{
"did":"5",
"uids":["1029","12386","224568","234622","687281","749713","827105","1104158","1175507","1378797"],
"uas":[ a1,a2,a3,a4,a5,a6,a6,a7,a8,a9]
},
{
"did":"10",
"uids":["1035","1038","26943","82609","221413","780985","1174744","1175508","1372622","1372623","1372625","1392904","1435792"],
"uas":[……]
"children":[
{
"did":"17",
"uids":["1017","1028","991653"],
"uas":[……]
}
]
},
{
"did":"30",
"uids":["1378806","1378807","1378808"],
"uas":[……]
}
]
}
字段说明
返回值字段 |
字段类型 |
字段说明 |
did |
string |
部门编号 |
uids |
array |
部门下员工集合 |
children |
array |
子部门 |
pid |
string |
父部门ID |
child_id |
string |
子部门ID 返回4294967295表示无子部门 |
sibling_id |
string |
同级部门ID 返回4294967295表示无同级部门 |
first_uid |
string |
部门第一个员工ID 返回4294967295表示无员工 |
URL
http:// open.imoffice.com:5186/sync/getsync.php
支持格式
JSON
HTTP请求方式
POST
请求参数
|
必选 |
类型及范围 |
说明 |
cid |
true |
string |
企业 ID |
appKey |
true |
string |
App key |
appcid |
true |
string |
appcid |
uids |
false |
string |
员工ID(1,2),最多支持100个成员 |
uas |
false |
string |
员工账号(user1,user2),最多支持100个成员(uids和uas必须且只能填写1项) |
evno |
true |
string |
2 |
调试地址
返回结果(gender, intro客户端做出的修改后,只有再次调用相关修改接口才会返回修改的数据)
{"did":"5",
"dname":"\u5206\u652f1",
"uaccount":"user3",
"Fpwd":"f1eeb8749a707ce11d1497dcb6cebec0",
"avatar":"http:\/\/data.imoffice.com:8000\/upload\/imo_server\/data\/userlogo\/000",
"uid":"123456",
"uname":" \u6210\u54584 ",
"birthday":"1970-12-22",
"tel":"51086575-8001",
"email":"[email protected]",
"gender":"\u7537",
"position":"",
"mobile":"",
"sign":"",
"intro":"",
"uid":"4595364"}
字段说明
返回值字段 |
字段类型 |
字段说明 |
did |
String |
部门编号 |
uaccount |
String |
员工账号 |
Fpwd |
String |
员工密码 |
avatar |
String |
员工头像URL |
uname |
String |
员工真实姓名 |
birthday |
String |
员工出生日期 |
tel |
String |
员工工作电话 |
|
String |
员工email |
gender |
String |
员工性别 |
position |
String |
员工职务 |
mobile |
String |
员工移动电话 |
sign |
String |
签名 |
intro |
String |
员工简介 |
Uid |
String |
员工ID |
URL
http:// open.imoffice.com:5186/sync/getsync.php
支持格式
JSON
HTTP请求方式
POST
请求参数
|
必选 |
类型及范围 |
说明 |
cid |
true |
string |
企业 ID |
appKey |
true |
string |
App key |
appcid |
true |
string |
appcid |
evno |
true |
string |
23 |
调试地址
返回结果
{"usernum":"10"}
字段说明
返回值字段 |
字段类型 |
字段说明 |
usernum |
String |
企业总人数 |
URL
http:// open.imoffice.com:5186/sync/sync.php
支持格式
JSON
HTTP请求方式
POST
请求参数
URL
http:// open.imoffice.com:5186/sync/sync.php
支持格式
JSON
HTTP请求方式
POST
请求参数
|
必选 |
类型及范围 |
说明 |
cid |
true |
string |
企业 ID |
appKey |
true |
string |
App key |
appcid |
true |
string |
Appcid |
user |
true |
string |
员工信息 |
evno |
true |
string |
5 |
pwdtype |
false |
string |
值=MD5,user参数中passwd可以填写明文密码md5一次后的32位字符串,否则passwd为明文 |
参数user
|
必选 |
类型及范围 |
说明 |
字串长度 |
did |
true |
string |
部门 did |
11 |
uaccount |
true |
string |
用户账号() |
60 |
uname |
true |
string |
用户真实姓名 |
16 |
passwd |
true |
string |
用户密码() |
16 |
birthday |
false |
string |
用户生日 |
8 |
tel |
false |
string |
用户电话 |
32 |
|
false |
string |
用户邮件地址 |
108 |
gender |
true |
string |
用户性别 |
1(1为男性:0为女性) |
position |
false |
string |
用户职位 |
32 |
mobile |
false |
string |
用户手机号码 |
32 |
intro |
false |
string |
用户简介 |
|
role |
false |
string |
用户身份 |
10组织管理员(副),5为普通员工 |
Base64_encode({
"did":"13",
"uaccount":"user",
"uname":"王东",
"passwd":"123456",
"birthday":"19701222",
"tel":"51086575-8001",
"email":"[email protected]",
"gender":"0",
"position":"web架构师",
"mobile":"13783235608",
"role":"5",
"intro":""
})
返回结果
成功
{“Result”:true, ”Msg”:”员工同步成功”,”Uid”:XXX}
失败
{“Result”:false, ”Msg”:”员工同步失败”,”MsgNo”:10005}
URL
http:// open.imoffice.com:5186/sync/sync.php
支持格式
JSON
HTTP请求方式
POST
请求参数
|
必选 |
类型及范围 |
说明 |
cid |
true |
string |
企业 ID |
appKey |
true |
string |
App key |
appcid |
true |
string |
appcid |
uid |
False |
string |
用户uid (uid和uaccount必选其一) |
uaccount |
False |
String |
用户账号(uid和uaccount必选其一) |
user |
true |
string |
修改信息 |
evno |
true |
string |
6 |
pwdtype |
false |
string |
值=MD5时,user参数中passwd可以填写明文密码md5一次后的32位字符串,否则passwd为明文 |
参数user
|
必选 |
类型及范围 |
说明 |
字串长度 |
uid |
true |
string |
|
11 |
did |
true |
string |
部门 did |
11 |
uaccount |
false |
string |
用户账号() |
60 |
uname |
false |
string |
用户真实姓名 |
16 |
passwd |
false |
string |
用户密码() |
16 |
birthday |
false |
string |
用户生日 |
8 |
tel |
false |
string |
用户电话 |
32 |
|
false |
string |
用户邮件地址 |
108 |
gender |
false |
string |
用户性别 |
1(1为男性:0为女性) |
position |
false |
string |
用户职位 |
32 |
mobile |
false |
string |
用户手机号码 |
32 |
role |
false |
string |
用户身份 |
10组织管理员(副),5为普通员工 |
Base64_encode({
"did":"13",
"uaccount":"1410177",
"uid":"123",
"uname":"王东",
"passwd":"123456",
"birthday":"1970-12-22",
"tel":"51086575-8001",
"email":"[email protected]",
"gender":"男",
"position":"web架构师",
"mobile":"13783235608",
"role":"5",
"intro":""
})
返回结果
成功
{“Result”:true, ”Msg”:”员工同步成功”}
失败
{“Result”:false, ”Msg”:”员工同步失败”,”MsgNo”:10005}
URL
http:// open.imoffice.com:5186/sync/sync.php
支持格式
JSON
HTTP请求方式
POST
请求参数
|
必选 |
类型及范围 |
说明 |
cid |
true |
string |
企业 ID |
appKey |
true |
string |
App key |
appcid |
true |
string |
appcid |
uid |
False |
string |
用户uid (uid和uaccount必选其一) |
uaccount |
False |
String |
用户账号(uid和uaccount必选其一) |
did |
true |
string |
部门id |
Evno |
true |
string |
7 |
返回结果
成功
{“Result”:true, ”Msg”:” 员工同步成功”}
失败
{“Result”:false, ”Msg”:”员工同步失败”,”MsgNo”:10005}
URL
http:// open.imoffice.com:5186/sync/sync.php
支持格式
JSON
HTTP请求方式
POST
请求参数
|
必选 |
类型及范围 |
说明 |
cid |
true |
string |
企业 ID |
appKey |
true |
string |
App key |
appcid |
true |
string |
appcid |
dept |
true |
string |
部门信息 |
evno |
true |
string |
8 |
参数dept详解
|
必选 |
类型及范围 |
说明 |
字串长度 |
pdid |
true |
string |
父级did(0表示无父级部门) |
11 |
name |
true |
string |
App key |
40 |
address |
false |
string |
部门信息 |
64 |
tel |
false |
string |
分支电话 |
32 |
website |
false |
string |
分支网址 |
64 |
intro |
false |
string |
分支简介 |
64 |
fax |
false |
string |
分支传真 |
32 |
Base64_encode({
"pdid":"3",
"name":"研发中心",
"address":"",
"tel":"",
"website":"",
"intro":"负责研发",
"fax":"02133250437-802"
}
)
返回结果
成功
{“Result”:true, ”Msg”:”部门同步成功”,”Did”:XXX}
失败
{“Result”:false, ”Msg”:”部门同步失败”,”MsgNo”:10004}
注:did为零表示为根节点.
URL
http:// open.imoffice.com:5186/sync/sync.php
支持格式
JSON
HTTP请求方式
POST
请求参数
|
必选 |
类型及范围 |
说明 |
cid |
true |
string |
企业 ID |
appKey |
true |
string |
App key |
appcid |
true |
string |
appcid |
did |
true |
string |
部门did |
dept |
true |
string |
部门信息 |
evno |
true |
string |
9 |
参数dept
|
必选 |
类型及范围 |
说明 |
字串长度 |
did |
true |
string |
部门did |
11 |
pdid |
false |
string |
父级did(0表示无父级部门) |
11 |
name |
false |
string |
部门名称 |
40 |
address |
false |
string |
部门地址 |
64 |
tel |
false |
string |
分支电话 |
32 |
website |
false |
string |
分支网址 |
64 |
intro |
false |
string |
分支简介 |
64 |
fax |
false |
string |
分支传真 |
32 |
Base64_encode({
"did":"4",
"pdid":"3",
"name":"研发中心",
"address":"",
"tel":"",
"website":"",
"intro":"负责研发",
"fax":"02133250437-802"
}
)
返回结果
成功
{“Result”:true, ”Msg”:”部门同步成功”}
失败
{“Result”:false, ”Msg”:”部门同步失败”,”MsgNo”:10004}
URL
http:// open.imoffice.com:5186/sync/sync.php
支持格式
JSON
HTTP请求方式
POST
请求参数
|
必选 |
类型及范围 |
说明 |
cid |
true |
string |
企业 ID |
appKey |
true |
string |
App key |
appcid |
true |
string |
Appcid |
did |
true |
string |
部门did |
evno |
true |
string |
10 |
返回结果
成功
{“Result”:true, ”Msg”:”部门同步成功”}
失败
{“Result”:false, ”Msg”:”部门同步失败”,”MsgNo”:10004}
URL
http:// open.imoffice.com:5186/sync/sync.php
支持格式
JSON
HTTP请求方式
POST
请求参数
|
必选 |
类型及范围 |
说明 |
cid |
true |
string |
企业 ID |
appKey |
true |
string |
App key |
appcid |
true |
string |
Appcid |
cinfo |
true |
string |
企业信息 |
evno |
true |
string |
11 |
参数cinfo
Base64_encode({
"cid":"123456789",
"logo":"http://corpmgr.imoffice.com/imo_server/data/corplogo/43/43.jpg",
"account":"510086",
"domain":"",
"name_cn":"易睦网络科技有限公司",
"name_en":"imo",
"name":"imo云办公室",
"country":"中国",
"city":"上海",
"province":"上海",
"district":"闸北区",
"address":"洛川中路840号B栋7楼",
"tel":"021-51086575",
"fax":"021-61927549",
"contact_person":"李茂立",
"email":"[email protected]",
"zip":"200082",
"website":"http://www.imoffice.com",
"intro":"中国互联网办公室-imo运营中心基于“快速提升中国数百万上网企业的整体信息化水平”之事业宗旨而成立。"
})
成功
{“Result”:true, ”Msg”:” 企业同步成功”}
失败
{“Result”:false, ”Msg”:”企业同步失败”,”MsgNo”:10003}
字段说明
返回值字段 |
字段类型 |
字段说明 |
字串长度 |
cid |
string |
企业 ID |
|
|
|
|
|
account |
string |
企业账号 |
|
|
|
|
|
name_cn |
string |
企业中文名称 |
32 |
name_en |
string |
企业英文名称 |
32 |
name |
string |
企业简称 |
10 |
country |
string |
企业所在国家 |
固定标准 |
city |
string |
企业所在市 |
|
province |
string |
企业所在省份 |
|
district |
string |
企业所在区 |
|
address |
string |
企业地址 |
64 |
tel |
string |
企业电话 |
32 |
fax |
string |
企业传真 |
32 |
contact_person |
string |
企业联系人 |
16 |
|
string |
企业联系人的email地址 |
64 |
zip |
string |
企业邮编 |
6 |
website |
string |
企业网站 |
64 |
intro |
string |
企业简介 |
64 |
URL
http:// open.imoffice.com:5186/sync/sync.php
支持格式
JSON
HTTP请求方式
POST
请求参数
|
必选 |
类型及范围 |
说明 |
cid |
true |
string |
企业 ID |
appKey |
true |
string |
App key |
appcid |
true |
string |
Appcid |
evno |
true |
string |
13 |
MoveId |
true |
string |
移动员工UID(MoveId和MoveUa 至少填写一个) |
MoveUa |
true |
string |
移动员工的账号(MoveId和MoveUa 至少填写一个) |
FromParentId |
true |
string |
员工原部门DID |
ToParentId |
true |
string |
移动到的部门DID |
返回结果
成功
{“Result”:true, ”Msg”:”ok”}
失败
{“Result”:false, ”MsgNo”: 21302}
URL
http:// open.imoffice.com:5186/sync/sync.php
支持格式
JSON
HTTP请求方式
POST
请求参数
|
必选 |
类型及范围 |
说明 |
cid |
true |
String |
企业 ID |
appKey |
true |
String |
App key |
appcid |
true |
String |
Appcid |
evno |
true |
String |
14 |
DeptId |
true |
String |
移动部门DID |
FromParentId |
true |
String |
原部门DID |
ToParentId |
true |
String |
移动到的部门DID |
Type |
false |
String |
分支隐藏 为 1时继承上级部门的属性 |
ApplyToSonDeptFlag |
false |
String |
同上(这2个参数必须同时填写并为1才有效) |
返回结果
成功
{“Result”:true, ”Msg”:”ok”}
失败
{“Result”:false, ”MsgNo”: 21401}
URL
http:// open.imoffice.com:5186/sync/getsync.php
支持格式
JSON
HTTP请求方式
POST
请求参数
|
必选 |
类型及范围 |
说明 |
cid |
true |
string |
cid |
appKey |
true |
string |
App key |
appcid |
true |
string |
Appcid |
evno |
true |
string |
20 |
offset |
false |
string |
偏移量(从第s条读取) |
starttime |
true |
string |
开始时间(格式:unix timestamp) |
endtime |
true |
string |
结束时间(格式:unix timestamp) |
recordnumber |
false |
string |
返回条数(1-1000) |
返回:
成功
{“Result”:true, ” MsgNo”:” ok”, ” Cids”:” [{"cid":"69629"},{"cid":"69629"}]”}
失败
{“Result”:false, ”Msg”:”企业同步失败”,”MsgNo”:10003}
支持格式
JSON
HTTP请求方式
POST
请求参数
|
必选 |
类型及范围 |
说明 |
cid |
true |
string |
要获取的公司信息 |
appKey |
true |
string |
App key |
appcid |
true |
string |
Appcid |
evno |
true |
string |
21 |
offset |
false |
string |
偏移量(从第s条读取) |
starttime |
true |
string |
开始时间(格式:unix timestamp) |
endtime |
true |
string |
结束时间(格式:unix timestamp) |
recordNumber |
false |
string |
返回条数(1-1000) |
返回参数
成功返回:
{"Result":"true","MsgNo":"ok","StructInfo": [{"id":"22","createtime":"1367906660","operation":"{'EventNo':'3','CorpId':'69629','CorpENam':,'CorpShortName':,'CorpAds':,'ContactCountry':,'ContactCity':,'ContactProvince':,'ContactDistrict':,'ContactAddr':,'ContactTel':,'ContactFax':,'ContactPerson':,'ContactEmail':,'ContactPostCode':,'ContactWebSite':,'CorpPlusProperty':,'CorpPlusIndustry':')','CorpPlusScope':'0','CorpPlusEmpNum':'0','CorpPlusComputerNum':'1','CorpPlusDescrip': }"}]}
其中:operation:表示具体操作行为。
EventNo为操作行为标识,分别为:
l 3.企业信息修改
{"EventNo":"3","CorpId":"69629","CorpDomain":"\u4f60\u597d\u80fd.com","CorpCName":"imo \u6d4b\u8bd5","CorpEName":"","CorpShortName":"\u6d4b\u8bd5\u4f01\u4e1a","CorpAds":"","ContactCountry":"\u4e2d\u56fd","ContactProvince":"\u4e0a\u6d77","ContactCity":"\u4e0a\u6d77","ContactDistrict":"\u4e0a\u6d77\u5e02","ContactAddr":"\u529e\u516c\u5730\u5740","ContactTel":"021-11111111","ContactFax":"","ContactPerson":"\u6d4b\u8bd5","ContactEmail":"[email protected]","ContactPostCode":"0","ContactWebSite":"","CorpPlusProperty":"null","CorpPlusIndustry":"(@T,4700)","CorpPlusScope":"0","CorpPlusEmpNum":"0","CorpPlusComputerNum":"1","CorpPlusDescrip":""}
l 12.创建部门
{"EventNo":"12","CorpId":"69629","DeptDescrip":"","DeptName":"test123","DeptAddr":"","DeptTel":"","DeptWebsite":"","ParentDeptId":"0","DeptId":"10"}
l 9.更新部门信息
{"EventNo":"9","CorpId":"69629","DeptId":"15","DeptDescrip":"","DeptAddr":"111","DeptTel":"111","DeptWebsite":"","DeptName":"test111","DeptPlusEFax":""}
l 34.拖动部门
{"EventNo":"34","CorpId":"69629","Version":"3","DeptId":"15","FromParentId":"0","FromPreNodeId":"14","ToParentId":"14","ToPreNodeId":"-1"}
l 53.删除部门及成员
{"EventNo":"53","CorpId":"10000","DeptId":"578"}
此操作被删除部门下子部门和成员一起被删除。
l 11.更新员工信息
{"EventNo":"11","CorpId":"69629","EmpId":"3401502","RAccount":"abc","EmpName":"aaabbbccc","EmpWorkTel":"","EmpEmail":"","EmpMobilePhone":"","EmpDescrip":"","EmpPosition":"","EmpGender":"1","EmpRole":"5","UpdatePwdFlag":"0","EmpIniPassword":"","UpdateSexOrNameFlag":"1","EmpBirthday":"19800101","DeptId":"15"}
l 13.新建员工
{"EventNo":"13","CorpId":"69629","EmpAccount":"abc","CorpAccount":"4539122","EmpName":"abc","EmpBirthday":"19800101","EmpWorkTel":"","EmpEmail":"","EmpGender":"1","EmpPosition":"","EmpMobilePhone":"","EmpRole":"5","EmpDescrip":"","DeptId":"15","EmpId":"10"}
l 14.移动员工
{"EventNo":"14","CorpId":"69629","Version":"6","MoveId":"3401502","FromParentId":"15","FromPreNodeId":"-1","ToParentId":"14","ToPreNodeId":"3401500"}
l 26.删除成员
{"EventNo":"26","CorpId":"10000","EmpId":"3389122"}
失败返回:
{"Result":"false","MsgNo":"20001"}
服务级错误代码
错误代码 |
错误信息 |
详细描述 |
|
通用 |
|||
20001 |
Parameter is null |
参数为空 |
|
20002 |
Parameter cid is null |
企业ID为空 |
|
20003 |
Parameter app key is null |
应程序密钥 |
|
20004 |
Parameter Vaildate error |
参数校验错误 |
|
20005 |
Parameter start time is null |
同步起始时间为空 |
|
20006 |
Parameter end time is null |
同步结束时间为空 |
|
20007 |
Invalid app key |
App key不合法 |
|
20008 |
Invalid server ip |
Server ip 地址不合法 |
|
20009 |
Contain nauthorized Company |
包含未授权的公司cid |
|
20010 |
System Exception |
内部异常 |
|
20011 |
not activated |
未激活 |
|
20012 |
have expired |
已过期 |
|
20013 |
no sync authority |
操作没有授权 |
|
20014 |
Interface busy |
接口忙 |
|
2 |
|
|
|
20201 |
Overstep user numnber |
超出获取数量限制 |
|
20202 |
User empty |
无用户信息 |
|
3 |
|
|
|
20301 |
CorpInfo Empty |
无企业信息 |
|
4 |
|||
20401 |
Overstep dept number |
超出获取部门数 |
|
20402 |
Dept empty |
无部门信息 |
|
5 |
|
|
|
20501 |
User is exist |
成员已存在 |
|
20502 |
Overstep corp user number |
超出企业人数 |
|
20503 |
Overstep dept user number |
超出部门人数 |
|
20504 |
LICENSE FALSE |
LICENSE不足 |
|
20505 |
PUSH USER IN ROOT |
根下不能推成员 |
|
6 |
|
|
|
20601 |
Admin unpermision |
管理员无法修改 |
|
20602 |
Unkown permission type |
未知的成员权限类型 |
|
20603 |
USER_RELATION_EMPTY |
员工关系错误 |
|
7 |
|
|
|
20701 |
Grouphost is undel |
群主无法删除 |
|
20702 |
Admin is undel |
管理员不法删除 |
|
20703 |
User info is empty |
获取用户信息错误 |
|
8 |
|
|
|
20801 |
Dept is exist |
部门已存在 |
|
20802 |
Overstep dept number |
超出部门限制数量 |
|
10 |
|||
21001 |
Have children node |
被删除部门包含成员和部门 |
|
21002 |
Get parentid error |
获取被删除部门父部门出错 |
|
11 |
|||
22001 |
STRUCT_NO_CHANGE |
组织无变动 |
|
22002 |
STRUCT_NUMBER_OVERRUN |
拉取条数超过限制大小 |
|
13 |
|
|
|
21301 |
Parameter miss |
参数缺失 |
|
21302 |
DEPT_NUMBER_OVERRUN |
部门人数超过限制 |
|
21303 |
OPREATION_LOCKED |
操作被锁定 |
|
21304 |
INTERNAL_ERROR |
内部错误 |
|
21305 |
DB_ OPREATION _ERROR |
数据库操作失败 |
|
21306 |
MOVE_IN_ROOT |
根下不能移动 |
|
21307 |
MOVE_IN_SY_DEPT |
不能移动到尚易根目录下 |
|
14 |
|
|
|
21401 |
STRUCT_ CHANGED |
组织架构已经变化 |
|
21402 |
DB_ OPREATION _ERROR |
数据库操作失败 |
|
21403 |
INTERNAL_ERROR |
内部错误 |
|
21404 |
DB_OPREATION_ERROR_HIDE |
数据库操作失败(继承隐藏时发生) |
|
21405 |
INTERNAL_ERROR_HIDE |
内部错误(继承隐藏时发生) |
|
21406 |
Parameter miss |
参数缺失 |
|
21407 |
MOVE_IN_SY_DEPT |
不能移动到尚易根目录下 |
|
21408 |
SY_DEPT_MOVE |
尚易根目录不能被移动 |
|
21409 |
SAME_DEPT_NAME |
发现相同的部门名称 |
|
21410 |
MOVE_IN_CHILD |
部门不能移动到自己的子部门下 |
以下用获取企业信息接口为例:
php:
$cid = ‘123’;
$appKey = ‘96e79218965eb72c92a549dd5a330112’;
$appcid = ‘123’;
$evno = ‘3’
$url =’ http:// open.imoffice.com:5186/sync/getsync.php’;
$process = curl_init($url);
$param = ‘cid=’.$cid.’&appKey=’.$appKey.’&appcid=’.$appcid.’&evno=3’;
curl_setopt($process, CURLOPT_POSTFIELDS, $param);//设置post提交的参数
curl_setopt($process, CURLOPT_POST, 1);//设置post超时
ob_start();
$return = curl_exec($process);//发送post请求
$content = ob_get_contents();
ob_end_clean();
curl_close($process);
echo $content; //输出返回结果
?>
http://www.yxxx.net.cn 西安云翔软件信息科技有限公司