批量创建员工信息
POST
/eims/api/v2/admin/staffs/actions/batch
部门数据导入的权限验证放在根据组织部门创建校验中
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Body 参 数application/json
员工信息表单
staffs
array[object (StaffImportForm) {11}]
要导入的员工列表
<= 5000 items
realName
string
姓名
<= 30 字符
account
string
账号
正则匹配:
^[a-zA-Z0-9-_]{1,30}$
password
string
登录密码
正则匹配:
^(?![0-9]+$)(?![a-zA-Z]+$)[0-9a-zA-Z-`=\[\];',.~!@#$%^&*()_+|{}:"?]{8,16}$
department
string | null
部门
jobTitle
string | null
职位
<= 30 字符
staffNo
string | null
工号
<= 30 字符
email
string | null
邮箱
<= 128 字符
正则匹配:
^\s*\w+(?:\.?[\w-]+)*@[a-zA-Z0-9]+(?:[-.][a-zA-Z0-9]+)*\.[a-zA-Z]+\s*$
mobile
string | null
手机号
<= 11 字符
remark
string | null
备注
<= 200 字符
userId
string | null
用户 Id
lineNum
integer | null
行数
示例
{
"staffs": [
{
"realName": "张三",
"jobTitle": "",
"department": "",
"staffNo": "",
"mobile": "13843838438",
"account": "zhangsan",
"email": "",
"remark": "",
"orgName": "",
"lineNum": 1,
"password": "qwer1234"
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/eims/api/v2/admin/staffs/actions/batch' \
--header 'Content-Type: application/json' \
--data-raw '{
"staffs": [
{
"realName": "张三",
"jobTitle": "",
"department": "",
"staffNo": "",
"mobile": "13843838438",
"account": "zhangsan",
"email": "",
"remark": "",
"orgName": "",
"lineNum": 1,
"password": "qwer1234"
}
]
}'
返回响应
🟢200成功
application/json
Body
[批量导入员工异常信息集合]
id
string | null
可选
示例
{
"id": 0
}