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

Update Department


Request Method

POST http://[SERVER:9022]/v1/org/update_dept?access_token={access_token}

Request Example:

{
"org_id": "$org_id",
"dept_id": "$dept_id",
"dept_name": "$dept_name",
"sort_id": $sort_id,
"dept_head_list":[$account_id_1,$account_id_2],
}

Request Parameters

Parameters

Type

Required

Description

org_id

string

Y

Organization ID

dept_id

string

Y

Department ID

dept_name

string

Y

Department Name. Cannot exceed 32 characters (including Chinese characters and English letters)

sort_id

int

Y

Integer. Sort order within the parent department. The smaller the value, the higher the priority. Enter 0 to auto-generate. Duplicate values are not allowed among sibling departments (global uniqueness is recommended)

dept_head_list

string[]

N

Department heads. Supports multiple, represented as a string array. Duplicates will overwrite old data.

Return:

{
"code": 0,
"msg": "ok",
"data": {
"dept_id": "$dept_id"
}
}

Return Details:

Fields

Type

Desc

dept_id

string

Department ID

Error Codes

code

message

Desc

100080

Invalid dept name

Invalid dept name

100040

Invalid org id

Invalid org id

100065

Invalid params

Invalid params

Request Method

POST http://[SERVER:9022]/v1/org/update_dept?access_token={access_token}


Request Example:

{
"org_id": "$org_id",
"dept_id": "$dept_id",
"dept_name": "$dept_name",
"sort_id": $sort_id,
"dept_head_list":[$account_id_1,$account_id_2],
}


Request Parameters

Parameters

Type

Required

Description

org_id

string

Y

Organization ID

dept_id

string

Y

Department ID

dept_name

string

Y

Department Name. Cannot exceed 32 characters (including Chinese characters and English letters)

sort_id

int

Y


Integer. Sort order within the parent department. The smaller the value, the higher the priority. Enter 0 to auto-generate. Duplicate values are not allowed among sibling departments (global uniqueness is recommended)

dept_head_list

string[]

N

Department heads. Supports multiple, represented as a string array. Duplicates will overwrite old data.


Return:

{
"code": 0,
"msg": "ok",
"data": {
"dept_id": "$dept_id"
}
}

Return Details:

Fields

Type

Desc

dept_id

string

Department ID


Error Codes

code

message

Desc

100080

Invalid dept name

Invalid dept name

100040

Invalid org id

Invalid org id

100065

Invalid params

Invalid params