获取增量通讯录
GET
/apps/v1/address-book/changes/{version}
接口描述:接入服务提供给对接的外部应用服务调用,获取指定组织的通讯录增量变更信息。
请求地址:https://service.cheng-xun.cn/api/apps/v1/address-book/changes/{version}?access_token={access_token}
请求方式:GET#
注意事项:
对接应用的服务器端在接收到数据时,需要先处理Add,再处理Update。
如果收到50702的错误码,说明差异太多,请做一次全量同步通讯录。#
请求参数
Authorization
Path 参数
version
string
上一次同步的版本
Query 参数
access_token
string
必需
<= 256 字符
Header 参数
User-Agent
string
可选
默认值:
CX
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://service.cheng-xun.cn/api/apps/v1/address-book/changes/?access_token' \
--header 'User-Agent: CX'
返回响应
🟢200成功
application/json
Body
version
integer
版本信息
enterprise_id
integer
组织ID
enterprise
object
组织信息
id
integer
组织ID
name
string
组织名称
version
integer
当前通讯录版本号
group_enterprise_id
integer
集团id
short_name
string
组织名称简称
enterprise_type
integer
类型
logo_file_path
null
组织图标
added_sectors
array [object {12}]
必需
id
integer
组织部门id
name
string
部门名称
parent_id
integer
父节点id
group_enterprise_id
integer
集团id
enterprise_id
integer
组织id
enterprise_flag
integer
类型
show_order
integer
显示顺序
show_path
string
部门显示路径
name_first_letter
string
部门首字母缩写
name_full_pinyin
string
部门首字母缩写
tree_code
string
部门树代码
remote_reference_id
null
远程引用id
updated_sectors
array [object {12}]
必需
id
integer
组织部门id
name
string
部门名称
parent_id
integer
父节点id
group_enterprise_id
integer
集团id
enterprise_id
integer
组织id
enterprise_flag
integer
类型
show_order
integer
显示顺序
show_path
string
部门显示路径
name_first_letter
string
部门首字母缩写
name_full_pinyin
string
部门首字母缩写
tree_code
string
部门树代码
remote_reference_id
null
远程引用id
deleted_sectors
array[integer]
删除部门ID列表
added_staffs
array [object {21}]
必需
id
integer
用户的通讯录id
account_id
string
帐号id
name
string
名称
sex
string
性别
phone
null
手机号码
email
null
邮箱
group_enterprise_id
integer
集团id
enterprise_id
integer
组织id
name_first_letter
string
姓名首字母缩写
name_first_pinyin
string
姓氏全拼
name_full_pinyin
string
姓名全拼
job_number
string
工作号码
mobile_number
string
电话号码
other_mobile_number1
null
其他手机1
other_mobile_number2
null
其他手机2
office_address
null
办公地址
sector_staffs
array [object {2}]
员工所属部门
remote_reference_id
null
远程引用id
position
string
职位
position_option_id
string
职位ID
position_level
string
职级
updated_staffs
array [object {21}]
必需
id
integer
用户的通讯录id
account_id
string
帐号id
name
string
名称
sex
string
性别
phone
null
手机号码
email
null
邮箱
group_enterprise_id
integer
集团id
enterprise_id
integer
组织id
name_first_letter
string
姓名首字母缩写
name_first_pinyin
string
姓氏全拼
name_full_pinyin
string
姓名全拼
job_number
string
工作号码
mobile_number
string
电话号码
other_mobile_number1
null
其他手机1
other_mobile_number2
null
其他手机2
office_address
null
办公地址
sector_staffs
array [object {2}]
员工所属部门
remote_reference_id
null
远程引用id
position
string
职位
position_option_id
string
职位ID
position_level
string
职级
deleted_staffs
array[integer]
删除员工ID列表
示例
{
"version": 653833347104768,
"enterprise_id": 652267137875968,
"enterprise": {
"id": 652267137875968,
"name": "二七一十四",
"version": 654022299480064,
"group_enterprise_id": 652267137875968,
"short_name": "十四",
"enterprise_type": 0,
"logo_file_path": null
},
"added_sectors": [
{
"id": 653994413223936,
"name": "一七三",
"parent_id": 652267137875968,
"group_enterprise_id": 652267137875968,
"enterprise_id": 652267137875968,
"enterprise_flag": 0,
"show_order": -3,
"show_path": "一七三",
"name_first_letter": "YQS",
"name_full_pinyin": "YIQISAN",
"tree_code": "652267137875968|653994413223936|",
"remote_reference_id": null,
"position": "总经理",
"position_option_id": "913939257303360",
"position_level": "14级"
}
],
"updated_sectors": [
{
"id": 653652329420800,
"name": "一七一",
"parent_id": 652267137875968,
"group_enterprise_id": 652267137875968,
"enterprise_id": 652267137875968,
"enterprise_flag": 0,
"show_order": -1,
"show_path": "一七一",
"name_first_letter": "YQY",
"name_full_pinyin": "YIQIYI",
"tree_code": "652267137875968|653652329420800|",
"remote_reference_id": null,
"position": "总经理",
"position_option_id": "913939257303360",
"position_level": "14级"
}
],
"deleted_sectors": [
653994779326464
],
"added_staffs": [
{
"id": 653994101303296,
"account_id": "70238934839742",
"name": "一一",
"sex": "暂无",
"phone": null,
"email": null,
"group_enterprise_id": 652267137875968,
"enterprise_id": 652267137875968,
"name_first_letter": "yy",
"name_first_pinyin": "YI",
"name_full_pinyin": "YIYI",
"job_number": "1234",
"mobile_number": "",
"other_mobile_number1": null,
"other_mobile_number2": null,
"office_address": null,
"sector_staffs": [
{
"sector_id": 652267137875968,
"show_order": -4
}
],
"remote_reference_id": null
}
],
"updated_staffs": [
{
"id": 653994101303296,
"account_id": "70238934839742",
"name": "",
"sex": "暂无",
"phone": null,
"email": null,
"group_enterprise_id": 652267137875968,
"enterprise_id": 652267137875968,
"name_first_letter": "",
"name_first_pinyin": "",
"name_full_pinyin": "",
"job_number": "1234",
"mobile_number": "",
"other_mobile_number1": null,
"other_mobile_number2": null,
"office_address": null,
"sector_staffs": [
{
"sector_id": 652267137875968,
"show_order": -4
}
],
"remote_reference_id": null
}
],
"deleted_staffs": [
653994688073728
]
}
修改于 2025-04-01 02:36:03