Introduction:

This blog has the REST API details that can be used to create worker data in Oracle Cloud application.

 

Cause of the issue:

Business wants to integrate their Workday application with Oracle Cloud to sync the employee details. So, whenever there is a new employee created or existing employee details updated in Workday application, business wants to import them in Oracle Cloud as well.

 

How do we solve: 

Oracle provides a REST API which can be used to import the workers in Oracle Cloud in the form of payload. REST API responds with import status and error details in case of failure. Below is the sample payload used to import the workers.

 

End Point URL:

https://xx.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers

Perform a POST operation on this URL by providing the new work relationship details in the request body.

Method: POST

Custom Header Attribute:

  Header Attribute Name Value Mapping
  Effective-Of RangeStartDate=2023-10-28;RangeEndDate=4712-12-31 RangeStartDate – Pass Hire Date from Workday

RangeEndDate – Default to 4712-12-31

 

Authentication: Basic

Username: username@compco.com

Password: Password

Sample Payload:

{

“PersonNumber”: “WD000005”,

“workRelationships”: [

{

“LegalEmployerName”: “XXCOMP LLC”,

“WorkerType”: “E”,

“PrimaryFlag”: true,

“assignments”:[

{

“ActionCode”: “HIRE”,

“BusinessUnitName”: “XXCOMP US BU”,

“JobCode”: “Level_2”,

“DepartmentName”: “40151 – Enterprise Services”,

“AssignmentCategory”: “FR”,

“PermanentTemporary”: “R”,

“DefaultExpenseAccount”: “1001-64020-30009-9999-99999-99999-9999-99999”,

“managers”: [

{

“ManagerAssignmentNumber”: “100544”,

“ManagerType”: “LINE_MANAGER”

}

]

}]

}

],

“names”:[

{

“LegislationCode”: “GLOBAL”,

“LastName”: “Emp05”,

“FirstName”: “Test”

}

],

“emails”: [

{

“EmailType”: “W1”,

“EmailAddress”: “Test.Emp05@getXXCOMP.com”

}

]

}

 

Response:

The response will have the status code along with created data.

  • The status code will be “201 Created” if the creation process is successful.
  • Other than “201 Created”, any other status codes should be treated as failed.
Recommended Posts

Start typing and press Enter to search