K12服务体系技术规范 API接口说明

公共-获取用户个人信息

URL:/common/get_user_info

请求方式:GET

Headers:

参数 说明
Authorization access_token访问令牌

参数:

名称 必选 类型 说明
open_id true char 用户唯一标识

响应:

名称 类型 说明
status int 状态
msg char 返回信息
school_code char 学校编码
school_name char 学校名称
term_id int 当前学年
user_type int 用户类型 0:学生 1:老师 2:家长
account char 用户账号
mobile char 手机号
student_open_id int 学生用户open_id
name char 姓名
sex int 性别 1:男 0:女
class_id int 班级id
class_name char 班级名称
grade_id int 年级id
grade_name char 年级名称
identity char 家长身份 1:父亲 2:母亲 3:家属
group_id int 用户组id
group_name char 用户组名称

返回的结果示例:

成功返回:

{
    "user_type": 1,
    "open_id": "3071EC2A-3406-4226-8145-41262FD2D4DC",
    "account": "34781",
    "mobile": "15627591323",
    "bureau_detail": {
        "name": "李文"
    },
    "student_detail": {
        "school_code": "zy001",
        "school_name": "中育实验中学",
        "term_id": 2019,
        "name": "张三",
        "sex": 1,
        "class_id": 87,s
        "class_name": "(1)班",        
        "grade_id": 204,                
        "grade_name": "初三年级"        
    },
    "parent_detail": [
        {
            "school_code": "zy001",         
            "school_name": "中育实验中学",
            "term_id": 2019,
            "student_open_id": "7071EC2A-3406-4226-8145-41262FD2D4YG",
            "name": "李四",              
            "sex": 1,               
            "class_id": 87,             
            "class_name": "(1)班",       
            "grade_id": 204,            
            "grade_name": "初三年级",    
            "identity": 1
        }
    ],
    "teacher_detail": {
        "school_code": "zy001",          
        "school_name": "中育实验中学",  
        "term_id": 2019,
        "name": "李莉",
        "sex": 1,                    
        "group": [
            {
                "group_id": 101,
                "group_name": "管理组",
                "detail":[]
            },
            {
                "group_id": 102,
                "group_name": "任课教师组",
                "detail":[
                    {
                        "course_id":1,
                        "course_name":"语文",
                        "class_id":91,
                        "class_name":"(1)班"
                    },
                    {
                        "course_id":2,
                        "course_name":"数学",
                        "class_id":92,
                        "class_name":"(2)班"
                    }
                ]
            },
            {
                "group_id": 103,
                "group_name": "校级领导组",
                "detail": []
            },      
            {
                "group_id": 104,
                "group_name": "年级领导组",
                "detail": [
                    {
                        "grade_id": 202,
                        "grade_name": "初一年级",
                        "class_id": 0,
                        "class_name": ""
                    }
                ]
            },
            {
                "group_id": 106,
                "group_name": "班主任组",
                "detail": [
                    {
                        "grade_id": 203,
                        "grade_name": "初二年级",
                        "class_id": 93,
                        "class_name": "(3)班"
                    }
                ]
            },          
            {
                "group_id": 107,
                "group_name": "德育组",
                "detail": []
            }
        ]
    }
}

失败返回:

{
    "status": <ErrorCode>,
    "msg": <ErrorMessage>
}