Register candidate for test
-
Description
Register candidate for a test.
Post data on "Register candidate for test" API.
Please note that, if any request posted more than once for the same candidate, it will update fullName, callbackUrl, redirectUrl parameters on existing record. -
URL structure
https://api.interviewmocha.com/v2/org/tests/{testId}/register
-
Request Method
POST
-
Request Data
ParametersRequest Body DataParameter Description Default Data Type Is Mandatory testId Test Id associated with particular test None Int64 Yes Parameter Description Default Data Type Is Mandatory emailId Email Id of Candidate None String Yes fullName Full name of Candidate None String Yes callbackURL After completion of test callback object will be send on this URL None String No redirectURL After completion of test candidate will redirect to this URL None String No -
Response Data
ParametersArgument Name Description Return Data Type statuscode Status code returned with every response String description Status code message String result Wrapper Object Object result.testInvitationId Unique Id of Candidate Test Int64 result.takeTestURL URL for take test. By using this URL candidate can start the test String -
Sample Code
Example Curl request will look like this:Response Body:curl -i -H "x-api-key:YOUR_API_KEY_HERE" -H "content-type:application/json;charset=utf-8" -X POST https://api.interviewmocha.com/v2/tests/840702/register -d '{"emailId":"testemail@imocha.io","fullName":"Amit Mishra", "callbackURL":"http://yoursite.com/savecallbackpage", "redirectURL":"http://yoursite.com/thankyoupage"}'
Callback object:{ "statuscode": "200.1", "description": "The request has succeeded.", "result": { "testInvitationId": 2256212, "takeTestURL": "https://test.interviewmocha.com/IMInstructions?8MfJPEhDQOv%2fCCYR7U%2fTog%3d%3d" } }
The callback object will send to url mentioned in HTTP request.{ "CandidateEmailId": "testemail@imocha.io", "AttemptedOn": "2015-06-26T21:31:03.19", "TotalScore ": 50, "CandidateScore ": 34, "ReportPDFUrl ": "http: //https://app.imocha.io/PDFReport?id="*************", "TestInvitationId": 2256212 }
Get test details