niuya--- title: Moka API文档 language_tabs: # must be one of https://git.io/vQNgJ - shell: Code
search: true
Switch document version/platform
V1 version
Switch toV1 version
v2 version
Switch toV2 version
Exam/Assessment、PES(Pre-employment screening)、Video interview interface guidance (platform)
Switch toExam/Assessment、PES(Pre-employment screening)、Video interview interface guidance
Overall flow chart/flowchart
Bind authentication/Oauth
Exam/Assessment、PES(Pre-employment screening)、Video interviews need to be bound separately
a、Bind steps
1.The third-party provider provides the URL for pushing the token and the function URL (according to the type of third-party provider, the URL for different services is provided. For example, the third-party provider of the exam provides the URL for creating the exam).
2.CSM issues clientId and clientSecret to third-party providers.
3.The third-party provider directs the user to the moka authentication page with clientId and redirectUri.
4.After the verification is successful, moka's internal binding is successful, and then it will jump back to redirectUri with a one-time code.
5.The third-party supplier uses code and clientSecret to request moka to provide API to get accessToken, refreshToken, appId (each binding generates a unique value, appId is bound to mokaUser, appId is bound to third-party supplier user), third-party supplier binding success.
Addition
The third-party provider maintains the accessToken through refreshToken and is valid for a long time. If there are special circumstances, you can contact CSM to provide a push token service (push to the URL provided in step 1).
b、Authentication interface
a.mokamoka authentication webpage
Request address: https://app.mokahr.com/oauth/login
Request method: GET
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
clientId | Yes | String | client' s unique identifier generated by Moka |
redirectUri | Yes | String | redirect address Must be consistent with the address filled in when opening the account |
scope | Yes | String | The third-party supplier has permission exam: Exam, evaluation: Assessment, interview: Video interview, survey: PES(Pre-employment screening) |
state | No | String | When calling back, the state parameter will be returned to the third-party application, and the developer of the third-party application can verify the validity of the state parameter (or record the location of the user authorization page) |
Response:(After binding,,the browser page will redirect to the callback address)
redirectUri?code=xxxx
For example, :http://www.xxx.com/redirect?code=xxx
Note::
1、The code parameter will be spliced to the callback address url
2、The code will be expired in 5 minutes
---------------------------------------------------------------------------------------
b.GetaccessToken
Request address: https://api.mokahr.com/api/oauth/token
Request method: POST
bodyType: application/x-www-form-urlencoded
RequestHeaders: Content-Type: application/x-www-form-urlencoded
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
code | Yes | String | The code got in last step |
clientId | Yes | String | available at launch |
clientSecret | Yes | String | available at launch |
redirectUri | Yes | String | The redirectUri filled in last step |
hireMode | No | integer | Recruitment mode, 1:experienced hires;2:Campus recruitment。If you don't fill in, it will be bound by default。 |
Response result:
Field | Type | Description |
---|---|---|
accessToken | String | The token to visit Moka |
accessTokenExpiresAt | String | tokenExpiration , such as:2019-03-24T05:45:39.014Z 30 days by default |
refreshToken | String | The refreshToken which is used to refresh accessToken |
refreshTokenExpiresAt | String | The expiration of refreshToken , such as:2019-03-24T05:45:39.014Z 60 days by default |
scope | String | Permissions owned by the token |
appId | String | A unique value generated each time moka is bound It is recommended to bind with a third-party supplier account |
---------------------------------------------------------------------------------------
c.RefreshaccessToken
Request address: https://api.mokahr.com/api/oauth/refresh-token
Request method: POST
bodyType: application/x-www-form-urlencoded
RequestHeaders: Content-Type: application/x-www-form-urlencoded
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
refreshToken | Yes | String | 上一步获得的refreshToken |
clientId | Yes | String | available at launch |
clientSecret | Yes | String | available at launch |
Response result:
Field | Type | Description |
---|---|---|
accessToken | String | The token to visit Moka |
accessTokenExpiresAt | String | tokenExpiration , such as:2019-03-24T05:45:39.014Z 30 days by default |
refreshToken | String | The refreshToken which is used to refresh accessToken |
refreshTokenExpiresAt | String | The expiration of refreshToken , such as:2019-03-24T05:45:39.014Z 60 days by default |
scope | String | Permissions owned by the token |
---------------------------------------------------------------------------------------
d.Unbound open platform
Request example
curl -X POST \
https://app.mokahr.com/api/oauth/unbind \
--header 'Authorization: Bearer 489645c7ab5f6230d95f6f9488f1d26f6387cbef' \
--header 'Content-Type: application/json' \
--data '{"clientId":"a3212","clientSecret":"1","appId":"844450f0-90cc-4722-a3b6-f631fb4a3926"}'
Request address: https://app.mokahr.com/api/oauth/unbind
Request method: POST
bodyType: application/json
RequestHeaders: Content-Type: application/json and Authorization: Bearer AccessToken
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
clientId | Yes | String | available at launch |
clientSecret | Yes | String | available at launch |
appId | Yes | String | A unique value generated each time moka is bound |
hireMode | No | integer | Recruitment mode, 1:experienced hires;2:Campus recruitment。If you don't fill in, it will be unbound by default。 |
Response result:
Field | Type | Description |
---|---|---|
success | Boolean | Unbound successful or not |
errorMessage | String | Unbound failed info |
Service provider info
UpdatelogoInfo
Request example
$ curl --request POST \
--url http://api.mokahr.com/v1/open-platform/client/info \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--header 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
--form 'logo=@/Users/test/test.png'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/client/info
Request method: POST
bodyType: multipart/form-dataMethod
RequestbodyParameter:
Field | Required | Type | Description |
---|---|---|---|
logo | Yes | file | 在moka中展示的logo。建议尺寸50px*50px |
Update account info
Request example
$ curl --request POST \
--url http://api.mokahr.com/v1/open-platform/account/name \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{"appId": "d5200272-b9e2-44ac-b728-26d41780ed95","accountName": "我Yes好人别吃我"}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/account/name
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
appId | Yes | String | When the accessToken is obtained for the first time after the binding is successful, moka returns |
accountName | Yes | String | Account name The client type that can bind multiple account Name when switching accounts |
Exam/Assessment
Business flowchart
MokaRequest for the third-party service providerAPI
a.Create exam
Request example
$ curl --request POST \
--url 'http://vendor.com/creat?appId=E8iWPLYYQq8dB5Lu3PEbTQwYLlyzaVOu&clientId=9734f2bc-beff-4439-9497-0aa11fcc932c&time=1547100372&sign=08b6a2f880c697bdee9b6069cbed81ceb7300ea4' \
--header 'Content-Type: application/json' \
--data '{"id": "9734f2bc-beff-4439-9497-0aa11fcc932c","event": "createExam","triggeredAt": 1547100372,"data": {"test": true}}'
Request method: POST
bodyType: raw-JSON(application/json)
Requestquery
Field | Description |
---|---|
appId | The appId returned after successfully binding with moka |
clientId | clientId provided before docking |
time | The current timestamp |
sign | sha1(clientId +clientSecret + appId + time + Request bodybody) |
Request format
Field | Required | Type | Description |
---|---|---|---|
id | Yes | String | id generated by moka(random number) |
event | Yes | String | Event name, such as, : createExam |
triggeredAt | Yes | Number | Triggered timestamp |
data | Yes | Object | The detailed info of request |
data.applicationId | Yes | Number | CandidateID |
data.name | Yes | String | Candidate name |
data.email | Yes | String | Candidate email |
data.phone | No | String | Candidate phone |
data.paperId | Yes | String | Exam paperId |
data.examId | Yes | Number | The ID used when the exam result is returned. Moka guaranteed it is unique |
data.appId | Yes | String | When the accessToken is obtained for the first time after the binding is successful, moka returns |
data.hireMode | Yes | Number | 1-experienced hires 2-Campus recruitment |
Response result:
Field | Required | Type | Description |
---|---|---|---|
v2Res | Yes | Object | v2格式 |
v2Res.code | Yes | Integer | 0:Successful,Not 0 is failed |
v2Res.msg | Yes | msg | Failed/Successful description |
v2Res.data | Yes | Object | data |
v2Res.data.url | Yes | String | Candidate exam address |
v2Res.data.name | No | String | Account |
v2Res.data.password | No | String | Password |
v2Res.data.startTime | No | long | The start time (in milliseconds) on the email notification, which can be transmitted indefinitely'', if not, the start time on the interface for creating test papers will be taken and sent to candidates |
v2Res.data.endTime | No | long | The end time (in milliseconds) of the email notification, which can be transmitted indefinitely'', if not, the end time on the test paper creation interface will be taken and sent to candidates |
Addition
For security, please verify the effectiveness of time, it is recommended to be valid within 5 minutes.
The third-party supplier requestMoka API
a.Balance
Request example
$ curl --request POST \
--url https://api.mokahr.com/api-platform/v1/open-platform/exam/balance \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{"discount": 0.4,"balance": "100","freeCount": 5, "appId": "fabd076f-1a0f-4fa8-8a5c-306d264e3df1"}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/exam/balance
Request method: POST
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
discount | No | Number | Discount(0-10) No discount will be calculated if not passed or beyond the range |
balance | Yes | Number | Account balance |
freeCount | No | Number | Remaining times without balance |
appId | Yes | String | When the accessToken is obtained for the first time after the binding is successful, moka returns |
---------------------------------------------------------------------------------------
b.Full synchronization test paper list
Request example
$ curl --request POST \
--url https://api.mokahr.com/api-platform/v1/open-platform/exam/papers \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{"paperList": [{"paperId": "1112","name": "2222222","price": 2}],"appId": "a5fb37d3-f2d1-4121-b59f-b1ca385096b0"}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/exam/papers
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
paperList | Yes | Array | Exam paper list |
paperList[].paperId | Yes | String | Exam paperID |
paperList[].name | Yes | String | Exam paper name |
paperList[].startTime | Yes | String | Start time pass at any time'' |
paperList[].endTime | Yes | String | End time pass at any time'' |
paperList[].price | Yes | Number | Exam paper consumption |
appId | Yes | String | When the accessToken is obtained for the first time after the binding is successful, moka returns |
---------------------------------------------------------------------------------------
c.Update exam paper
Request example
$ curl --request POST \
--url https://api.mokahr.com/api-platform/v1/open-platform/exam/paper \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{"paperId": "1112","name": "test","price": 0, "appId": "8c639a7a-2298-42dd-b0fa-9f23895a60ac"}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/exam/paper
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
paperId | Yes | String | Exam paperID |
name | Yes | String | Exam paper name |
startTime | Yes | String | Exam start time pass at any time'' |
endTime | Yes | String | Exam end time pass at any time'' |
price | Yes | Number | Exam paper consumption |
appId | Yes | String | When the accessToken is obtained for the first time after the binding is successful, moka returns |
---------------------------------------------------------------------------------------
d.Delete exam
Request example
$ curl --request DELETE \
--url https://api.mokahr.com/api-platform/v1/open-platform/exam/paper \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{"paperId": "1", "appId": "fabd076f-1a0f-4fa8-8a5c-306d264e3df1"}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/exam/paper
Request method: DELETE
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
paperId | Yes | String | Exam paperId |
appId | Yes | String | When the accessToken is obtained for the first time after the binding is successful, moka returns |
---------------------------------------------------------------------------------------
e.Callback score
Request example
$ curl --request POST \
--url http://api.mokahr.com/v1/open-platform/exam/result \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{
"examId": "1",
"result": "5",
"comment": "不错",
"cheatedStatus":2,
"attachments":[
{
"name": "123.pdf",
"url": "http://www.example.com/123.pdf"
}
],
"detail":[
{
"id": "XXX",
"name": "XXX",
"result": "XXX"
}
]
}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/exam/result
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
examId | Yes | Number | The examId passed to the third-party provider by moka when creating an exam |
result | Yes | String | Score |
cheatedStatus | No | number | Default is-1,Unknow,0:Not cheating;1:Cheating;2:May cheating |
comment | No | String | Evaluation (Note::If the field is passed, the value cannot be empty,Or do not pass this field |
attachments | No | Array | Attachment |
attachments[].name | No | String | Attachment name (Note::Must have suffix,For example, :123.pdf) |
attachments[].url | No | String | AttachmentURL (Note::Only support the attachment url of file format。No url encoding required) |
detail | No | Array | Detailed dimensions (Note::The maximum length of the array is 20) |
detail[].id | No | String | Detailed dimensionsid(Note: The same dimension of the same test paper needs to ensure that the id is unique. If it is empty, filtering is not supported; only the id is passed in the returned results, or no id is passed, and some ids are not supported.) |
detail[].name | No | String | Detailed dimension name(Note::If detail is not empty, name must be passed) |
detail[].result | No | String | Detailed dimension score(Note::If detail is not empty, result must be passed) |
reportUrl | No | String | Service provider report link |
---------------------------------------------------------------------------------------
mokaAPIResponse result:
Field | Required | Type | Description |
---|---|---|---|
success | Yes | boolean | The response result is successful or not |
PES(Pre-employment screening)
Business flowchart
MokaRequest for the third-party service providerAPI
a.Create PES
Request example
$ curl --request POST \
--url 'http://vendor.com/creat?appId=E8iWPLYYQq8dB5Lu3PEbTQwYLlyzaVOu&clientId=9734f2bc-beff-4439-9497-0aa11fcc932c&time=1547100372&sign=08b6a2f880c697bdee9b6069cbed81ceb7300ea4' \
--header 'Content-Type: application/json' \
--data '{"id": "9734f2bc-beff-4439-9497-0aa11fcc932c","event": "createSurvey","triggeredAt": 1547100372,"data": {"test": true}}'
Request method: POST
bodyType: raw-JSON(application/json)
Requestquery
Field | Description |
---|---|
appId | The appId returned after successfully binding with moka |
clientId | clientId provided before docking |
time | The current timestamp |
sign | sha1(clientId +clientSecret + appId + time + Request bodybody) |
Request format
Field | Required | Type | Description |
---|---|---|---|
id | Yes | String | id generated by moka(random number) |
event | Yes | String | Event name, such as, : createExam |
triggeredAt | Yes | Number | Triggered timestamp |
data | Yes | Object | The detailed info of request |
data.applicationId | Yes | Number | CandidateID |
data.name | Yes | String | Candidate name |
data.email | Yes | String | Candidate email |
data.phone | No | String | Candidate phone |
data.menuId | Yes | String | PackageId |
data.surveyId | Yes | String | ID used when returning result.Moka guranteed it is unique |
data.appId | Yes | String | When the accessToken is obtained for the first time after the binding is successful, moka returns |
data.customFields | Yes | Object | Custom field |
data.operator | Yes | Object | Operator object |
data.operator.name | Yes | String | Operator name |
data.operator.email | Yes | String | Operator email |
data.operator.phone | No | String | Operator phone |
Response result:statusCode: 200
Field | Type | Description |
---|---|---|
v2Res | object | New version 3-segment return structure |
v2Res.code | integer | 0: Successful. Not 0 :Failed |
v2Res.msg | string | Response info description |
v2Res.data | object | Response info |
v2Res.data.detailLink | String | PES details link(It is used to redirect from MOKA to the service provider to directly view the PES) Not required |
b.Cancel PES
Request example
curl -X POST "https://vender.com?appId=&clientId=&time=&sign=" --header 'Content-Type: application/json' --data '{
"id": "12345",
"event": "cancelSurvey",
"triggeredAt": "12345678901",
"data.surveyId": "12345",
"data.reason": "Candidate reject onboarding"
}'
Request method: POST
bodyType: raw-JSON(application/json)
Requestquery
Field | Description |
---|---|
appId | The appId returned after successfully binding with moka |
clientId | clientId provided before docking |
time | The current timestamp |
sign | sha1(clientId +clientSecret + appId + time) |
Requestbody
Field | Required | Type | Description |
---|---|---|---|
id | Yes | String | id generated by moka(random number) |
event | Yes | String | Event name, such as, : cancelSurvey |
triggeredAt | Yes | Number | Triggered timestamp |
data | Yes | Object | The detailed info of request |
data.surveyId | Yes | String | PES(Pre-employment screening)Id |
data.reason | No | String | Cancel reason |
Response result:
statusCode: 200
Field | Required | Type | Description |
---|---|---|---|
code | Yes | number | Not 0 represents failed |
msg | No | string | Response info description |
data | Yes | object | Response info |
Addition
For security, please verify the effectiveness of time, it is recommended to be valid within 5 minutes.
c.Push candidate info
Request example
@curl --location --request POST 'http://mock-server-yapi.staging-public.svc.k8s.staging.mokahr.com:8080/mock/49/createSurveyV2?appId=980ccbb7-546d-4045-afda-470500ed7258&clientId=PuOBW99eIaJCkFyqI8KhxYX4VMwn3udi&time=1657000349825&sign=4669cf13fa3cfe0004d21ea04eafb01c21a39858' \
--header 'Content-Type: application/json' \
--data-raw '{
"orgName": "Moka-生态专用测试",
"phone": "14592000018",
"accountName": "Default account",
"jobTitle": "syPosition for campus recruitment3",
"name": "sys1xz190",
"applicationId": 422059007,
"experiences": [
{
"endDate": "2019-01",
"company": "Company2",
"startDate": "2021-01"
},
{
"endDate": "2016-01",
"company": "Company1",
"startDate": "2017-01"
}
],
"uniqueId": "55c1a97d5b6540e6878f5da5f2d7ebbc797bac2a09664a4ab7b55aed149cf4ee",
"email": "1009417583@qq.com",
"operator": {
"phone": "15001371285",
"name": "石越",
"email": "shiyue@mokahr.com"
}
}'
Request method: POST
bodyType: raw-JSON(application/json)
Requestquery
Field | Description |
---|---|
appId | The appId returned after successfully binding with moka |
clientId | clientId provided before docking |
time | The current timestamp |
sign | sha1(clientId +clientSecret + appId + time) |
Requestbody
Field | Required | Type | Description |
---|---|---|---|
uniqueId | Yes | String | UniqueID It is used to return PES order information |
applicationId | Yes | Number | ApplicationID |
name | Yes | String | Name |
Yes | string | ||
phone | Yes | String | Phone number |
jobTitle | Yes | String | Entrusted company name |
orgName | No | String | Name |
operator | Yes | object | Operator |
operator.name | Yes | String | Name |
operator.email | Yes | String | |
operator.phone | No | String | Phone number |
experiences | Yes | array | Candidate experience info |
experiences[].company | No | string | Company name |
experiences[].jobTitle | No | string | Employed name |
experiences[].startDate | No | string | Start time |
experiences[].endDate | No | string | End time |
accountName | Yes | string | Account name |
Response result:
statusCode: 200
Field | Required | Type | Description |
---|---|---|---|
code | Yes | number | Not 0 represents failed |
msg | No | string | Response info description |
data | Yes | object | Response info |
data.redirectUrl | Yes | object | Redirect link |
The third-party supplier requestMoka API
a.Balance
Request example
$ curl --request POST \
--url https://api.mokahr.com/api-platform/v1/open-platform/survey/balance \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{"discount": 0.4,"balance": "100","freeCount": 5, "appId": "fabd076f-1a0f-4fa8-8a5c-306d264e3df1"}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/survey/balance
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
discount | No | Number | Discount(0-10) No discount will be calculated if not passed or beyond the range |
balance | Yes | Number | Account balance |
freeCount | No | Number | Remaining times without balance |
appId | Yes | String | When the accessToken is obtained for the first time after the binding is successful, moka returns |
---------------------------------------------------------------------------------------
b.Custom field
Request example
$ curl --request POST \
--url https://api.mokahr.com/api-platform/v1/open-platform/survey/custom-fields \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{"customFields": [{"name": "company","description": "Company"},{"name": "abc","description": "MokaThe name displayed on the page"}]}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/survey/custom-fields
Interface description: Global custom field,After setting, it is applicable to all packages of all tenants using the service provider,For personalized custom fields, please set in the package custom fields
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
customFields | Yes | Array | Custom field array |
customFields[].type | Yes | integer | Custom field type: 0: Single line text,1: Multiple-line text,2:Multiple choice,3:Multiple response,4:Candidate company,5:Candidate school,6:Expected start date |
customFields[].options | No | array | Options of custom field,Optional,When type is 2 or 3, add a JSON array, sample: [{ "id": 1, "name": "A"},{"id":2,"name":"B"}]id表示Options for selecting componentsID Name indicates the option name of the selected component,When initiating PES When it is multiple-choice The passed parameter value isid,When it is multiple- response The passed parameter values are multiple comma-separatedid |
customFields[].name | Yes | String | 传给接口的Fieldkey |
customFields[].description | Yes | String | MokaThe name displayed on the page |
customFields[].isRequired | No | boolean | required |
---------------------------------------------------------------------------------------
c.全量Package list
Request example
$ curl --location --request POST 'https://api.mokahr.com/api-platform/v1/open-platform/survey/menus' \
--header 'Authorization: Bearer 7**********************79' \
--header 'Content-Type: application/json' \
--data-raw '{
"menuList": [
{
"price": 280,
"name": "experienced hiresBPackage",
"menuId": "D7***************439A",
"description": "experienced hiresBPackage"
},
{
"price": 150,
"name": "学生Package",
"menuId": "BCA8****************C9EA439A",
"description": "学生Package"
}
],
"appId": "1a7c7b6d-6***************5acc14f0"
}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/survey/menus
Interface description: If a custom field is set in the package, use the package's settings,Otherwise, use the global custom field at the service provider level
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
menuList | Yes | Array | Package list |
menuList[].menuId | Yes | String | PackageID |
menuList[].name | Yes | String | Package name |
menuList[].description | Yes | String | Package description |
menuList[].price | Yes | Number | Package price |
appId | Yes | String | When the accessToken is obtained for the first time after the binding is successful, moka returns |
menuList[].customFields | No | array | Package custom field(Refer to the custom field interface) |
menuList[].customFields[].type | Yes | number | Custom field type: 0: Single line text,1: Multiple-line text,2:Multiple choice,3:Multiple response,4:Candidate company,5:Candidate school,6:Expected start date |
menuList[].customFields[].name | Yes | string | Custom field description |
menuList[].customFields[].description | Yes | string | Custom field description |
menuList[].customFields[].options | No | array | Options of custom field,Optional,When type is 2 or 3, add a JSON array, sample: [{ "id": "1", "name": "A"},{"id":"2","name":"B"}]id表示Options for selecting componentsID Name indicates the option name of the selected component,When initiating PES When it is multiple-choice The passed parameter value isid,When it is multiple- response The passed parameter values are multiple comma-separatedid |
menuList[].customFields[].options[].id | Yes | string | Options for selecting componentsID |
menuList[].customFields[].options[].name | Yes | string | Options'name of selecting components |
menuList[].customFields[].isRequired | No | boolean | required |
---------------------------------------------------------------------------------------
d.Update package
Request example
$ curl --request POST \
--url https://api.mokahr.com/api-platform/v1/open-platform/survey/menu \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{"menuId": "1112","name": "test","price": 0,"appId": "a5fb37d3-f2d1-4121-b59f-b1ca385096b0"}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/survey/menu
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
menuId | Yes | String | PackageID |
name | Yes | String | Package name |
description | No | String | Package description |
price | Yes | Number | Exam paper consumption |
appId | Yes | String | When the accessToken is obtained for the first time after the binding is successful, moka returns |
customFields | No | array | Package custom field(Refer to the custom field interface) |
customFields[].type | Yes | number | Custom field type: 0: Single line text,1: Multiple-line text,2:Multiple choice,3:Multiple response,4:Candidate company,5:Candidate school,6:Expected start date |
customFields[].name | Yes | string | Custom field description |
customFields[].description | Yes | string | Custom field description |
customFields[].options | No | array | Options of custom field,Optional,When type is 2 or 3, add a JSON array, sample: [{ "id": "1", "name": "A"},{"id":"2","name":"B"}]id表示Options for selecting componentsID Name indicates the option name of the selected component,When initiating PES When it is multiple-choice The passed parameter value isid,When it is multiple- response The passed parameter values are multiple comma-separatedid |
customFields[].options[].id | Yes | string | Options for selecting componentsID |
customFields[].options[].name | Yes | string | Options'name of selecting components |
customFields[].isRequired | No | boolean | required |
---------------------------------------------------------------------------------------
e.Delete package
Request example
$ curl --request DELETE \
--url https://api.mokahr.com/api-platform/v1/open-platform/survey/menu \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{"menuId": "1","appId": "a5fb37d3-f2d1-4121-b59f-b1ca385096b0"}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/survey/menu
Request method: DELETE
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
menuId | Yes | String | PackageId |
appId | Yes | String | When the accessToken is obtained for the first time after the binding is successful, moka returns |
---------------------------------------------------------------------------------------
f.Return result
Request example
$ curl --request POST \
--url http://api.mokahr.com/v1/open-platform/survey/result \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{
"result": "xxx",
"surveyId": "1",
"comment": "最大255的限制制",
"attachment": {
"name": "123.html",
"url": "http://www.example.com/index.html"
}
}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/survey/result
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
result | No | String | Result(The length is limited to 20 characters, and when it is empty, it will be completed by default) |
attachment | No | Object | Attachment |
attachment.name | No | String | Attachment name(Suffix is required) |
attachment.url | No | String | AttachmentURL,No url encoding required |
surveyId | Yes | Number | The surveyId passed to the third-party provider by moka when creating a PES |
attachments[] | No | Array | PES multiple attachments,Up to 10 attachments(Please pass this field for new docking single or multiple attachments,The original attachment object is only compatible with the historical version) |
attachments[].name | Yes | String | Attachment name(Suffix is required) |
attachments[].url | Yes | String | AttachmentURL,No url encoding required |
comment | No | String | Note,Supports 255 characters |
---------------------------------------------------------------------------------------
mokaAPIResponse result:
Field | Required | Type | Description |
---|---|---|---|
success | Yes | boolean | The response result is successful or not |
---------------------------------------------------------------------------------------
g.Return the progress of the PES
Request example
$ curl --request POST \
--url http://api.mokahr.com/v1/open-platform/survey/stage \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{"stageId": "1", "name": "Send link to the candidate", "stageAt": "2019-10-10 01:01:01", "surveyId": 3}'
Response example
{
success: true
}
Request address: https://api.mokahr.com/api-platform/v1/open-platform/survey/stage
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
stageId | No | String | PES stageID |
name | Yes | String | PES stage name |
stageAt | Yes | datetime | PES stage time |
surveyId | Yes | Number | The surveyId passed to the third-party provider by moka when creating a PES |
---------------------------------------------------------------------------------------
mokaAPIResponse result:
Field | Required | Type | Description |
---|---|---|---|
success | Yes | boolean | The response result is successful or not |
---------------------------------------------------------------------------------------
h.Return candidate info
Request example
$ curl --request POST \
--url https://api.mokahr.com/api-platform/v1/open-platform/survey/getCandidateInfo \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{"surveyId": 18}'
Response example
{
code: 0,
msg: "success",
data: {
resumeUrl: "https://proxy-oss-test.mokahr.com/a5684434-86d8-44db-bd69-76ebe942e12e.pdf?OSSAccessKeyId=LTAIoEXIQWCGUAZO&Expires=1599462096&Signature=IrNuG2qaCJXp8FM7JyvPe04N5%2B0%3D",
standardResumeUrl: "https://proxy-oss-test.mokahr.com/xxx.pdf?OSSAccessKeyId=LTAIoEXIQWCGUAZO&Expires=1599462096&Signature=IrNuG2qaCJXp8FM7JyvPe04N5%2B0%3D"
}
}
Request address: https://api.mokahr.com/api-platform/v1/open-platform/survey/getCandidateInfo
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
surveyId | Yes | Number | The surveyId passed to the third-party provider by moka when creating a PES |
---------------------------------------------------------------------------------------
mokaAPIResponse result:
Field | Type | Description |
---|---|---|
code | number | Not 0 represents error |
success | string | Return the processed result information |
data | object | Object to return the result |
data.resumeUrl | string | Original resume link(客户在MOKA配置了允许推送原始简历且存在原始简历时 Value is not empty) |
data.standardResumeUrl | string | Standard resume link (When the customer configures MOKA to allow push of standard resumes Value is not empty) |
I.Return PES order information
Request example
$ curl --location --request POST 'https://app.mokahr.com/api-platform/v2/open-platform/survey/orderCallback' \
--header 'Authorization: Bearer 6cdc13de41c5e76e020d403cb227cf7754962786' \
--header 'Content-Type: application/json' \
--data-raw '{
"menuId": "s2test1",
"menuName": "S2测试Package",
"uniqueId": "f67cd05d67294e8b86c55eee5f3587da17a01b6c39ed4374ba7c2784aaa573e7",
"detailLink": "https://beidiao.com/orderDetail?token=XXX"
}'
Response example
{
code: 0,
msg: "success",
data: {
surveyId: "***"
}
}
Request address: https://app.mokahr.com/api-platform/v2/open-platform/survey/orderCallback
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
menuId | Yes | string | PackageId |
menuName | Yes | string | Package name |
uniqueId | Yes | string | UniqueID |
detailLink | No | string | PES details link (用于从MOKARedirect to the service provider to view the PES details) |
---------------------------------------------------------------------------------------
mokaAPIResponse result:
Field | Type | Description |
---|---|---|
code | number | Not 0 represents error |
msg | string | Return the processed result information |
data | object | Object to return the result |
data.surveyId | string | Returns the ID of the MOKA side background adjustment, which is used to return the result of the back adjustment result to the link |
Video interview
MokaRequest for the third-party service providerAPI
a.Create video interview
Request example
$ curl --request POST \
--url 'http://vendor.com/creat?appId=E8iWPLYYQq8dB5Lu3PEbTQwYLlyzaVOu&clientId=9734f2bc-beff-4439-9497-0aa11fcc932c&time=1547100372&sign=08b6a2f880c697bdee9b6069cbed81ceb7300ea4' \
--header 'Content-Type: application/json' \
--data '{
"id": "070e67b4e1104daca596059898c31e9b",
"event": "createInterview",
"triggeredAt": 1614675195,
"data": {
"applicationId": 418430746,
"name": "test2",
"email": "wangliwei@mokahr.com",
"phone": "17657685768",
"typeId": "1379",
"interviewTime": "2021-03-02 17:00:00",
"hireMode": 1,
"appId": "836474a1-cdaf-4fab-9bfd-047bd29b0c3b",
"jobTitle": "自动化测试-飞飞",
"interviews": [
{
"startTime": "2021-03-02 17:00:00",
"duration": 30,
"interviewers": [
{
"name": "石越",
"email": "shiyue@mokahr.com",
"phone": "15001371285"
}
]
},
{
"startTime": "2021-03-02 17:30:00",
"duration": 30,
"interviewers": [
{
"name": "王立伟2",
"email": "3300352025@qq.com",
"phone": "17857685760"
},
{
"name": "shuobin",
"email": "wangshuobin@mokahr.com",
"phone": "18746574657"
}
]
}
]
}
}'
Request method: POST
bodyType: raw-JSON(application/json)
Requestquery
Field | Description |
---|---|
appId | The appId returned after successfully binding with moka |
clientId | clientId provided before docking |
time | The current timestamp |
sign | sha1(clientId +clientSecret + appId + time + Request bodybody) |
Request format
Field | Required | Type | Description |
---|---|---|---|
id | Yes | String | id generated by moka(random number) |
event | Yes | String | Event name, such as, : createExam |
triggeredAt | Yes | Number | Triggered timestamp |
data | Yes | Object | The detailed info of request |
data.applicationId | Yes | Number | CandidateID |
data.name | Yes | String | Candidate name |
data.email | Yes | String | Candidate email |
data.phone | No | String | Candidate phone |
data.typeId | Yes | String | TypeId |
data.interviewTime | Yes | String | Interview time YYYY-MM-DD HH:mm:ss |
data.hireMode | Yes | Number | 1-experienced hires 2-Campus recruitment |
data.appId | Yes | String | When the accessToken is obtained for the first time after the binding is successful, moka returns |
data.jobTitle | Yes | String | Job title |
data.interviews | Yes | Array | Interview info |
data.interviews[].startTime | Yes | String | Interview start time |
data.interviews[].duration | Yes | Number | Interview duration |
data.interviews[].interviewers | Yes | Array | Interviewer info |
data.interviews[].interviewers[].email | Yes | String | Interviewer email |
data.interviews[].interviewers[].name | Yes | String | Interviewer info |
data.interviews[].interviewers[].phone | Yes | String | Interviewer phone |
Response result:
statusCode: 200
Field | Required | Type | Description |
---|---|---|---|
videoId | Yes | String | Moka guranteed unique id |
interviewerUrl | Yes | String | Interviewer location |
intervieweeUrl | Yes | String | Candidate interview location |
*b.Create interviewV2 version *
Request example
$ curl --request POST \
--url 'http://www.test.com/interview/creat?appId=E8iWPLYYQq8dB5Lu3PEbTQwYLlyzaVOu&clientId=9734f2bc-beff-4439-9497-0aa11fcc932c&time=1547100372&sign=08b6a2f880c697bdee9b6069cbed81ceb7300ea4' \
--header 'Content-Type: application/json' \
--data '{
"appId": "6542335467",
"typeId": "324354657",
"hireMode": 1,
"groupId": "6542335467",
"candidates": [
{
"applicationId": 12345,
"name": "张三",
"email": "zhangsan@test.com",
"phone": "15012345678",
"countryCallingCode": "+86",
"jobTitle": ""
}
],
"interviews": [
{
"interviewId": 12345,
"roundId": 1,
"roundName": "第一轮",
"startTime": "2020-01-01",
"duration": 30,
"interviewers": [
{
"interviewInterviewerId": 3456,
"email": "lisi@test.com",
"name": "李四",
"phone": "15012345678"
}
]
}
],
}'
Request method: POST
bodyType: raw-JSON(application/json)
Requestquery
Field | Description |
---|---|
appId | The appId returned after successfully binding with moka |
clientId | clientId provided before docking |
time | The current timestamp |
sign | sha1(clientId +clientSecret + appId + time) |
Request format
Field | Required | Type | Description |
---|---|---|---|
candidates | Yes | Array | Candidate info |
candidates[].applicationId | Yes | Number | Candidate application ID |
candidates[].name | Yes | String | Candidate name |
candidates[].email | Yes | String | Candidate email |
candidates[].phone | No | String | Candidate phone |
candidates[].countryCallingCode | No | String | Candidate phone area code |
candidates[].jobTitle | Yes | String | Job title |
appId | Yes | String | The appId returned after successfully binding with moka |
typeId | Yes | String | TypeId |
hireMode | Yes | Number | 1-experienced hires 2-Campus recruitment |
groupId | Yes | String | Interview groupID |
interviewCreatorEmail | No | String | interviewCreatorEmail |
interviews | Yes | Array | Interview info |
interviews[].interviewId | Yes | String | Interviewid |
interviews[].roundId | Yes | Number | Roundid |
interviews[].roundName | Yes | String | Round name |
interviews[].startTime | Yes | String | Interview start time |
interviews[].duration | Yes | Number | Interview duration(Unit:minute) |
interviews[].interviewers | Yes | Array | Interviewer info |
interviews[].interviewers[].interviewInterviewerId | Yes | Number | InterviewerID |
interviews[].interviewers[].email | Yes | String | Interviewer email |
interviews[].interviewers[].name | Yes | String | Interviewer name |
interviews[].interviewers[].phone | No | String | Interviewer phone |
Response result:
statusCode: 200
Field | Required | Type | Description |
---|---|---|---|
code | Yes | Number | 0: Successful Not 0 :Failed |
msg | No | String | Response info description |
data | Yes | Object | Response info |
data.videoId | Yes | String | Moka guranteed unique id |
data.intervieweeUrls | Yes | Array | Candidate interview location |
data.intervieweeUrls[].applicationId | Yes | Number | ApplicationID |
data.intervieweeUrls[].interviewId | Yes | Number | InterviewID |
data.intervieweeUrls[].url | Yes | String | Candidate interview location |
data.interviewerUrls | Yes | Array | Interview location for interviewer |
data.interviewerUrls[].interviewInterviewerId | Yes | Number | InterviewerID |
data.interviewerUrls[].url | Yes | String | Interview location for interviewer |
*c.Modify interviewV2 version *
Used in conjunction with V2's interface for creating interviews
Request example
$ curl --request POST \
--url 'http://www.test.com/interview/uodate?appId=E8iWPLYYQq8dB5Lu3PEbTQwYLlyzaVOu&clientId=9734f2bc-beff-4439-9497-0aa11fcc932c&time=1547100372&sign=08b6a2f880c697bdee9b6069cbed81ceb7300ea4' \
--header 'Content-Type: application/json' \
--data '{
"videoId": "6542335467",
"groupId": "324354657",
"interviews": [
{
"interviewId": 12345,
"roundId": 1,
"roundName": "第一轮",
"startTime": "2020-01-01",
"duration": 30,
"interviewers": [
{
"interviewInterviewerId": 3456,
"email": "lisi@test.com",
"name": "李四",
"phone": "15012345678"
}
]
}
],
}'
Request method: POST
bodyType: raw-JSON(application/json)
Requestquery
Field | Description |
---|---|
appId | The appId returned after successfully binding with moka |
clientId | clientId provided before docking |
time | The current timestamp |
sign | sha1(clientId +clientSecret + appId + time) |
Request format
Field | Required | Type | Description |
---|---|---|---|
videoId | Yes | String | After creating interviewsvendorReturned value |
groupId | Yes | String | Interview groupID |
interviewModifierEmail | No | String | interviewModifierEmail |
interviews | Yes | Array | Interview info |
interviews[].interviewId | Yes | String | Interviewid |
interviews[].roundId | Yes | Number | Roundid |
interviews[].roundName | Yes | String | Round name |
interviews[].startTime | Yes | String | Interview start time |
interviews[].duration | Yes | Number | Interview duration(Unit:minute) |
interviews[].interviewers | Yes | Array | Interviewer info |
interviews[].interviewers[].interviewInterviewerId | Yes | Number | InterviewerID |
interviews[].interviewers[].email | Yes | String | Interviewer email |
interviews[].interviewers[].name | Yes | String | Interviewer name |
interviews[].interviewers[].phone | No | String | Interviewer phone |
Response result:
statusCode: 200
Field | Required | Type | Description |
---|---|---|---|
code | Yes | Number | 0: Successful Not 0 :Failed |
msg | No | String | Response info description |
data | Yes | Object | Response info |
data.videoId | Yes | String | Moka guranteed unique id |
data.intervieweeUrls | Yes | Array | Candidate interview location |
data.intervieweeUrls[].applicationId | Yes | Number | ApplicationID |
data.intervieweeUrls[].interviewId | Yes | Number | InterviewID |
data.intervieweeUrls[].intervieweeurl | Yes | String | Candidate interview location |
data.interviewerUrls | Yes | Array | Interview location for interviewer |
data.interviewerUrls[].interviewInterviewerId | Yes | Number | InterviewerID |
data.interviewerUrls[].url | Yes | String | Interview location for interviewer |
d.Cancel interview
Used in conjunction with V2's interface for creating interviews
Request example
$ curl --request POST \
--url 'http://www.test.com/interview/delete?appId=E8iWPLYYQq8dB5Lu3PEbTQwYLlyzaVOu&clientId=9734f2bc-beff-4439-9497-0aa11fcc932c&time=1547100372&sign=08b6a2f880c697bdee9b6069cbed81ceb7300ea4' \
--header 'Content-Type: application/json' \
--data '{
"appId": "6542335467",
"typeId": "324354657",
"hireMode": 1,
"groupId": "6542335467",
"interviewIds": [123, 345],
"applicationIds": [45678, 87654],
}'
Request method: POST
bodyType: raw-JSON(application/json)
Requestquery
Field | Description |
---|---|
appId | The appId returned after successfully binding with moka |
clientId | clientId provided before docking |
time | The current timestamp |
sign | sha1(clientId +clientSecret + appId + time) |
Request format
Field | Required | Type | Description |
---|---|---|---|
videoId | Yes | String | After creating interviewsvendorReturned value |
groupId | Yes | String | Interview groupID |
interviewIds | No | Array | InterviewidList If not passed or the array is empty Cancel this interview group |
applicationIds | No | Array | Candidate application IDList Non-null when canceling a candidate's interview only under group interview |
Response result:
statusCode: 200
Field | Required | Type | Description |
---|---|---|---|
code | Yes | Number | 0: Successful Not 0 :Failed |
msg | No | String | Response info description |
data | Yes | Object | Response info |
Addition
For security, please verify the effectiveness of time, it is recommended to be valid within 5 minutes.
The third-party supplier requestMoka API
a.Balance
Request example
$ curl --request POST \
--url https://api.mokahr.com/api-platform/v1/open-platform/interview/balance \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{"discount": 0.4,"balance": "100","freeCount": 5}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/interview/balance
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
discount | No | Number | Discount(0-10) No discount will be calculated if not passed or beyond the range |
balance | Yes | Number | Account balance |
freeCount | No | Number | Remaining times without balance |
appId | Yes | String | When the accessToken is obtained for the first time after the binding is successful, moka returns |
---------------------------------------------------------------------------------------
b.Custom grade
Request example
$ curl --request POST \
--url http://api2.mokahr.com:3000/v1/open-platform/interview/custom-result \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{"resultList":[" Satisfaction","不错","还行"]}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/interview/custom-result
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
resultList | Yes | Array | Custom grade |
---------------------------------------------------------------------------------------
c.全量Package list
Request example
$ curl --request POST \
--url https://api.mokahr.com/api-platform/v1/open-platform/interview/types \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{"typeList": [{"typeId": "1112","name": "2222222","price": 2}],"appId": "a5fb37d3-f2d1-4121-b59f-b1ca385096b0"}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/interview/types
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
typeList | Yes | Array | Package list |
typeList[].typeId | Yes | String | TypeID |
typeList[].name | Yes | String | Package name |
typeList[].price | Yes | Number | Package price |
appId | Yes | String | When the accessToken is obtained for the first time after the binding is successful, moka returns |
---------------------------------------------------------------------------------------
d.Update package
Request example
$ curl --request POST \
--url https://api.mokahr.com/api-platform/v1/open-platform/interview/type \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{"typeId": "1112","name": "test","price": 0,"appId": "a5fb37d3-f2d1-4121-b59f-b1ca385096b0"}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/interview/type
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
typeId | Yes | String | TypeID |
name | Yes | String | Package name |
price | Yes | Number | Exam paper consumption |
appId | Yes | String | When the accessToken is obtained for the first time after the binding is successful, moka returns |
---------------------------------------------------------------------------------------
e.Delete package
Request example
$ curl --request DELETE \
--url https://api.mokahr.com/api-platform/v1/open-platform/interview/type \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{"typeId": "1","appId": "a5fb37d3-f2d1-4121-b59f-b1ca385096b0"}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/interview/type
Request method: DELETE
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
typeId | Yes | String | TypeId |
appId | Yes | String | When the accessToken is obtained for the first time after the binding is successful, moka returns |
---------------------------------------------------------------------------------------
f.Return result
Request example
$ curl --request POST \
--url http://api.mokahr.com/v1/open-platform/interview/result \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{"feedback": "棒", "score": "100", "videoId": "12345"}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/interview/result
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
feedback | Yes | String | Interview feedback |
score | Yes | String | Score,It can be matched with the interview results in the moka system |
videoId | Yes | String | Same PES result returned when creating a video interview |
---------------------------------------------------------------------------------------
mokaAPIResponse result:
Field | Required | Type | Description |
---|---|---|---|
success | Yes | boolean | The response result is successful or not |
*g.Return resultv2 version *
Request example
$ curl --request POST \
--url https://api.mokahr.com/api-platform/v2/open-platform/interview/result \
--header 'Authorization: Bearer 6efe04cbc4b00ed85e2d8e9d3e8e622de435e55a' \
--header 'Content-Type: application/json' \
--data '{
"interviewInterviewerId": 12345,
"applicationId": 6789,
"score": "100",
"feedback": "Interview feedback"
}'
Request address: https://api.mokahr.com/api-platform/v2/open-platform/interview/result
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
interviewInterviewerId | Yes | Number | InterviewerID |
applicationId | Yes | String | ApplicationID |
score | Yes | String | Score,It can be matched with the interview results in the moka system |
feedback | Yes | String | Interview feedback |
---------------------------------------------------------------------------------------
mokaAPIResponse result:
Field | Required | Type | Description |
---|---|---|---|
code | Yes | Number | The response result is successful or not。0: Successful |
msg | No | String | Response info description |
data | Yes | Object | Response info |
Sequential interview
Business flowchart
ps:If the user modifies the interview at the service provider,Currently not syncingMoka。
MokaRequest for the third-party service providerAPI
a.Create video interview
Request example
$ curl --location --request POST 'https://dhr.nowcoder.com/v1/partners/moka/create-scene?appId=46dc1350-3dd2-444c-acab-02ef5a94d374&clientId=aUX4cI0lfhtkXTBmlXED1g0ra9xqKvDZ&time=1646311615&sign=fbeef2b972ac6b2955311899abafc3b0101a5ea6' \
--header 'Content-Type: application/json' \
--data-raw '{
"projectType": "1",
"projectName": "0303-2",
"projectId": "5b4b2319da2a485ba5e71bae3b52cb0ee435f34900804d4ead4cf19c65c",
"startDate": 1646312400000,
"rounds": [
{
"roundNumber": 1,
"round": 4,
"roundName": "1st round",
"rows": [
{
"jobIds": [],
"interviewers": [
{
"interviewerEmail": "shiyue@mokahr.com",
"interviewerMobile": "15001371285",
"interviewerId": 410050593,
"InterviewerName": "石越"
}
],
"mainInterviewerId": 410050593
}
]
}
],
"applications": [
{
"jobName": "syPosition for campus recruitment3",
"resumeUrl": "https://staging-1.mokahr.com/forward/candidate/info?access_token=17750f2a081d46909ded95d8dead2dc479aa43dea64b40a3aa51b38093133e77",
"jobId": "947f77cd-bb13-487b-ae8c-d96078ce8e78",
"phone": "14592000013",
"name": "sys1xz185",
"startTime": 1646312400000,
"applicationId": 422059002,
"email": "1009417583@qq.com"
}
]
}'
Request method: POST
bodyType: raw-JSON(application/json)
Requestquery
Field | Description |
---|---|
appId | The appId returned after successfully binding with moka |
clientId | clientId provided before docking |
time | The current timestamp |
sign | sha1(clientId +clientSecret + appId + time + Request bodybody) |
Request format
Field | Required | Type | Description |
---|---|---|---|
projectId | Yes | String | MOKA's sequential interview project ID |
projectName | Yes | String | Name of sequential interview project |
projectType | Yes | String | Project type |
startDate | Yes | number | Start time(Timestamp of 0:00 on the day of the sequential interview Unit:ms) |
rounds | Yes | array | Round info |
rounds[].round | No | number | Round |
rounds[].roundName | Yes | String | Round name |
rounds[].roundNumber | Yes | Number | Round sequential |
rounds[].rows | Yes | array | Group |
rounds[].rows[].jobIds[] | Yes | array |
Available interview positionsidList(Unlimited jobs) |
rounds[].rows[].mainInterviewerId | Yes | Number | Host interviewerID(Same with the interviewer ID) |
rounds[].rows[].interviewers | Yes | array | All interviewer info |
rounrounds[].rows[].interviewers[].interviewerIdds | Yes | Number | InterviewerID |
rounds[].rows[].interviewers[].InterviewerName | Yes | String | Interviewer name |
rounds[].rows[].interviewers[].interviewerMobile | No | string | Interviewer phone |
rounds[].rows[].interviewers[].interviewerEmail | No | string | Intervieweremail |
applications | Yes | array | Candidate application info |
applications[].applicationId | Yes | number | Applicationid |
applications[].startTime | Yes | number | Start timestamp(Unit:ms) |
applications[].name | No | string | Candidate name |
applications[].email | No | string | Candidateemail |
applications[].phone | No | string | Candidatephone |
applications[].jobId | Yes | string | Position id |
applications[].jobName | Yes | string | Job title |
applications[].resumeUrl | Yes | string | Position resume |
Response result:
statusCode: 200
Field | Required | Type | Description |
---|---|---|---|
code | Yes | number | 0: Successful Not 0 :Failed |
msg | No | String | Response info description |
data | Yes | object | Response info |
b.Modify sequential interview
Request example
$ curl --location --request POST 'https://dhr.nowcoder.com/v1/partners/moka/update-scene?appId=46dc1350-3dd2-444c-acab-02ef5a94d374&clientId=aUX4cI0lfhtkXTBmlXED1g0ra9xqKvDZ&time=1646311366&sign=6296090bbc0638959e8706c36cf6ca9d0d0a78bb' \
--header 'Content-Type: application/json' \
--data-raw '{
"vendorProjectId": "2382",
"projectType": "1",
"projectName": "0303Nowcoder sequential",
"projectId": "c9ccdeebcfde4fd58b58e545ee30c1b0a727e372ee9a4a6d9da06be13eaf0bda",
"startDate": 1646314200000,
"rounds": [
{
"roundNumber": 1,
"round": 4,
"roundName": "1st round",
"rows": [
{
"jobIds": [],
"interviewers": [
{
"interviewerEmail": "shiyue@mokahr.com",
"interviewerMobile": "15001371285",
"interviewerId": 410050593,
"InterviewerName": "石越"
}
],
"mainInterviewerId": 410050593
}
]
}
],
"applications": [
{
"jobName": "syPosition for campus recruitment3",
"resumeUrl": "https://staging-1.mokahr.com/forward/candidate/info?access_token=db8583715cb949f4af7e030c62b43733ee4ea1fff7844d60933ede7aa36aba84",
"jobId": "947f77cd-bb13-487b-ae8c-d96078ce8e78",
"phone": "14592000015",
"name": "sys1xz187",
"startTime": 1646314200000,
"applicationId": 422059004,
"email": "1009417583@qq.com"
}
]
}'
Request method: POST
bodyType: raw-JSON(application/json)
Requestquery
Field | Description |
---|---|
appId | The appId returned after successfully binding with moka |
clientId | clientId provided before docking |
time | The current timestamp |
sign | sha1(clientId +clientSecret + appId + time) |
Request format
Field | Required | Type | Description |
---|---|---|---|
vendorProjectId | Yes | string | Service provider's sequential interview projectID |
projectId | Yes | String | MOKA's sequential interview project ID |
projectName | Yes | String | Name of sequential interview project |
projectType | Yes | String | Project type |
startDate | Yes | number | Start time(Timestamp of 0:00 on the day of the sequential interview Unit:ms) |
rounds | Yes | array | Round info |
rounds[].round | No | number | Round |
rounds[].roundName | Yes | String | Round name |
rounds[].roundNumber | Yes | Number | Round sequential |
rounds[].rows | Yes | array | Group |
rounds[].rows[].jobIds[] | Yes | array |
Available interview positionsidList(Unlimited jobs) |
rounds[].rows[].mainInterviewerId | Yes | Number | Host interviewerID(Same with the interviewer ID) |
rounds[].rows[].interviewers | Yes | array | All interviewer info |
rounrounds[].rows[].interviewers[].interviewerIdds | Yes | Number | InterviewerID |
rounds[].rows[].interviewers[].InterviewerName | Yes | String | Interviewer name |
rounds[].rows[].interviewers[].interviewerMobile | No | string | Interviewer phone |
rounds[].rows[].interviewers[].interviewerEmail | No | string | Intervieweremail |
applications | Yes | array | Candidate application info |
applications[].applicationId | Yes | number | Applicationid |
applications[].startTime | Yes | number | Start timestamp(Unit:ms) |
applications[].name | No | string | Candidate name |
applications[].email | No | string | Candidateemail |
applications[].phone | No | string | Candidatephone |
applications[].jobId | Yes | string | Position id |
applications[].jobName | Yes | string | Job title |
applications[].resumeUrl | Yes | string | Position resume |
Response result:
statusCode: 200
Field | Required | Type | Description |
---|---|---|---|
code | Yes | number | 0: Successful Not 0 :Failed |
msg | No | String | Response info description |
data | Yes | object | Response info |
c.Cancel sequential interview
Request example
$ curl --location --request POST 'https://dhr.nowcoder.com/v1/partners/moka/cancel-scene?appId=46dc1350-3dd2-444c-acab-02ef5a94d374&clientId=aUX4cI0lfhtkXTBmlXED1g0ra9xqKvDZ&time=1646311517&sign=9c9930c66583e132ffb0ca32ce7b61bf77651300' \
--header 'Content-Type: application/json' \
--data-raw '{
"vendorProjectId": "2382",
"projectId": "c9ccdeebcfde4fd58b58e545ee30c1b0a727e372ee9a4a6d9da06be13eaf0bda"
}'
Request method: POST
bodyType: raw-JSON(application/json)
Requestquery
Field | Description |
---|---|
appId | The appId returned after successfully binding with moka |
clientId | clientId provided before docking |
time | The current timestamp |
sign | sha1(clientId +clientSecret + appId + time) |
Request format
Field | Required | Type | Description |
---|---|---|---|
projectId | Yes | String | MOKAProject of sequential interviewID |
vendorProjectId | Yes | String | Service provider's project of sequential interviewID |
Response result:
statusCode: 200
Field | Required | Type | Description |
---|---|---|---|
code | Yes | Number | 0: Successful Not 0 :Failed |
msg | No | String | Response info description |
data | Yes | Object | Response info |
Addition
For security, please verify the effectiveness of time, it is recommended to be valid within 5 minutes.
The third-party supplier requestMoka API
a.return interview result
Request example
$ curl --location --request POST 'https://api.mokahr.com/v1/open-platform/interview/interview-queues/syncFeedback' \
--header 'Content-Type: application/json' \
--data-raw '{
"projectId": "70ca990041dd4791ab691476cf4256f77458b04c63794fcda622316b22567522",
"vendorProjectId": "2222222222222",
"applicationId": 419165734,
"total": "4.0",
"comment": "tttttt....",
"interviewerId": 410112436,
"startTime": 1642754689429,
"signedInAt": 1642754679429,
"duration": 30,
"roundNumber": 1,
"videoId": "fdsafdsafsaewrewre"
}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/interview/interview-queues/syncFeedback
Request method: POST
bodyType: raw-JSON(application/json)
RequestbodyParameter:
Field | Required | Type | Description |
---|---|---|---|
projectId | Yes | string | moka的Sequential interview项目id |
vendorProjectId | Yes | string | The name of the service provider's sequential interview project |
applicationId | Yes | Number | ApplicationID |
total | Yes | String | Score |
comment | No | String | Evaluation |
reportUrl | No | String | Report link |
interviewerId | Yes | number | Interviewerid |
startTime | Yes | nunber | Actual start time Timestamp(Unit:毫秒) |
duration | No | number | Interview duration(Unit:minute) |
round | No | number | Round |
roundNumber | Yes | number | Round sequential |
signedInAt | No | number | Check-in time (Unit:毫秒) |
videoId | Yes | string | Video interviewID |
Response result:
statusCode: 200
Field | Required | Type | Description |
---|---|---|---|
code | Yes | number | 0: Successful Not 0 :Failed |
msg | No | String | Response info description |
data | Yes | object | Response info |
---------------------------------------------------------------------------------------
b.Create a result callback interface
Request example
$ curl --location --request POST 'https://api.mokahr.com/v1/open-platform/interview/interview-queues/syncSaveResult' \
--header 'Content-Type: application/json' \
--data-raw '{
"projectId": "1e414b24e478472d88f4c87c2b8c4a39d20d53cbc3914057a72daea282a04a5c",
"vendorProjectId": "",
"code": 1,
"errorMsg": "",
"applicationErrors": [
{
"applicationId": 1,
"name": "要结束了么",
"errorInfo": ""
}
],
"interviewerErrors": [
{
"interviewerId": 410050593,
"name": "石越",
"errorInfo": ""
}
]
}'
Request address: https://api.mokahr.com/api-platform/v1/open-platform/interview/interview-queues/syncSaveResult
Request method: POST
bodyType: raw-JSON(application/json)
Request parameter:
Field | Required | Type | Description |
---|---|---|---|
projectId | Yes | string | moka的Sequential interview项目id |
vendorProjectId | Yes | string | The name of the service provider's sequential interview project |
code | Yes | number | 0: All succeed Not 0 :Failed |
errorMsg | Yes | string | Error info |
applicationErrors | No | array | Candidate error info |
errorapplicationErrors[].applicationIdMsg | Yes | number | ApplicationID |
applicationErrors[].name | No | string | Candidate name |
applicationErrors[].errorInfo | No | string | Error info |
interviewerErrors | Yes | array | Interviewer error info |
interviewerErrors[].interviewerId | Yes | number | Interviewerid |
interviewerErrors[].name | No | string | Interviewer name |
interviewerErrors[].errorInfo | No | string | Error info |
Response result:
statusCode: 200
Field | Required | Type | Description |
---|---|---|---|
code | Yes | number | 0: Successful Not 0 :Failed |
msg | No | String | Response info description |
data | Yes | object | Response info |
---------------------------------------------------------------------------------------