跳转至

员工复职

功能说明

员工离职之后需要复职

接口地址

HTTP请求方式

  • Method: POST
  • Content-Type: application/x-www-form-urlencoded

参数说明

  • 公有参数

    发送请求是必须传入公共参数,详见公共参数

  • 私有参数

参数名称 是否必须 参数类型 长度限制 描述
userid string [1,100] 员工第三方唯一标识,不会变更
enterprise_code string [1,20] 企业编号(集团和运营商必填,企业不填)

请求示例(HTTP)

https://openapi.guanaitong.tech/employee/restore?
access_token=b09a00e9707452e4a86afe95ef731667&
userid=1001&sign=7591e6b8608193c3a1a466428001d4908a87757d&
timestamp=1491812718

请求示例(JAVA SDK)

public class Main {
    public static OpenClient openClient = new OpenClient(Constants.BASE_URL_TEST, "xxx", "xxx");
    public static void main(String[] args) {
        EmployeeRestoreRequest employeeRestoreRequest = new EmployeeRestoreRequest();
        employeeRestoreRequest.setUserId("tom0001");

        openClient.employeeApi().restore(employeeRestoreRequest);
    }
}

返回参数说明

参数名称 描述
code 返回码。详见错误返回码
msg 如果错误,返回错误信息。
data 如果没有错误,返回业务数据

正确返回示例

{
    "code": 0,
    "data": "CJJ003",
    "msg": "OK"
}

错误返回示例

{
    "code": 1000220102,
    "data": null,
    "msg": "员工不存在"
}

常见错误码

错误码 错误信息 排查方法
1000220002 参数验证不通过 检测参数是否符合要求
1000220096 该用户ID对应员工不存在 userid对应员工是否已添加
1000220102 员工不存在 userid对应员工是否已添加
1000240002 enterprise_code校验失败 检查enterprise_code是否是已绑定的编码
other 其他公共错误码 其他公共错误码
回到页面顶部