# 主动推送请求更新学生信息

# 1 接口说明

校方系统内学生若有信息更改,可通过此接口主动推送到腾讯微卡进行同步,同步可能会有延迟,一般在5分钟内。

# 2 接口地址

# 请求方法:

POST(application/json)

# 请求地址:

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

注:若私有化部署,接口地址域名变更私有化域名,接口地址前缀:私有化域名+/kong,示例:https://xxx.com/kong/cgi-bin/user/manage/sync-user-info

# 3 请求参数

# 参数说明:

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

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

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

[
    {
        "card_number":"123456789",
        "name":"张三",
        "gender": "男",
        "head_image": "http://xxx/xx.png",
        "grade":"2016",
        "college":"信息科学与技术学院"
        "profession":"计算机系",
        "class":"软件1班",
        "identity_type":"学生",
        "identity_title": "经理/总监/部长/本科生...",
        "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",
        "grade":"2016",
        "college":"信息科学与技术学院"
        "profession":"计算机系",
        "class":"软件1班",
        "identity_type":"学生",
        "identity_title": "经理/总监/部长/本科生...",
        "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位。