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

# 1 接口说明

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

# 2 接口地址

# 请求方法:

POST(application/json)

# 请求地址:

https://uni.weixiao.qq.com/open/identity/sync-stu-info

# 3 请求参数

# 参数说明:

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

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

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

[
    {
        "school_code":"1042365213",
        "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",
        "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":"仙桃市郑场镇潘阳村八组"
    },
    {
        "school_code":"1042365213",
        "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",
        "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":"仙桃市郑场镇潘阳村八组"
    },
    ...
]

加解密算法见附件

# 4 数据返回

# 响应说明:

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

# 附件

# 加密算法

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

KEY = APP_KEY
IV = APP_SECRET 前16位。