HTTP请求
POST https://api.mokahr.com/api-platform/v2/syncCandidates
请求body参数(application/json)
字段 | 必填 | 类型 | 描述 |
---|---|---|---|
candidateName | 是 | string | 候选人姓名 |
candidatePhone | 是 | string | 候选人手机号 |
candidateEmail | 是 | string | 候选人邮箱 |
note | 否 | string | 备注 |
channelType | 否 | string | 渠道类型 |
sourceStatistics | 否 | string | 来源效果 |
channelName | 否 | string | 渠道 |
source | 否 | int | 来源 |
appliedAt | 否 | string | 申请时间 |
jobId | 是 | string | 职位ID |
candidateAge | 否 | integer | 候选人年龄 |
candidateGender | 否 | string | 候选人性别 |
candidateLastCompany | 否 | string | 最近公司 |
candidateLastSpeciality | 否 | string | 最近毕业专业 |
candidateAcademicDegree | 否 | string | 最高学历 |
educationInfo | 否 | array | 教育经历 |
educationInfo[].school | 否 | string | 学校名称 |
educationInfo[].startDate | 否 | 格式遵从ISO8601标准 string | 开始时间 |
educationInfo[].endDate | 否 | 格式遵从ISO8601标准 string | 结束时间 |
educationInfo[].speciality | 否 | string | 学习专业 |
educationInfo[].academicDegree | 否 | string | 学历 |
experienceInfo | 否 | array | 工作经验 |
experienceInfo[].company | 否 | string | 公司名称 |
experienceInfo[].startDate | 否 | 格式遵从ISO8601标准 string | 开始时间 |
experienceInfo[].endDate | 否 | 格式遵从ISO8061标准 string | 结束时间 |
experienceInfo[].title | 否 | string | 工作职位 |
experienceInfo[].summary | 否 | string | 工作职责 |
projectInfo | 否 | array | 项目经验 |
projectInfo[].projectName | 否 | string | 项目名称 |
projectInfo[].startDate | 否 | 格式遵从ISO8601标准 string | 开始时间 |
projectInfo[].endDate | 否 | 格式遵从ISO8601标准 string | 结束时间 |
projectInfo[].title | 否 | string | 项目中担任的> 职责 |
projectInfo[].projectDescription | 否 | string | 项目功能描述 |
projectInfo[].responsibilities | 否 | string | 项目中的职责 |
practiceInfo | 否 | array | 实习经历 |
practiceInfo[].company | 否 | string | 公司名称 |
practiceInfo[].title | 否 | string | 职位名称 |
practiceInfo[].startDate | 否 | 格式遵从ISO8601标准 string | 开始时间 |
practiceInfo[].endDate | 否 | 格式遵从ISO8601标准 string | 结束时间 |
practiceInfo[].summary | 否 | string | 工作职责 |
jobIntention | 否 | object | 求职意向 |
jobIntention.aimSalary | 否 | string | 期望薪资 |
jobIntention.forwardLocation | 否 | string | 期望城市 |
selfDescription | 否 | object | 自我描述 |
selfDescription.personal | 否 | object | 自我描述,简介 |
customFields[].id | 否 | integer | 自定义字段id |
customFields[].value | 否 | string | 自定义字段值 |
customFields[].index | 否 | number | 如果当前模块数据是一个数组且含有自定义字段,则该值必填且与数组下标一致(备注:支持自定义模块数据) |
talentPoolId | 是 | int | 若是入职人才库,需填写:hired_type、hired_time |
是 | string | 用户邮箱 | |
hiredTime | 否 | string | 入职时间 |
isResignWriteJob | 否 | boolean | 是否回写离职信息 |
resignJobName | 否 | string | 离职职位 |
resignDepartment | 否 | string | 离职部门 |
reason | 否 | int | 离职原因 |
detail | 否 | string | 离职详情 |
time | 否 | string | 离职时间(日期格式为:ISO8601) |
political | 否 | string | 政治面貌 |
certificateType | 否 | string | 证件类型 |
citizenId | 否 | string | 证件号码
请求body参数 (multipart/form-data方式)
字段 | 类型 | 描述 |
---|---|---|
candidateInfo | string | json格式的字符串,字段同json请求方式的body |
resume | file | 简历文件 |
attachments | file | 附件文件,可以同时传多个 |
返回
返回body的JSON数据如下:
字段 | 类型 | 描述 |
---|---|---|
msg | string | 报错信息 |
code | integer | 返回码 |
data | object | 返回数据 |
可能的错误信息
code | errorMessage | 说明 |
---|---|---|
200 | success | 成功 |
1240040102 | channel_source.error | 渠道来源错误 |
1240040104 | talent_pool_Id.error | 人才库错误 |
1240040105 | userId.error | 用户id错误(a.不存在该用户;b.ID错误) |
1240040106 | user_permission.error | 用户无权限 |
请求样例 (application/json)
$ curl https://api.mokahr.com/api-platform/v2/syncCandidates \
-u 'your_api_key:' \
-X PUT \
-H 'Content-Type: application/json' \
-d '{ "orgId":"livingsimple", "candidateName": "test", "candidatePhone": "18700998899", "candidateEmail": "1234@test.com", "note": "测试备注", "talentPoolId": 200000131, "email": "xiedi@mokahr.com", "resignDepartment": "离职部门", "reason": 1, "detail": "世界那么大,我想去看看", "time": "2020-01-01 00:00:00", "channelType": 5, "channelName": "人才库", "source": 0, "jobId": "07af7045-b4e7-43eb-ba64-87128c4df3bf", "candidateAge": 18, "candidateGender": "男", "candidateLastCompany": "天南", "candidateLastSpeciality": "化工", "candidateAcademicDegree": "本科", "hiredTime": "2020-01-01 00:00:00", "educationInfo": [ { "school": "北京大学", "startDate": "2014-09", "endDate": "2017-06", "speciality": "软件工程", "academicDegree": "本科" } ], "experienceInfo": [ { "company": "百度", "startDate": "2014-09", "endDate": "2017-06", "title": "初级工程师", "summary": "负责产品功能实现" },{ "company": "百度", "startDate": "2014-09", "endDate": "2017-06", "title": "初级工程师", "summary": "负责产品功能实现" } ], "projectInfo": [ { "projectName": "项目1", "startDate": "2017-01", "endDate": "2017-11", "projectDescription": "项目功能描述", "title": "后端工程师", "responsibilities": "项目职责" }, { "projectName": "项目2", "startDate": "2017-01", "endDate": "2017-11", "projectDescription": "项目功能描述", "title": "后端工程师", "responsibilities": "项目职责" } ], "practiceInfo": [ { "company": "腾讯", "title": "实习工程师", "startDate": "2017-01", "endDate": "2017-11", "summary": "负责简单的功能实现" },{ "company": "腾讯", "title": "实习工程师", "startDate": "2017-01", "endDate": "2017-11", "summary": "负责简单的功能实现" } ], "jobIntention": { "aimSalary": "7000-13000元/月", "forwardLocation": "北京" }, "selfDescription": { "personal": "人经历丰富,在校担任过部长,主持人以及新生教官。" }, "customFields": [ { "id": 146, "value": "22", "index": 0 }, { "id": 121, "value": "22", "index": 10 }, { "id": 124, "value": "bbb", "index": 0 }, { "id": 130, "value": {"endDate":"2020-01","startDate":"2021-01"}, "index": 0 } ], "isResignWriteJob": true, "resignJobName": "工程师", "resignJobType": "技术" }'
2
3
4
5
请求样例(multipart/form-data方式)
$ curl https://api.mokahr.com/api-platform/v2/syncCandidates \
-u 'your_api_key:' \
-X PUT \
-H 'Content-Type: multipart/form-data' \
-F 'basicInfo={"candidateName": "王五","age": 20,"gender": "男","candidatePhone": "13800000000","candidateEmail":"test@mokahr.com","jobId":"330fd7e3-45a1-4705-828c-7e1beafad355","talentPoolId":200004785,"email":"test@mokahr.com"}' \
-F 'resume=@/path/to/resume/张三.pdf' \
-F 'attachments=@/path/to/attachments/attach1.txt'
2
3
4
5
6
7
返回示例
{
"code": 200,
"msg": "success",
"data": {
"applicationId": 189316652,
"candidateId": 168776432
}
}
2
3
4
5
6
7
8
失败返回实例
{
"code": 40040102,
"msg": "找不到归档原因,归档信息错误"
}
2
3
4