员工新增¶
功能说明¶
- 员工标识
user_id如果是数字和字母的组合会默认当做关爱通员工工号,不符合会随机生成工号与之匹配; - 手机号
mobile支持国内外手机号,国外手机必填区号mobile_area,不填写区号默认为86;
接口地址¶
- 测试环境: https://openapi.guanaitong.tech/tenant/enterprise/employee/add
- 生产环境: https://openapi.guanaitong.com/tenant/enterprise/employee/add
参数说明¶
-
公有参数
发送请求是必须传入公共参数,详见公共参数
-
私有参数
参数名称 是否必须 参数类型 长度限制 描述 user_id 是 string [1,20] 员工唯一标识 enterprise_id 是 int 企业编码 name 是 string [1,50] 员工姓名 gender 否 int [1] 性别,1:男;2:女;3:未知 email 否 string [1,100] 邮箱,企业内唯一 mobile_area 否 int [1,10] 手机区号,国外手机必填,不填默认为国内手机区号(86) mobile 否 string [6,20] 手机,企业内唯一 birth_day 否 string [10] 生日,格式为yyyy-MM-dd,如:1991-01-01 entry_day 否 string [10] 入职日,格式为yyyy-MM-dd,如:2016-02-03
请求示例¶
POST /tenant/enterprise/employee/add HTTP/1.1
Host: openapi.guanaitong.tech
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
access_token=1ba50b8f418a3ceeba989d7b789de149&enterprise_id=1209&
user_id=SN112&name=zhangfei1&email=12345678@qq.com&mobile_area=86&mobile=15588652444&entry_day=2016-10-01&birth_day=1991-02-20×tamp=1492671463&sign=ada2316deb82816d61a7a40dfba3553a34a2e82e&gender=1
返回参数说明¶
| 参数说明 | 描述 |
|---|---|
| code | 返回码,0代表正确返回 |
| msg | 如果错误,返回错误信息。 |
| data | 员工工号 |