Explanation about job, what it is within ASTRNT's scope.
Create Job
You can use this API to create a job. One of the return value from this API is job identifier. You need to save your job identifier so it can be used as a parameter input to call another API.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
title
String
Y
The name of the job that you want to create. The maximum string is 255.
jobType
String
N
If value full_time → it is a fulltime job. (Default)
If value part_time, → it is a part time job.
If value internship, → it is a internship.
If value contract, → it is a contract.
jobStatus
String
N
If value open, this position currently open.
If value filled, this position already filled.
requireCv
Integer
N
If value 0, cv is not required. (Default)
If value 1, cv is optional.
If value 2, cv is mandatory.
language
String
N
EN → for English Language
ID → for Indonesia Language
PT-BR → for Portuguese Language
aboutDescription
String
N
String of description about this job.
responsibility
String
N
String about this job responsibilities.
requirement
String
N
String about this job requirement.
locations
String
N
String about this job location.
Example: "Jakarta / Bandung / Surabaya".
If empty, Default: "Jakarta"
industry
Integer
N
Here’s the list of id and name of the industries, click here.
(But you just need to send the id).
If empty, the default would be "Others".
tags
Integer
N
String to describe tag of this job.
Example: #superteam #buildteamfast.
deadline
Datetime
N
Set deadline for this job’s open code interview. (if you not set the deadline, the deadline for this job’s open code interview is 30 days from you call this api) Format: "yyyy-MM-dd HH:mm:ss".
Example: 2016-08-31 10:10:10
logo_url
String
N
Set the company logo url of the job.
company_name
String
N
Name of the job's company.
If empty, the default would be your registered company name.
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
job_identifier
String
A 10 unique string character that identify your job identity.
Code Example
//Javascript Code Example
function postJob(){
var api_key = $('#api_key').val();
var title = $('#title').val();
var jobType = $('#jobType').val();
var jobStatus = $('#jobStatus').val();
var requireCv = $('#requireCv').val();
var aboutDescription = $('#aboutDescription').val();
var responsibility = $('#responsibility').val();
var requirement = $('#requirement').val();
var locations = $('#locations').val();
var industry = $('#industry').val();
var deadline = $('#deadline').val();
var logo = $('#industry').val();
var company_name = $('#deadline').val();
var confirmtext = 'Create Job?';
if(confirm(confirmtext)){
$.ajax({
method: "POST",
url: "https://app.astrnt.co/api/job_list_create_job')",
dataType: "json",
data: {api_key: api_key, title: title, jobType: jobType, jobStatus: jobStatus, requireCv: requireCv, aboutDescription: aboutDescription, responsibility: responsibility, requirement: requirement, locations: locations, industry: industry, deadline: deadline, logo_url: logo_url, company_name: company_name},
success: function(json){
if(json.status == "SUCCESS"){
var job_identifier = json.job_identifier;
alert('Job Created!');
return false;
}else{
alert("Create Job Failed");
}
}
});
}
}
Edit Job
You can use this API to edit a job. One of the parameter value from this API is job identifier that you get when you created a job with "create job API".
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
title
String
Y
The name of the job that you want to create. The maximum string is 255.
jobType
String
N
If value full_time → it is a fulltime job. (Default)
If value part_time, → it is a part time job.
If value internship, → it is a internship.
If value contract, → it is a contract.
language
String
N
EN → for English Language
ID → for Indonesia Language
PT-BR → for Portuguese Language
jobStatus
String
N
If value open, this position currently open.
If value filled, this position already filled.
requireCv
Integer
N
If value 0, cv is not required. (Default)
If value 1, cv is optional.
If value 2, cv is mandatory.
aboutDescription
String
N
String of description about this job.
responsibility
String
N
String about this job responsibilities.
requirement
String
N
String about this job requirement.
locations
String
N
String about this job location.
Example: "Jakarta / Bandung / Surabaya".
If empty, Default: "Jakarta"
industry
Integer
N
Here’s the list of id and name of the industries, click here.
(But you just need to send the id).
If empty, the default would be "Others".
tags
Integer
N
String to describe tag of this job.
Example: #superteam #buildteamfast.
company_name
String
N
Name of the job's company.
If empty, the default would be your registered company name.
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
Get List of Jobs
You can use this API to get all the job from that the api integration company has. The response of this request are the status and the list of job that contain the jobs’s name and it’s job identifier.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
job_list
Array
List of job that contain the jobs’s name and it’s job identifier.
Get List of Jobs with Properties
You can use this API to get all the job with the job’s properties from that the api integration company has. The response of this request are the status and the list of job that contain the jobs’s name, job’s identifier and all the job’s properties. If you want to get specific job’s properties for one specific job, add job_identifier parameter in your request.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
job_identifier
String
N
Your 10 unique string character that identify your job identity.
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
jobs_properties
Array
List of job with the job’s properties.
Delete Job
You can use this API to delete a job. One of the parameter value from this API is job identifier that you get when you created a job with "create job API".
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
job_identifier
String
Y
Your 10 unique string character that identify your job identity.
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
Get Job's Status
You can use this API to get the data of all candidate's status (answered candidate's videos url, the questions, etc) on one job. One of the parameter value from this API is job identifier that you get when you created a job with "create job API".
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
job_identifier
String
Y
Your 10 unique string character that identify your job identity.
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
result
Array
Data of all candidates on on job.
Get Job's Open Code
You can use this API to get your job’s open code. You can display or publish the open code result on your website or the internet so a lot of applicant can interview with this open code.
Parameters
Name
Type
Required?
Description
job_identifier
String
Y
Your 10 unique string character that identify your job identity.
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
open_code
String
Job's open code.
Set Job Landing Page Questions
You can use this API to set a job landing page's questions same as the one in the ASTRNT Portal. This API endpoint functionality is to register chosen questions into a job. Later on you can invite the candidates using Sent Invitation API endpoint so the candidate can answer the registered question in the job. Or you can ask the candidate to use the job's open code to do the assessment.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
job_identifier
String
Y
Your 10 unique string character that identify your job identity.
questions_identifier
Array
Y
Array of question identifier that identify the question you already created.
deadline
Datetime
Y
Set deadline for the interview. Format: "yyyy-MM-dd HH:mm:ss". Example: 2016-08-31 10:10:10.
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
open_code
String
Job's open code.
Get All Candidate's Data From Job
You can use this API to get the data of all candidate's data (answered candidate's videos url, the questions, etc) on one job. One of the parameter value from this API is job identifier that you get when you created a job with "create job API". You can sort it by candidate's status also (optional).
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
job_identifier
String
Y
Your 10 unique string character that identify your job identity.
status
String
N
There are 5 candidate's status. (applied | disqualified | offer | shortlisted | sourced). You can input "all" to get all the candidates data. "sourced" status is the default when you sent invitation to candidate.
sort
String
N
You can sort candidate's data result by email and name (ascending and descending) with this value (name_asc / name_desc / email_asc / email_desc).
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
candidates
Array
Data of all candidates on on job.
Get Candidate's Identifier
You can use this API to get the candidate identifier by email and the job identifer.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
job_identifier
String
Y
Your 10 unique string character that identify your job identity.
email
String
Y
Email of candidate
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
candidate_identifier
Array
Candidate's identifier.
Get Candidate's Status on Job Assesment & Interview Session
You can use this API to get the candidate's status on Job Assessment & Interview Session. There are 4 candidate's status (unregistered | has_not_started | on_process | finished)
unregistered → candidate has not registered into the job assessment & interview session.
has_not_started → candidate registered but not started the interview yet.
on_process → candidate registered and is on the assessment & interview session process.
finished → candidate already finished the assessment & interview session.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
job_identifier
String
Y
Your 10 unique string character that identify your job identity.
email
String
Y
Email of candidate
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
candidate_status
String
Candidate status on job.
message
String
Description of the status message.
Question API
Explanation about how to create, edit, delete and get list of questions for certain job.
Add Question
You can use this API to create a question for your certain job. One of the return value from this API is question identifier. You need to save your question identifier in case you want to edit or delete your question.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
job_identifier
String
Y
Your 10 unique string character that identify your job identity.
title
String
Y
The question that you want to ask to the candidate. The maximum string is 255.
takesCount
Integer
N
Integer input determine how many recording takes that the candidate can do. (3 times is the max, default = 1)
maxTime
Integer
N
Integer input determine how long the recording time that the candidate have in second. (default = 45s)
prepTime
String
N
Integer input determine how long the preparation time for each question that the candidate have in second. (default = 10s)
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
question_identifier
String
A 20 unique string character that identify your question.
Edit Question
You can use this API to edit a question. One of the parameter value from this API is question identifier (as a unique value) that you get when you created a question with "create question API".
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
job_identifier
String
Y
Your 10 unique string character that identify your job identity.
question_identifier
String
Y
Your 20 unique string character that identify your question.
title
String
Y
The question that you want to ask to the candidate. The maximum string is 255.
takesCount
Integer
N
Integer input determine how many recording takes that the candidate can do. (3 times is the max, default = 1)
maxTime
Integer
N
Integer input determine how long the recording time that the candidate have in second. (default = 45s)
prepTime
String
N
Integer input determine how long the preparation time for each question that the candidate have in second. (default = 10s)
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
Delete Question
You can use this API to delete a question. One of the parameter value from this API is question identifier (as a unique value) that you get when you created a question with "create question API".
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
job_identifier
String
Y
Your 10 unique string character that identify your job identity.
question_identifier
String
Y
Your 20 unique string character that identify your question.
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
Get List Questions
You can use this API to get list of the questions that you already made for your job.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
job_identifier
String
Y
Your 10 unique string character that identify your job identity.
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
questions
Array
List of questions.
Output: title (question’s text), takesCount, prepTime, maxTime, question_identifier.
Invite API
Explanation about how to create an interview invitation for candidate.
Sent Invitation
You can use this API to invite one candidate via email. One of the return value from this API is candidate identifier. You need to save your candidate identifier so it can be used as a parameter input to call another API, especially the get video API, so you can get all the video that the candidate make to answer to your question.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
job_identifier
String
Y
Your 10 unique string character that identify your job identity.
email
String
Y
Candidate's email that invited to do the inteview. The maximum string is 255.
name
String
Y
Candidate's name that invited to do the inteview. The maximum string is 255.
deadline
Datetime
Y
Set deadline for the interview. Format: "yyyy-MM-dd HH:mm:ss". Example: 2016-08-31 10:10:10.
skip_email
Integer
N
Parameter to decide if you want to sent the invitation email to the candidate via ASTRNT or not.
1 → skip the email (ASTRNT will not sent the email)
0 → sent the email (ASTRNT will sent the invitation email to the candidate)
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
candidate_identifier
String
A 20 unique string character that identify the candidate.
interview_link
String
Link to the interview.
interview_code
String
Unique code for candidate to do the interview.
deadline
String
Deadline for this interview.
Custom Invitation
You can use this API to create more than one question and directly ask that questions as an invite to more than one candidate via email. If you already have candidate data and the questions, you can simply sent the candidate identifier and the questions identifier like the example below (in the picture). The return value from this API is candidates identifier and the questions identifier.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
job_identifier
String
Y
Your 10 unique string character that identify your job identity.
candidates
Array
Y
Array of candidate contain name and email as key. If the candidate is already exist, just sent the candidate_identifier as a key.
questions
Array
Y
Array of questions contain title, tags, qType, takesCount, prepTime and maxTime as key. If the question is already exist, just sent the question_identifier as a key.
deadline
Datetime
Y
Set deadline for the interview. Format: "yyyy-MM-dd HH:mm:ss". Example: 2016-08-31 10:10:10.
additional_message
String
Y
Your additional message in the invitation email for the candidate.
skip_email
Integer
N
Parameter to decide if you want to sent the invitation email to the candidate via ASTRNT or not.
1 → skip the email (ASTRNT will not sent the email)
0 → sent the email (ASTRNT will sent the invitation email to the candidate)
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
candidates_identifier
Array
Array of candidate identifier that each identifier represent one candidate.
questions_identifier
Array
Array of question identifier that each identifier represent one question.
Resend Invitation
You can use this API to resend the invitation of a candidate. The candidate will get a notification email, inform that the candidate will have to retake the interview.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
job_identifier
String
Y
Your 10 unique string character that identify your job identity.
candidate_identifier
String
Y
Your 20 unique string character that identify the candidate.
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
pass_deadline
Boolean
false / true (false if the candidate is not pass the deadline, true if the candidate is already pass the deadline. Either way, the candidate still can continue the interview).
Reduce / Set Video Question Attempt
You can use this API to reduce and set the attempt of all the video questions on the last candidate's interview. You can set the attempt in the 'custom_attempt' request body. But, if you set the 'custom_attempt' bigger than the origin of the question attempt, it will not change the attempt of the question into the 'new attempt'.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
candidate_identifier
String
Y
Your 20 unique string character that identify the candidate.
custom_attempt
Integer
Y
Your new question attempt
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
Update Deadline Interview Session
You can use this API to update the deadline of the last candidate's interview session. Set the 'deadline' body request in UTC.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
candidate_identifier
String
Y
Your 20 unique string character that identify the candidate.
deadline
Datetime
Y
Update new deadline for the last candidate's interview session (UTC). Format: "yyyy-MM-dd HH:mm:ss". Example: 2020-01-31 16:59:59
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
Video API
Explanation about how to get candidate's video and give flag to the video if the video is error.
Get Video
You can use this API to get all the candidate video. Candidate that already invited, will get the email and start using ASTRNT app to answer your questions. You can see the video that have been made by the candidate by calling this API.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
job_identifier
String
Y
Your 10 unique string character that identify your job identity.
candidate_identifier
String
Y
Your 20 unique string character that identify the candidate.
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
videos
Array
An array of video contain the videos url.
thumbnails
Array
An array of thumbnail contain the thumbnails url.
questions_identifier
Array
An array of string contain the question identifier.
Invitation Status
You can use this API to get the complete or incomplete status for the last invitation interview, the video data (if the candidate answered all or some of the video interview questions), and the total questions that the candidate has from specific job interview.
If you want to fetch all the invitation status of all candidates inside a job, you can call this api without putting the candidate_identifier on the request body.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
job_identifier
String
Y
Your 10 unique string character that identify your job identity.
candidate_identifier
String
N
Your 20 unique string character that identify the candidate.
Response (for specific candidate)
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
invitation_status
String
incomplete / complete finished interview status from the last invitation.
videos
Array
Video data of the candidate (video_url, thumbnails_url, questions_identifier, datetime (time when the video is created))
total_questions
Integer
The total questions that the candidate has from specific job interview.
Response (for all candidate's invitation status)
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
candidates
Array
contain all the candidate's invitation status data on certain jobs
Get Candidate's Video with Attribute
You can use this API to get all candidate's video interview, the video data will be contain video urls with 12 hour expired url time and thumbnail url with no expired url time.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
job_identifier
String
Y
Your 10 unique string character that identify your job identity.
candidate_identifier
String
Y
Your 20 unique string character that identify the candidate.
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
videos
Array
Video data of the candidate (video_url, thumbnail_url, question_identifier, question_title)
Flag Video
You can use this API to flag the ‘error’ or ‘problematic’ video (not shown, screen is all black). This API will inform to the ASTRNT Portal page that there are a videos that error.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
job_identifier
String
Y
Your 10 unique string character that identify your job identity.
candidate_identifier
String
Y
Your 20 unique string character that identify the candidate.
question_identifier
String
Y
Your 20 unique string character that identify your question identity.
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
Single Sign On Integration API
Explanation about how to use the single sign on so you can go directly to ASTRNT Portal App from your website.
Register User and Company
You can use this API to register company and user that registered to that company as an admin. One of the return value from this API is company identifier. You need to save your company identifier so it can be used as a parameter input to call another API.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
company_name
String
Y
Name of the company
user_name
String
Y
Name of the user.
user_email
String
Y
The email of the user.
password
String
Y
String that contain password.
user_position
String
N
String that contain password.
company_logo
String
N
Set the company logo url of the job.
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
company_identifier
String
A 17 unique string character that identify your company identity.
user_email
String
Email of user.
Register Team Member
You can use this API to register a team member to a company that already registered to our system.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
company_identifier
String
Y
Your 17 unique string character that identify your company identity.
user_name
String
Y
Name of the user.
user_email
String
Y
The email of the user.
password
String
Y
String that contain password.
user_position
String
N
String that contain password.
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
user_email
String
Email of user.
Single Sign On
You can use this API to get the url that will redirect you to ASTRNT dashboard directly and already log in with the username that you sent in the parameter. One if the response from this request is "log_in_url". This url will redirect you to the ASTRNT dashboard and will be expired in 5 minutes.
Parameters
Name
Type
Required?
Description
api_key
String
Y
Your 65 unique string character that identify your identity.
company_identifier
String
Y
Your 17 unique string character that identify your company identity.
user_email
String
Y
The email of the user.
Response
Attribute
Type
Description
status
String
SUCCESS/ERROR, status of the request.
message
String
Description of the status message.
log_in_url
String
Url that will redirect you to ASTRNT Portal web dashboard.
Sending Notification
After the candidate finish an interview, ASTRNT can send the notification or data of the finished interview such as:
- An array contains :
- Questions (question identifier)
- Video url → video of the candidate
- Thumbnail url → thumbnail of the candidate's video
- Invitation code
This data is useful if you want to display the candidate's interview video immediately on your website's dashboard or if you want to save the video url on your database. There're several requirement to use this api function.
1. You need to create an API, so we can call that API to send the data to you.
2. Don't forget to give us the access token for Authorization.
3. Give us the information, what's the domain that this data are gonna be displayed.
4. The example code that we're gonna hit would be like the code below.
Others
List of Industries
id
Industry Name
1
Civil Services (Government, Armed Forces)
2
Others
3
Wholesale / Retail
4
Accounting / Audit / Tax Services
5
Advertising / Public Relations / Marketing Services
6
Agriculture Cultivation
7
Architecture / Building / Construction
8
Athletics / Sports
9
Charity / Social Services / Non-Profit Organisation
10
Clothing / Garment / Textile
11
Education
13
Electronics / Electrical Equipment
14
Energy / Power / Water / Oil & Gas / Waste Management
15
Engineering - Building, Civil, Construction / Quantity Survey
The Web SDK integration is the easiest way to integrate ASTRNT’s web interview experience into your website or web app. The idea is to embed ASTRNT’s web based Q&A interface into your website using an iframe.
Details
To use the integration, you need to add three elements into your HTML code.
The ASTRNT iframe
<iframe id="astronautQnASessionFrame" src="<customizable_astronaut_interview_url>" allow="geolocation *; microphone *; camera *"></iframe>
This line of javascript code is needed to enable the iframe (child frame) to communicate with the parent frame (your website). What for? We provide methods that you can use to get information about which state the candidate is currently at, and to handle the redirect URL which you set up when you create the Q&A session.
Here are the four methods that you can use:
getAstronautQnASessionVideoURL()
This method will return the candidate's interview video URL. You can call this function after candidate finish with their interview to fetch all the video url of the interview session.
getAstronautQnASessionState()
This method will give you information about the state the candidate is currently at.
Here's the list of the events:
Continue Next Question
Continue Assesment & Interview Session
Finish Recording
GDPR Complied
Multiple Choice Question Answered
Next Section
Retake Recording
Session Finished
Start Interview Session
Start MCQ Session
Start Recording
Start Assesment & Interview Session
Pause Video
Play Video
Practice Recording
Practice Recording Finished
Video Question
Video Upload
Video Uploaded
Video Upload Failed
ASTRNT SDK Event
You can use this javascript function to continuously listen and get the session state of the interview:
//Javascript Code Example
astronautSDK(astronautSDKMessage, function (e) {
if(typeof e.data === 'string' || e.data instanceof String) {
var ASTRNT_interview_state = e.data;
if(arrayOfSessionState.indexOf(astronaut_interview_state) != -1) {
}
}
});
Then, you can use the ASTRNT_interview_state variable to do whatever you need based on the interview state. The ‘state’ that this function return is the same as the “state” that you get when you call getAstronautQnASessionState() function;
How to use it?
Like as mentioned above, here's the three element tags that you need to put on your code:
But you need to pay attention the “src” attribute on the iframe. That’s where you put in the parameter to do the interview.
Here's some of the parameters that you need to set first:
Parameter Name
Key
Description
Job Code
job_code
It’s the job identifier (job code) that you get when you create a job with our 'Create Job' endpoint on ASTRNT's server side integration API.
Name
name
Your candidate's name
Email
email
Your candidate's email
Candidate Interview Code
interview_code
You can use the candidate identifier interview code if you already registered your candidate to ASTRNT system with ASTRNT backend integration API endpoint.
Show Page Settings
show_pages_settings
There’re some pages on the ASTRNT interview experience. The default for the web sdk feature is that all the original pages will not appeared (only video recording page). But you can customize it so this following pages will show when your candidate is doing the interview.
Checking Browser Page | value : CHECKING_BROWSER_PAGE
Introduction Page | value : INTRODUCTION_PAGE
Welcome Video Page | value : WELCOME_VIDEO_PAGE
Interview Detail Page | value : INTERVIEW_DETAIL_PAGE
GDPR Page | value : GDPR_PAGE
Start Session Page | value : START_SESSION_PAGE
Question Info Page | value : QUESTION_INFO_PAGE
QNA Rating Page | value : QNA_RATING_PAGE
Interview Finished Page | value : INTERVIEW_FINISHED_PAGE
You can add more than one page's value that you want to show by adding this values separated by comma.
Example : "CHECKING_BROWSER_PAGE,INTRODUCTION_PAGE,GDPR_PAGE"
Custom Layout Header (on / off)
header
You can custom the ASTRNT Web Assesment & Interview interface. This header on/off setting will give you option to show or hide the default header of ASTRNT Web Assesment & Interview.
Redirect URL
redirect_url
URL that you set up if you want to redirect the page (normally) after the candidate finish interview. You can fetch the redirect URL using getAstronautQnASessionRedirectURL() function.
Optin
optin
It's a special parameter. If you set it as true, then you don't need to send "name, email and candidate_identifier" on the request. Optin "true" will redirect the candidate to a register page first where they will enter their name and email first. Then they will redirected to the ASTRNT web assessment & interview page.
Let's Put It Together!
Let say you already create an ASTRNT job and fill it with questions, and the open code is "MYOWNJOBCODE". And you want to invite a candidate to do the interview. The candidate’s name is Clementine Jane and her email address is clementine@astronaut.co. For the page settings, want to show the Checking Browser Page and Introduction Page. And the other page that you want to show is the Interview Detail Page. You skip GDPR page since you already have your own GDPR page, so you are not put the GDPR_PAGE in show_pages_setting and also the other remaining pages. After candidate finish the interview, you want the page interview is redirect to "https://astrnt.co".
And here’s the iframe tag you need to put on your code to generate ASTRNT interview: