Manage Candidates
You may be using a third-party application or tool that needs to access, create, or delete candidate records. You can use the recruitingCandidates
REST service to view, create, update, and delete a candidate record from Oracle Recruiting.
In this use case, let's see how Invision Company can integrate their already existing campus hiring mobile app with Oracle Recruiting.
Let's discuss these scenarios:
- Create a candidate record
- Find a candidate
- Find matching candidates
- Update candidate information
- Delete a candidate record
Create a Candidate Record
Rachel is in charge of the campus hiring application at Invision. Rachel would like to create a candidate record in Oracle Recruiting directly from the data entered by the recruiter or candidate.
- Perform a POST operation on the
recruitingCandidates
resource by providing the candidate details in the request body. - Verify the details returned in the response.
Example URL
Use this resource URL format.
POST
/hcmRestApi/resources/11.13.18.05/recruitingCandidates
Example Request
Here's an example of the request body in JSON format.
{
"LastName": "Hopkins",
"MiddleNames": "William",
"FirstName": "John",
"Suffix": "Sr.",
"PreNameAdjunct": "Sr",
"KnownAs": "JH",
"PreviousLastName": "",
"Honors": "Highest",
"MilitaryRank": "Private",
"Email": "john.hopkins@example.com"
}
Example Response
Here's an example of the response body in JSON format.
{
"CandidateNumber": "187476",
"PreferredLanguage": null,
"LastName": "Hopkins",
"MiddleNames": "William",
"FirstName": "John",
"Title": null,
"Suffix": "Sr.",
"PreNameAdjunct": "Sr",
"KnownAs": "JH",
"PreviousLastName": "",
"Honors": "Highest",
"MilitaryRank": "Private",
"FullName": "John William Hopkins",
"DisplayName": "John Hopkins",
"ListName": "Hopkins, John",
"Email": "john.hopkins@example.com",
"CampaignOptIn": null,
"SourceMedium": null,
"SourceName": null,
"CandidateType": "ORA_EXTERNAL_CANDIDATE",
"PersonId": 300100176560465,
"CreatedBy": "JH-HOPKINS",
"CreationDate": "2019-03-21T19:08:31.003+00:00",
"LastUpdatedBy": "JH-HOPKINS",
"LastUpdateDate": "2019-03-21T19:08:31.334+00:00",
"links": [
{...}
]
}
Find a Candidate
Rachel is using the application to review a specific candidate from the day's event. To get a specific candidate, the application makes a secure query to retrieve the candidate details.
To retrieve a currently existing candidate:
- Query (GET) the candidate using the
CandidateNumber
attribute. - Verify the details returned in the response.
Example URL
Use this resource URL format.
GET
/hcmRestApi/resources/11.13.18.05/recruitingCandidates/92734
Example Response
Here's an example of the response body in JSON format.
{
"CandidateNumber" : "92734",
"PreferredLanguage" : null,
"LastName" : "Mathew",
"MiddleNames" : null,
"FirstName" : "John",
"Title" : null,
"Suffix" : null,
"PreNameAdjunct" : null,
"KnownAs" : null,
"PreviousLastName" : null,
"Honors" : null,
"MilitaryRank" : null,
"FullName" : "Mathew, John",
"DisplayName" : "John Mathew",
"ListName" : "Mathew, John",
"Email" : null,
"CampaignOptIn" : null,
"SourceMedium" : null,
"SourceName" : null,
"CandidateType" : "ORA_INTERNAL_CANDIDATE",
"PersonId" : 100100055309271,
"CreatedBy" : "ZFRCE1301_Duscha",
"CreationDate" : "2017-07-26T14:47:35.049+00:00",
"LastUpdatedBy" : "ZFRCE1301_Duscha",
"LastUpdateDate" : "2017-07-26T14:47:35.057+00:00",
"links": [...]
}
Find Matching Candidates
Rachel wants to review a list of all candidates from today's event with the last name of Hopkins. Using a GET operation, she can retrieve the candidates that match the query criteria.
To retrieve a list of all candidates that match a parameter:
- Query (GET) the candidates by using a query parameter such as
LastName
. - Retrieve the collection URL for the
recruitingCandidates
resource to get the required details. - Verify the details returned in the response.
Example URL
Use this resource URL format.
GET
/hcmRestApi/resources/11.13.18.05/recruitingCandidates?q=LastName=Hopkins
Example Response
Here's an example of the response body in JSON format.
{
"items": [
{
"CandidateNumber": "2647",
"PreferredLanguage": null,
"LastName": "Hopkins",
"MiddleNames": null,
"FirstName": "Jack",
"Title": "MR.",
"Suffix": null,
"PreNameAdjunct": null,
"KnownAs": null,
"PreviousLastName": null,
"Honors": null,
"MilitaryRank": null,
"FullName": "Hopkins, Jack",
"DisplayName": "Jack Hopkins",
"ListName": "Hopkins, Jack",
"Email": null,
"CampaignOptIn": null,
"SourceMedium": null,
"SourceName": null,
"CandidateType": "ORA_INTERNAL_CANDIDATE",
"PersonId": 11143,
"CreatedBy": "JH-HOPKINS",
"CreationDate": "2019-03-21T19:08:31.003+00:00",
"LastUpdatedBy": "JH-HOPKINS",
"LastUpdateDate": "2019-03-21T19:08:31.334+00:00",
"links": [
{...}
]
},
{
"CandidateNumber": "28104",
"PreferredLanguage": null,
"LastName": "Hopkins",
"MiddleNames": null,
"FirstName": "Montana",
"Title": "MR.",
"Suffix": null,
"PreNameAdjunct": null,
"KnownAs": null,
"PreviousLastName": null,
"Honors": null,
"MilitaryRank": null,
"FullName": "Montana Hopkins",
"DisplayName": "Montana Hopkins",
"ListName": "Hopkins,Montana",
"Email": "montana.hopkins@example.com",
"CampaignOptIn": null,
"SourceMedium": null,
"SourceName": null,
"CandidateType": "ORA_INTERNAL_CANDIDATE",
"PersonId": 100010026262572,
"CreatedBy": "JH-HOPKINS",
"CreationDate": "2019-03-21T19:08:31.003+00:00",
"LastUpdatedBy": "JH-HOPKINS",
"LastUpdateDate": "2019-03-21T19:08:31.334+00:00",
"links": [
{...}
]
}
],
"links": [
{...}
]
}
Update Candidate Information
Rachel needs to update a candidate record with additional information. She wants to update the last name and email address for a candidate record.
To update a candidate record:
- Retrieve (GET) the candidate details and obtain the
CandidateNumber
link. - Perform a PATCH operation on this URL by providing the
LastName
andEmail
attributes in the request body. - Verify the details returned in the response.
Example URL
Use this resource URL format.
PATCH
/hcmRestApi/resources/11.13.18.05/recruitingCandidates/{CandidateNumber}
Example Request
Here's an example of the request body in JSON format.
Provide the headers.
Content-Type : application/vnd.oracle.adf.resourceitem+json
{
"LastName": "Smith",
"Email": "john.smith@example.com"
}
Example Response
Here's an example of the response body in JSON format.
{
"CandidateNumber": "187476",
"PreferredLanguage": null,
"LastName": "Smith",
"MiddleNames": "Sir",
"FirstName": "John",
"Title": null,
"Suffix": "Sr.",
"PreNameAdjunct": "Sr",
"KnownAs": "JH",
"PreviousLastName": "JHH",
"Honors": "Highest",
"MilitaryRank": "Private",
"FullName": "Smith, John Sir",
"DisplayName": "John Sr Smith",
"ListName": "Smith, John",
"Email": "john.smith@example.com",
"CampaignOptIn": null,
"SourceMedium": null,
"SourceName": null,
"CandidateType": "ORA_EXTERNAL_CANDIDATE",
"PersonId": 300100176560465,
"CreatedBy": "JH-HOPKINS",
"CreationDate": "2019-03-21T19:08:31.003+00:00",
"LastUpdatedBy": "JH-HOPKINS",
"LastUpdateDate": "2019-03-21T19:08:31.334+00:00",
"links": [
{...}
]
}
Delete a Candidate Record
Rachel has been notified that someone at the event has created a duplicate candidate by incorrectly entering the email address and now needs the second record to be deleted. In this example, Rachel deletes the second record by performing a DELETE operation.
To delete a currently existing candidate:
- Query the database using the query parameter
CandidateNumber
(for example,/recruitingCandidates?q=CandidateNumber=187476
) to identify the candidate record to be deleted. - Perform a DELETE operation on the URL for the specific candidate record. You don't need a payload for this operation.
- Verify that the candidate record is deleted.
Example URL
Use this resource URL format.
DELETE
/hcmRestApi/resources/11.13.18.05/recruitingCandidates/{CandidateNumber}
Example Response
Here's an example of the response body in JSON format.
204 - No Content