Applicant

This article explains how to retrieve applicant details using HRCloud APIs.

A person who has applied for any of the jobs is referred to as an Applicant.  The following APIs are used to fetch applicant data.

Get a list of applicants

GET /xApplicant

Returns all the applicants. 

For example,

Request:

GET https://corehr-api.hrcloud.com/v1/cloud/xApplicant

Response:

[
{
"Id": "ac351482a151a221feb464f3a8e00d22",
"xAddress": null,
"xAnswerJson": "[]",
"xApplicantStatusLookup": {
"__ObjectName": "xApplicantStatus",
"__Self": "https://corehr-api.hrcloud.com/v1/cloud/xApplicantStatus/1c96a48600b88c0dbea85d8afb720bcd",
"Id": "1c96a48600b88c0dbea85d8afb720bcd",
"xRecordStatus": "Active",
"xSortOrder": 4,
"xTitle": "On Hold",
"xType": "Review"
},
"xAppliedOn": "2019-09-16T16:48:09.283Z",
"xCoverLetterLookup": null,
"xDateAvailable": null,
"xDesiredPay": {
"Amount": null,
"Currency": null
},
"xEmail": "vikas@gmail.com",
"xEmployeeLookup": null,
"xFacebook": null,
"xFirstName": "Vikas",
"xFullName": "Vikas Arora",
"xJobLookup": {
"__ObjectName": "xJob",
"__Self": "https://corehr-api.hrcloud.com/v1/cloud/xJob/63dd007574e8dac495d004dea852b4f2",
"Id": "63dd007574e8dac495d004dea852b4f2",
"xDepartmentName": null,
"xJobTitle": "Software developer",
"xLocationName": null,
"xPositionName": null,
"xRecordStatus": null
},
"xLastName": "Arora",
"xLastUpdated": "2019-09-16T17:01:22.147Z",
"xLinkedIn": null,
"xPhone": null,
"xPositionLookup": null,
"xPrivacyPolicy": "",
"xRating": null,
"xResumeLookup": {
"__ObjectName": "xResource",
"__Self": "https://corehr-api.hrcloud.com/v1/cloud/xResource/68a803202ad7eee5658c38b908b4f8d6",
"Id": "68a803202ad7eee5658c38b908b4f8d6",
"xName": "testresume.docx"
},
"xTwitter": null,
"xWebsite": null
},
...
]

You can limit the fields in a record or filter records on the basis of some conditions using the filter and select query parameters. Refer the article on query parameters for more details. 

For example, to see only the names and email addresses of the applicants, create the request as shown below. 

Request:

GET https://corehr-api.hrcloud.com/v1/cloud/xApplicant?select=xFullName,xEmail

Response:

[
{
"xEmail": "vikas@gmail.com",
"xFullName": "Vikas Arora"
},
{
"xEmail": "kushal@gmail.com",
"xFullName": "Kushal P"
},
{
"xEmail": "james@gmail.com",
"xFullName": "James P"
}
]

Similarly, to see the list of applicants for a particular job where job title is 'Quality and Assurance Engineer':

Request:

GET https://corehr-api.hrcloud.com/v1/cloud/xApplicant?filter=xJobLookup.xJobTitle eq 'Quality and Assurance Engineer'

Get the details of a particular applicant

GET /xApplicant/:applicantId

Retrieve a single applicant using the specified Id.

Request:

GET https://corehr-api.hrcloud.com/v1/cloud/xApplicant/5e7c3610f4a95dbf0965931a42a5b57d

Response

