# 用户信息主动推送同步

# 1 接口说明

员工若有信息更改,可通过此接口批量推送到微卡进行同步,同步可能会有延迟,一般在5分钟内。

# 接口权限申请:

发送需要申请的接口到seasonyuan@tencent.com进行申请(邮件同时也抄送至lydiaxyang@tencent.com , lindayyang@tencent.com , ronniewan@tencent.com),申请时需要注明应用名称、应用APPKEY、及应用使用场景。

# 请求方法:

POST(application/json)

# 请求地址:

https://open.wecard.qq.com/cgi-bin/user/manage/sync-user-info?access_token=ACCESS_TOKEN

# 3 请求参数

# 参数说明:

参数 必填 类型 实例 说明
access_token String cw0INFk56n00KYYiqeDdKriONS2KDMzT 应用凭证
{   
    "raw_data": ""
}

其中raw_data为加密后的数据,解密之后为:

不同身份类型用户的具体字段要求见用户字段说明 (opens new window)

[
    {
        "card_number":"123456789",
        "name":"张三",
        "gender": "男",
        "head_image": "http://xxx/xx.png",
        "card_type": "1",
        "id_card":"4XXX***7",
        "country":"CHN",
        "staff_status": "正常",
        "telephone":"137***8",
        "organization":"AA/BB/CC",
        "campus":"南区",
        "employer":"XX研究所",
        "dorm_number":"A栋206",
        "remark":"00000000",
        "physical_chip_number":"EAEB1234",
        "physical_card_number":"00001234",
        "physical_card_status": "正常",
        "email": "weixiao@tencent.com",
        "expire_at": "2019-01-01 00:00:00",
        "qq": "12345678",
        "nation": "汉族",
        "origin_place": "陕西省",
        "graduated_school": "XX中学",
        "address":"仙桃市郑场镇潘阳村八组"
    },
    {
        "card_number":"123456789",
        "name":"李四",
        "gender": "男",
        "head_image": "http://xxx/xx.png",
        "card_type": "1",
        "id_card":"4XXX***7",
        "country":"CHN",
        "staff_status": "正常",
        "telephone":"137***8",
        "organization":"AA/BB/CC",
        "campus":"南区",
        "employer":"XX研究所",
        "dorm_number":"A栋206",
        "remark":"00000000",
        "physical_chip_number":"EAEB1234",
        "physical_card_number":"00001234",
        "physical_card_status": "正常",
        "email": "weixiao@tencent.com",
        "expire_at": "2019-01-01 00:00:00",
        "qq": "12345678",
        "nation": "汉族",
        "origin_place": "陕西省",
        "graduated_school": "XX中学",
        "address":"仙桃市郑场镇潘阳村八组"
    },
    ...
]

加解密算法见附件

# 4 数据返回

# 响应说明:

{
    "errcode": 0,
    "errmsg": "OK"
}

# 附件

# 加密算法

采用AES对称加密算法(AES/CBC/ZeroPadding 128位模式),具体算法见加解密demo

KEY = APP_KEY
IV = APP_SECRET 前16位。