开发
API

【泛知识】查询资质

接口介绍

该接口用于查询已添加和审核中的资质简要信息,单次查询资质数不可超过 50。

使用限制

接口说明

  • 教师资质查询以 ObjectId 以及行业分级为查询粒度
  • 机构资质查询以 ObjectId 为查询粒度

注:ObjectId 从添加资质接口处获取。

请求

基本信息

HTTP URL

https://developer-product.zijieapi.com/product/api/query_qualification

HTTP Method

POST

权限要求

AccessToken鉴权

请求头

参数名

参数类型

备注

示例

Content-Type

string

请求的MIME类型,统一为application/json

"application/json"

请求参数

参数名

参数类型

是否必须

描述

示例

access_token

string

接口调用凭证

"0801121846735352506a356a67395167574457583155554e67654321"

appid

string

小程序appid

"tt12fd9846e1023401"

object_id_with_classifications

array

老师资质审核信息

[
        {
            "object_type": 1,
            "object_id": "i7099001343589662723",
            "first_class": 0,
            "second_class": 0,
            "third_class": 0
        },
        {
            "object_type": 1,
            "object_id": "t7096118881041448963",
            "first_class": 70000,
            "second_class": 70500,
            "third_class": 0 
        },
        {
            "object_type": 1,
            "object_id": "t7097099422908663821",
            "first_class": 50000,
            "second_class": 50300,
            "third_class": 0 
        }
    ]

参数说明

object_id_with_classification--资质查询单元

参数名

参数类型

是否必须

描述

示例

object_type

enum

资质类型选择:1-老师,2-机构,参见本章节最后枚举说明部分

1

object_id

string

资质ID,由添加接口获取

"T3253426234322"

first_class

number

否(object_type=1时必须)

行业一级分类

30000

second_class

number

否(object_type=1时必须)

行业二级分类

30100

third_class

number

否(object_type=1时必须)

行业三级分类

0

示例

{
  "access_token": "080112184676444244166471506b427341456a414e5646744d773d3d",
  "appid": "tt053873859a00623001",
  "object_id_with_classifications": [
    {
      "object_type": 1,
      "object_id": "i7099005143589662723",
      "first_class": 0,
      "second_class": 0,
      "third_class": 0
    },
    {
      "object_type": 1,
      "object_id": "t7096818881041442963",
      "first_class": 70000,
      "second_class": 70500,
      "third_class": 0
    },
    {
      "object_type": 1,
      "object_id": "t7097099402900663821",
      "first_class": 50000,
      "second_class": 50300,
      "third_class": 0
    },
    {
      "object_type": 1,
      "object_id": "t7080104044114242600",
      "first_class": 30000,
      "second_class": 30100,
      "third_class": 0
    }
  ]
}

响应

响应体

参数名

参数类型

描述

示例

err_no

number

错误码,0为成功

0

err_msg

string

错误内容

"success"

log_id

string

日志id,用于查询错误

"101210271802130982251451520919C123"

data

object

返回数据,成功后返回各个查询主体的已上架资质信息和最近一次审核信息,若两个信息均未查到,则对应项返回为空

{
        "qualifications": [
            {
                "qualification_on_shelf": {
                    "third_class": 0,
                    "object_type": 2,
                    "object_id": "I1099005343589662723",
                    "status": 1,
                    "object_name": "****",
                    "nick_name": "昵称",
                    "first_class": 0,
                    "second_class": 0
                },
                "qualification_reviewing": {
                    "object_id": "I1099005343589662723",
                    "status": 12,
                    "object_name": "****",
                    "nick_name": "昵称",
                    "first_class": 0,
                    "second_class": 0,
                    "third_class": 0,
                    "object_type": 2
                }
            },
            {
                "qualification_on_shelf": {},
                "qualification_reviewing": {
                    "first_class": 70000,
                    "second_class": 70500,
                    "third_class": 0,
                    "object_type": 1,
                    "object_id": "T7096818881041448963",
                    "status": 13,
                    "object_name": "陈*",
                    "nick_name": "老陈",
                    
                }
            },
            {
                "qualification_on_shelf": {
                    "first_class": 50000,
                    "second_class": 50300,
                    "third_class": 0,
                    "object_type": 1,
                    "object_id": "T1097099402908663821",
                    "status": 1,
                    "object_name": "邓**",
                    "nick_name": "老邓"
                },
                "qualification_reviewing": {
                    "nick_name": "老邓",
                    "first_class": 50000,
                    "second_class": 50300,
                    "third_class": 0,
                    "object_type": 1,
                    "object_id": "T1097099402908663821",
                    "status": 12,
                    "object_name": "邓**"
                }
            }
        ]
    }

