Introduction:

This blog has the REST API details that can be used to update worker email details 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.

 

STEP 1: Get Worker’s Email URL

End Point URL:

https://xx.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers?q=PersonNumber=WD000001&expand=emails

EndPoint URL Parameter: PersonNumber=WD000001

Method: GET

Authentication: Basic

Username: username@xxcomp.com

Password: Password

Response:

From the response data, under “emails” array, pick “href” value where “rel”=”self” for the active date record range and “PrimaryFlag”=”true” and “EmailType”=”W1” to get Email update EndPoint URL.

 

STEP 2: Update Worker Email

End Point URL:

https://xx.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED0005770800005AF3145C88B40000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B597419030000787077080000018B927AC00078/child/emails/300000015153570

Method: PATCH

Authentication: Basic

Username: username@rcubedco.com

Password: Password

Sample Payload:

{

“EmailType”: “W1”,

“EmailAddress”: “new.email@xxcomp.com”,

“FromDate”: “2024-01-20”,

“PrimaryFlag”: true

}

Response:

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

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

Start typing and press Enter to search