# 用户信息定时同步

# 1 接口说明

此接口为全量用户的信息同步,频率是每个月1次,主要用于对信息没对齐的用户做校正,如果需要及时更新的,请参照信息同步(主动推送)接口。

# 2 接口地址

企业需提供信息同步的接口,腾讯微卡会定期去同步员工的最新信息

# 3 请求参数

{
    "app_key":APP_KEY,
    "raw_data": ""
}

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

{
    "card_numbers": [
        "123456789",
        "234567891",
        ...
    ]
}

加解密算法见附件

# 4 数据返回

成功返回:

{
    "errcode":0
}

注意:

  • app_key 跟请求时的 app_key 保持一致。
  • raw_data 为加密后的数据。

raw_data解密应为 :(加密算法见附件)

不同身份类型用户的具体字段要求见用户字段说明

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

失败返回:

{
    "errcode":1,
    "errmsg":""
}

# 附件

# 加密算法

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

KEY = APP_KEY
IV = APP_SECRET 前16位。