参数说明

qualifications--返回资质信息列表

名称

类型

描述

示例值

qualification_on_shelf

object

(类型名:qualification)

已上架的资质

{
     "object_type": 2,
     "object_id": "I1099005343589662723",
     "status": 1,
     "object_name": "****",
     "nick_name": "昵称",
     "first_class": 0,
     "second_class": 0,
     "third_class": 0
}

qualification_reviewing

object

(类型名:qualification)

最近一次的资质审核记录

{
     "object_type": 2,
     "object_id": "I1099005343589662723",
     "status": 12,
     "object_name": "****",
     "nick_name": "昵称",
     "first_class": 0,
     "second_class": 0,
     "third_class": 0
}

qualification--详细资质信息

名称

类型

描述

示例值

object_type

enum

资质类型选择:1-老师,2-机构,参见本章节最后枚举说明部分

1

object_id

string

资质ID,由添加接口获取

"T3253426234322"

object_name

string

资质主体名称,若为教师,则脱敏后显示

"张*"

status

number

资质当前状态,主要有以下几种情况:

1-资质已上架,

2-资质已失效,

11-资质正在审核中,

12-资质已审核通过,

13-资质审核未通过,

其中,1和2只会出现在qualification_on_shelf中,11、12、13则只出现在qualification_reviewing中

11

nick_name

string

资质主体昵称

"张三"

first_class

number

行业一级分类

30000

second_class

number

行业而级分类

30100

third_class

number

行业三级分类

0

示例

正常返回

{
  "err_no": 0,
  "err_msg": "success",
  "log_id": "202205201747090102100881591fceaf5c",
  "data": {
    "qualifications": [
      {
        "qualification_on_shelf": {
          "third_class": 0,
          "object_type": 2,
          "object_id": "I1099005343589662723",
          "status": 1,
          "object_name": "****",
          "nick_name": "昵称",
          "first_class": 0,
          "second_class": 0
        },
        "qualification_reviewing": {
          "object_id": "I1099005343589662723",
          "status": 12,
          "object_name": "****",
          "nick_name": "昵称",
          "first_class": 0,
          "second_class": 0,
          "third_class": 0,
          "object_type": 2
        }
      },
      {
        "qualification_on_shelf": {},
        "qualification_reviewing": {
          "first_class": 70000,
          "second_class": 70500,
          "third_class": 0,
          "object_type": 1,
          "object_id": "T7096818881041448963",
          "status": 13,
          "object_name": "陈*",
          "nick_name": "老陈"
        }
      },
      {
        "qualification_on_shelf": {
          "first_class": 50000,
          "second_class": 50300,
          "third_class": 0,
          "object_type": 1,
          "object_id": "T1097099402908663821",
          "status": 1,
          "object_name": "邓**",
          "nick_name": "老邓"
        },
        "qualification_reviewing": {
          "nick_name": "老邓",
          "first_class": 50000,
          "second_class": 50300,
          "third_class": 0,
          "object_type": 1,
          "object_id": "T1097099402908663821",
          "status": 12,
          "object_name": "邓**"
        }
      }
    ]
  }
}

异常返回

{
  "err_no": 10045,
  "log_id": "2022052018072301020402815403b60957",
  "err_msg": "资质id与所输入的资质类型不匹配"
}

枚举参数

object_type--资质主体类型

资质类型

资质编码

老师

1

机构

2

qualification -> status--资质主体状态

资质主体类型

资质主体编码

已上架

1

已失效

2

正在审核中

11

审核通过

12

审核未通过

13

点击纠错
该文档是否对你的开发有所帮助?
有帮助
没帮助
该文档是否对你的开发有所帮助?
有帮助
没帮助