top
关闭

开发者登录

组织机构接口

主要使用场景:组织机构接口7.0

1、获取下级组织列表7.0

基础 需要授权

该接口能获取下一级组织列表(包含直属组织、下级组织),不越级提供下N级

前置条件

获取接口访问凭证:accessToken

请求说明

urlhttps://gateway.tianyuyun.com/user/openapi/org-tree/get-child-list?org_id=34a84298f98511eaa05a8e7bcf652d8f&accessToken={{accessToken}}
请求方式get
是否需要鉴权
请求数限制
接口方向第三方应用->开放平台

参数说明

序号 字段名 约束 类型 长度 说明

1

org_id

必选

String

当前组织id

2

child_type

可选

String

下级类型(1直属组织,2下级组织,3关联组织),与参数is_filter互斥,不能同时使用,多个使用英文逗号分隔

3

is_filter

可选

Int

是否过滤为不同的类型(按照直属,下级,关联3类返回)(1是,0否,默认否,选择1时返回的结构不同,请注意)

4

org_type

可选

String

下级机构的类型("1": "机构","2": "学校","3": "校区","4": "部门","5": "学段","6": "年级","7": "班级","8": "企业机构","9": "教学工作室","10": "平台"),多个使用英文逗号分隔

返回说明

序号 字段名 约束 类型 长度 说明

1

code

必选

string

结果编码,000000:成功, 100001:失败

2

message

必选

string

结果描述

3

result

可选

json[]

结果描述

3.1

org_id

必选

string

组织id

3.2

org_name

必选

string

组织名称

3.3

org_type

必选

string

组织类型("1": "机构","2": "学校","3": "校区","4": "部门","5": "学段","6": "年级","7": "班级","8": "企业机构","9": "教学工作室","10": "平台")

3.4

child_type

必选

string

所属类别,1直属组织,2下级组织

3.5

has_child

可选

string

是否有下级组织,0:没有;1:有

3.6

has_platform

必选

string

是否有开通平台,0:没有;1:有

3.7

display_order

必选

int

排序

示例

请求示例
https://gateway.tianyuyun.com/user/openapi/org-tree/get-child-list?accessToken={{accessToken}}&org_id=34a84298f98511eaa05a8e7bcf652d8f
返回示例
{
    "code": "000000",
    "result": [
        {
            "org_id": "fc861290f98511eabe9c8e7bcf652d8f",
            "org_name": "苏州关南中学",
            "org_type": "2",
            "has_child": "0",
            "has_platform": "0",
            "child_type": "1",
            "display_order": "1600416445"
        },
        {
            "org_id": "94385396006b11ebbd58fa377e40e9a5",
            "org_name": "测试机构",
            "org_type": "1",
            "has_child": "0",
            "has_platform": "0",
            "child_type": "1",
            "display_order": "1601174760"
        },
        {
            "org_id": "41622ed20c2b11eb9cb1e6c13199e9ac",
            "org_name": "振华中学",
            "org_type": "2",
            "has_child": "0",
            "has_platform": "0",
            "child_type": "1",
            "display_order": "1602466545"
        },
        {
            "org_id": "2764eed80c2c11eb871ae6c13199e9ac",
            "org_name": "苏州市立达中学校",
            "org_type": "2",
            "has_child": "0",
            "has_platform": "0",
            "child_type": "1",
            "display_order": "1602466934"
        },
        {
            "org_id": "dd3a77640c2c11eba155e6c13199e9ac",
            "org_name": "苏州市振吴实验学校",
            "org_type": "2",
            "has_child": "0",
            "has_platform": "0",
            "child_type": "1",
            "display_order": "1602467239"
        },
        {
            "org_id": "357a7df20c2d11ebaab5e6c13199e9ac",
            "org_name": "苏州市盲聋学校",
            "org_type": "2",
            "has_child": "0",
            "has_platform": "0",
            "child_type": "1",
            "display_order": "1602467387"
        },
        {
            "org_id": "227f37fa0c2e11eba155e6c13199e9ac",
            "org_name": "苏州市景范中学校",
            "org_type": "2",
            "has_child": "0",
            "has_platform": "0",
            "child_type": "1",
            "display_order": "1602467785"
        },
        {
            "org_id": "4a98af960c2e11ebaab5e6c13199e9ac",
            "org_name": "江苏省新苏师范学校附属小学",
            "org_type": "2",
            "has_child": "0",
            "has_platform": "0",
            "child_type": "1",
            "display_order": "1602467852"
        },
        {
            "org_id": "b9180e760c2e11eba155e6c13199e9ac",
            "org_name": "苏州市彩香实验中学校",
            "org_type": "2",
            "has_child": "0",
            "has_platform": "0",
            "child_type": "1",
            "display_order": "1602468037"
        },
        {
            "org_id": "abafa674218a11eb9411862a97ea0e3b",
            "org_name": "苏州市电化教育馆",
            "org_type": "1",
            "has_child": "0",
            "has_platform": "0",
            "child_type": "1",
            "display_order": "1604816503"
        }
    ],
    "_timestamp": "1631156317.7171",
    "_runtime": "0.0597"
}