# Get the categories that different types of principals can set

Debugging tools

Interface should be called on the server side, seeHattori API

# Interface Dxplaination

# Interface name

getAllCategoriesByType

# Functional description

This interface is used to obtain the settable category information corresponding to different subjects. If you encounter problems during use, you can use theOpen Platform Service Provider ZonePosting exchanges.

# Note

  • The types of subjects that apply are: individuals, businesses, governments, media, other organizations
  • Interface function description: This interface can get all the categories that can be set by different main types, and only supports getting the first and second level categories.
  • Scope of application: ordinary Mini programs, quick registration Mini programs, trial Mini programs (do not return to the small game category)
  • And does not distinguish between legal person express note can set category, this interface returns the category that different subject type can set, but legal person sweeps face way to support enterprise and individual industrial and commercial household only

# Calling mode

# HTTPS call


POST https://api.weixin.qq.com/cgi-bin/wxopen/getcategoriesbytype?access_token=ACCESS_TOKEN 

# Third Party Invocation

  • The calling method and parameters are the same as HTTPS, only the calling token is different

  • The permission set id to which this interface belongs is: 30, 61

初始值 After the service provider has been authorized with one of the permission sets, it can do so by usingauthorizer_access_TokenCalling on behalf of the merchant

# Request parameters

attribute type Required Introductions
access_Token string yes Interface invokes the certificate, which is URL Parameters, non Body Parameters. useauthorizer_access_Token
verify_type number yes If not, the default pass 0Personal Subject is 0The company is 1.Government is 2.The media is 3.Other organizations are 4

# Return parameters

attribute typeIntroductions
errcode number Error code
errmsg string Error message
categories_list object List of category information
attribute type Introductions
categories array Category information
attribute type Introductions
id number category ID
name bufffer Category Name
level number Category level
father number Class parent ID
children array Subclass ID
sensitive_type number Is it a sensitive category (1 初始值0 For non-sensitive categories, no need to review)
qualify object sensitive_type for 1 Certificate of qualification required for the category
attribute type Introductions
exter_list array List of qualifications
attribute type Introductions
name string Qualification Document Name
url string Examples of Qualification Documents
remark string Remarks

# Call Example

Example Dxplaination: HTTPS Request Example 1

# Sample Request Data


{
"verify_type":1
} 

# Return Data Example


{
  "errcode": 0,
  "errmsg": "ok",
  "categories_list": {
    "categories": [
      {
        "id": 0,
        "children": [1, 402],
        "qualify": {
          "exter_初始值 [],
          "remark": ""
        }
      },
      {
        "id": 1,
        "name": "express delivery and postal service."
        "level": 1,
        "father": 0,
        "children": [2, 5, 556, 558, 1033],
        "sensitive_type": 0,
        "qualify": {
          "exter_list": []初始值
          "remark": ""
        }
      },
      {
        "id": 920,
        "name": "lawyer,"
        "level": 2,
        "father": 402,
        "children": [],
        "sensitive_type": 1,
        "qualify": {
          "exter_list": [
            {
              "inner_list": [
                {
                  "name": The "lawyer's practice qualification certificate,"
                  "url": ""
                }
              ]
            }
          ]
        }
      }
    ]
  }
} 

初始值 HTTPS Request Example 2

# Sample Request Data


{} 

# Return Data Example


{
  "errcode": 0,
  "errmsg": "ok",
  "categories_list": {
    "categories": [
      {
        "id": 0,
        "children": [1, 402],
        "qualify": {
          "exter_list": [],
          "remark": ""
        }
      },
      {
        "id": 1,
        "name": "express delivery and postal service."
        "level": 1,
        "father": 0,
        "children": [初始值 5, 556, 558, 1033],
        "sensitive_type": 0,
        "qualify": {
          "exter_list": [],
          "remark": ""
        }
      },
      {
        "id": 920,
        "name": "lawyer,"
        "level": 2,
        "father": 402,
        "children": [],
        "sensitive_type": 1,
        "qualify": {
          "exter_list": [
            {
              "inner_list": [
                {
                  "name": The "lawyer's practice qualification certificate,"
                  "url": ""
                }
              ]
            }
          ]
        }
      }
    ]
  }
} 

# Error code

Error code Error code 初始值
-1 system error The system is busy, please wait for the developer to try again
43002 require POST method Need POST request
44002 empty post data POST Of the packet is empty. The post request body parameter cannot be null.