Creates an application for specific job. The candidate may (depends on the provider implementation) receive notification that her/his application was successfully accepted by the company.
npm i @superfaceai/one-sdk
const { SuperfaceClient } = require('@superfaceai/one-sdk');
// You can manage tokens here: https://superface.ai/insights
const sdk = new SuperfaceClient({ sdkAuthToken: '<< Login to get your token >>' });
async function run() {
// Load the profile
const profile = await sdk.getProfile('recruitment/candidates@1.0.1');
// Use the profile
const result = await profile
.getUseCase('CreateCandidate')
.perform({
jobId: 'JOB_ID',
firstName: 'Demo',
lastName: 'Testing',
email: 'demo_testing@fakemail.com'
}, {
provider: 'mock'
});
// Handle the result
try {
const data = result.unwrap();
console.log(data);
} catch (error) {
console.error(error);
}
}
run();
{
"jobId": "JOB_ID",
"firstName": "Demo",
"lastName": "Testing",
"email": "demo_testing@fakemail.com"
}
{
"id": "CANDIDATE_ID",
"jobId": "JOB_ID"
}