[
{
"Id": "5e7c3610f4a95dbf0965931a42a5b57d",
"xAddress": null,
"xAnswerJson": "[]",
"xApplicantStatusLookup": {
"__ObjectName": "xApplicantStatus",
"__Self": "https://corehr-api.hrcloud.com/v1/cloud/xApplicantStatus/1c96a48600b88c0dbea85d8afb720bcd",
"Id": "1c96a48600b88c0dbea85d8afb720bcd",
"xRecordStatus": "Active",
"xSortOrder": 4,
"xTitle": "On Hold",
"xType": "Review"
},
"xAppliedOn": "2019-09-16T16:48:09.283Z",
"xCoverLetterLookup": null,
"xDateAvailable": null,
"xDesiredPay": {
"Amount": null,
"Currency": null
},
"xEmail": "vikas@gmail.com",
"xEmployeeLookup": null,
"xFacebook": null,
"xFirstName": "Vikas",
"xFullName": "Vikas Arora",
"xJobLookup": {
"__ObjectName": "xJob",
"__Self": "https://corehr-api.hrcloud.com/v1/cloud/xJob/63dd007574e8dac495d004dea852b4f2",
"Id": "63dd007574e8dac495d004dea852b4f2",
"xDepartmentName": null,
"xJobTitle": "Software developer",
"xLocationName": null,
"xPositionName": null,
"xRecordStatus": null
},
"xLastName": "Arora",
"xLastUpdated": "2019-09-16T17:01:22.147Z",
"xLinkedIn": null,
"xPhone": null,
"xPositionLookup": null,
"xPrivacyPolicy": "",
"xRating": null,
"xResumeLookup": {
"__ObjectName": "xResource",
"__Self": "https://corehr-api.hrcloud.com/v1/cloud/xResource/68a803202ad7eee5658c38b908b4f8d6",
"Id": "68a803202ad7eee5658c38b908b4f8d6",
"xName": "testresume.docx"
},
"xTwitter": null,
"xWebsite": null
}
]

Create a new applicant

POST /xApplicant

Create a applicant record. Following table lists all the input fields used for creating a new applicant.

Input Parameters: 

Fields Type Description Is Mandatory
xFirstName String First name of the applicant Yes
xLastName String Last name of the applicant Yes
xFullName String Full name of the applicant No
xAddress String Address of the applicant No
xDateAvailable String Date from which the applicant is available No
xDesiredPay String Expected pay for the job (amount and currency) No
xEmail String Email address of the applicant Yes
xFacebook String Facebook URL of the applicant No
xLinkedIn String LinkedIn URL of the applicant No
xPhone String Phone number of the applicant No
xPrivacyPolicy String Privacy policy description, if any. No
xRating String Rating of the applicant No
xTwitter String Twitter URL of the applicant No
xWebsite String Website URL of the applicant No
xApplicantStatusLookup String Application Status Id which defines the current status of the application like New, On Hold etc.  Yes
xJobLookup String Job for which the application is submitted No
xResumeLookup String Resume  No
xCoverLetterLookup String Cover Letter of the application No
An ID field is assigned when a new record is created. For example, 

Request:

POST https://corehr-api.hrcloud.com/v1/cloud/xApplicant

Input parameters:

{
"xFirstName": "APITest",
"xLastName": "API test",
"xEmail": "apittest@gmail.com",
"xApplicantStatusLookup":"cdc940fdeeb1e614c7cbbe855f33495e"
}

Update applicant data

PUT /xApplicant

Update the data of an applicant using applicant ID field or any other unique field in the resource object. For example, 

PUT https://corehr-api.hrcloud.com/v1/cloud/xApplicant

Input parameters:

[
{
"Id": "ac351482a151a221feb464f3a8e00d22",
"xEmail":"paul.k@gmail.com"
}
]

Upload Resources

POST /xApplicant/Resource

Upload resources like cover letter, resume etc for an applicant. The resource Id will be returned as a response to the API. This resource id can be used while creating or updating the applicant record to associate the resource as resume or cover letter of the application. 

Please note that in the request body, content type must be set to multipart/form-data.

For example,

Request:

POST https://corehr-api.hrcloud.com/v1/cloud/xApplicant/Resource

Input parameters:

Attach the file. 

Response:

"d2ccc4ea972ac66bec27c33623aa9f0d"

This is the resource Id and can be used to refer to the uploaded resource file.

If this is the resume of an applicant, update the applicant record to associate the uploaded file. 

PUT https://corehr-api.hrcloud.com/v1/cloud/xApplicant

Input parameters:

{
"Id": "9961694b6dda4f0f498715c80c94bd5d",
"xResumeLookup": "d2ccc4ea972ac66bec27c33623aa9f0d"
}

Response:

Updated applicant record.