Update a Worker Manager
Let's say that Alex Robinson's manager James Davis is leaving the company so his manager needs to be updated with his replacement Alicia Martin.
To update the manager:
- Retrieve (GET) the worker details and obtain the manager item link.
- Perform a PATCH operation on this URL by providing the new manager information in the request body.
Example URL
Use this resource URL format.
PATCH
/hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/workRelationships/{PeriodOfServiceId}/child/assignments/{assignmentsUniqID}/child/managers/{managersUniqID}
Example Request
Here's an example of the request body in JSON format.
Provide the headers.
Content-Type : application/vnd.oracle.adf.resourceitem+json
REST-Framework-Version : 4
effective-Of : RangeMode=UPDATE;RangeStartDate=2019-06-11;RangeEndDate=4712-12-31
{
"ActionCode": "MANAGER_CHANGE",
"ManagerAssignmentNumber": "E955160008191552",
"ManagerType": "LINE_MANAGER"
}
Example Response
Here's an example of the response body in JSON format.
{
"AssignmentSupervisorId": 598504,
"EffectiveStartDate": "2019-06-11",
"EffectiveEndDate": "4712-12-31",
"ManagerAssignmentId": 300100180052435,
"ManagerAssignmentNumber": "E955160008191552",
"ManagerType": "LINE_MANAGER",
"ActionCode": "MANAGER_CHANGE",
"ReasonCode": null,
"CreatedBy": "HCM_INTEGRATION_SPEC",
"CreationDate": "2019-06-07T15:36:27.784+00:00",
"LastUpdatedBy": "HCM_INTEGRATION_SPEC",
"LastUpdateDate": "2019-06-11T18:34:58.437+00:00",
"links": [...]
}