;

Reattempt Test

Allows candidate to reattempt/retake a test
API Behavior

By default candidate can only appear for test once, in specific test link. To allow reattempt after initial invite, use this API.

You can allow multiple reattempts after first test attempt. Note, for the first time, use "Invite Candidate" or "Invite Candidate by test link" API to take the test.

Once you allow reattempt, only after completing reattempt, new subsequent reattempt can be made. If you make call to Reattempt API without appearing for the test, API will return latest active reattempt test invitation details again in response if API call is made.

By default, API does not send email to candidate.

Original Invitation Status Reattempt Behavior
Invitation Pending (Test Attempt not taken) Reattempt API doesn't throw an error. It returns back the pending invitation. However it replaces the old Access time and timezoneid with the new details passed in the API request. 
Invitation Cancelled Reattempt API doesn't throw an error. It returns back the pending invitation. However it replaces the old Access time and timezoneid with the new details passed in the API request and changes the Invitation Status to Pending
Invitation Expired Reattempt API doesn't throw an error. It returns back the pending invitation. However it replaces the old Access time and timezoneid with the new details passed in the API request and changes the Invitation Status to Pending.
Test Status - Complete Reattempt API sends back a new TestInvitationID and URL. It inherits the test settings of the original testinvitationid except for Access time and timezoneid.
Test Status - In Progress Reattempt API sends a response back "Reattempt is not allowed on Test invitation id: 999999 which is in inprogress state."
Test Status - Test Left Reattempt API sends back a new TestInvitationID and URL. It inherits the test settings of the original testinvitationid except for Access time and timezoneid.
POST https://apiv3.imocha.io/v3/invitations/{testInvitationId}/reattempt
  • Docs
  • Try it
Request URL Parameters
Field Type Required Default Description
testInvitationId Integer64 Yes - Unique identifier given to each test attempt
Request Body Parameters
Field Type Required Default Description
StartDateTime String Yes - Start datetime in UTC ISO 8601 Format
Example: "2020-06-11T16:00:00Z" Format: YYYY-MM-ddTHH:mm:ssZ
EndDateTime String Yes - End datetime in UTC ISO 8601 Format
Example: "2020-06-20T16:00:00Z" Format: YYYY-MM-ddTHH:mm:ssZ
TimeZoneId Integer64 Yes - Timezone id in which invitation will be accessed.
CallbackUrl String No - Receive candidate test completion notification at your mentioned endpoint
RedirectUrl String No - Redirect candidate to given URL after test completion
hideInstruction Integer No 0 Skips test instruction page
sendEmail String No no When enabled(yes) sends test invitation email to candidate.By default disabled. Possible values yes or no
Example API endpoint

URL 1: /v3/invitations/2932950/reattempt

Sample Request Body
Request Body
{ "StartDateTime":"2020-07-08T16:00:00Z", "EndDateTime":"2020-07-20T16:00:00Z", "TimeZoneId":"1720", "CallbackUrl":"https://www.imocha.io/", "redirectURL":"https://www.imocha.io/" }
Successful response

Status 200 OK

Response
{ "testInvitationId": 2927076, "testUrl": "https://test.imocha.io/IMInstructions?N0d3bWp0dzFNMytWVFlUTVdZa2lhVzR1bG1PdHFvcGFZVG5ZQmR1N2twcz0", "callbackUrlRegistered": "", "redirectUrlRegistered": "" }
Failed response

Status 400 Bad request

If the state of invitation is invalid

Response
{ "statusCode": 400, "message": " Reattempt is not allowed on Test invitation id: 88129 which is in inprogress state." }
Parameter Value Description Parameter Type Data Type
testInvitationId Unique identifier given to each test attempt Query Integer64
StartDateTime Start datetime in UTC ISO 8601 Format
Example: "2020-06-11T16:00:00Z" Format: YYYY-MM-ddTHH:mm:ssZ
Body String
EndDateTime End datetime in UTC ISO 8601 Format
Example: "2020-06-20T16:00:00Z" Format: YYYY-MM-ddTHH:mm:ssZ
Body String
TimeZoneId Timezone id in which invitation will be accessed. Body Integer64
CallbackUrl Receive candidate test completion notification at your mentioned endpoint Body String
RedirectUrl Redirect candidate to given URL after test completion Body String
hideInstruction Skips test instruction page Body Integer
sendEmail When enabled sends test invitation email to candidate.By default disabled Body String
  • Response Body