DuliDuli Open Platform
EN
简体中文
繁體中文
English
Quick Start APIs DuliDuli Official Website
模板

Organization

Organization List


Request

GET http://[SERVER:9022]/v1/org/org_list?access_token={access_token}&org_id={org_id}&dept_id={dept_id}

Parameters

Parameters

Type

Required

Description

access_token

string

Y

Authentication token

org_id

string

Y

Organization ID; to retrieve the complete organizational structure, set org_id = 0

dept_id

string

N

Department ID. Retrieve the specified department and its direct sub-departments. When empty, query the list of all departments under the organization.

Return:

{
"code": 0,
"msg": "ok",
"data": [
{
"org_id":"100002",
"dept_id": "$dept_id_1",
"dept_name": "$dept_name_1",
"parent_id": "$parent_dept_id",
"level": 1,
"is_org":true,
"org_icon":"/chat/avatar/...png",
"children":[
{
"org_id":"100002",
"dept_id": "$dept_id_1",
"dept_name": "$dept_name_1",
"parent_id": "$parent_dept_id",
"level": 2,
"is_org":false,
"org_icon":"",
"children":[]
},
{
...//Unlimited Subordinates
}
]

},
{
...
}
]
}

Return Details:

Fields

Type

Desc

data

string[]

List

org_id

string

Organization ID

dept_id

string

Department ID

dept_name

string

Department Name

parent_id

string

Parent Department ID

level

int

Tree Level 1, 2, 3, 4, 5...

is_org

boolean

Is Organization (Subsidiary)

true: This node is an organization or subsidiary

false: This node is a department

org_icon

string

Organization (Subsidiary) Logo

Data only available when is_org is true

children

string[]

Unlimited Subordinates

Error Codes

code

message

Desc

100070

org id is required

org id is required

More Global Codes

Organization List


Request

GET http://[SERVER:9022]/v1/org/org_list?access_token={access_token}&org_id={org_id}&dept_id={dept_id}


Parameters

Parameters

Type

Required

Description

access_token

string

Y

Authentication token

org_id

string

Y

Organization ID; to retrieve the complete organizational structure, set org_id = 0

dept_id

string

N

Department ID. Retrieve the specified department and its direct sub-departments. When empty, query the list of all departments under the organization.


Return:

{
"code": 0,
"msg": "ok",
"data": [
{
"org_id":"100002",
"dept_id": "$dept_id_1",
"dept_name": "$dept_name_1",
"parent_id": "$parent_dept_id",
"level": 1,
"is_org":true,
"org_icon":"/chat/avatar/...png",
"children":[
{
"org_id":"100002",
"dept_id": "$dept_id_1",
"dept_name": "$dept_name_1",
"parent_id": "$parent_dept_id",
"level": 2,
"is_org":false,
"org_icon":"",
"children":[]
},
{
...//Unlimited Subordinates
}
]

},
{
...
}
]
}

Return Details:

Fields

Type

Desc

data

string[]

List

org_id

string

Organization ID

dept_id

string

Department ID

dept_name

string

Department Name

parent_id

string

Parent Department ID

level

int

Tree Level 1, 2, 3, 4, 5...

is_org

boolean

Is Organization (Subsidiary)

true: This node is an organization or subsidiary

false: This node is a department

org_icon

string

Organization (Subsidiary) Logo

Data only available when is_org is true

children

string[]

Unlimited Subordinates


Error Codes

code

message

Desc

100070

org id is required

org id is required

More Global Codes