Terminate a Work Relationship
Terminating a work relationship can be used to terminate a work relationship, or to end a global temporary assignment. To end a global temporary assignment use the action code to End Global Temporary Assignment.
Terminate an Employee
Let's say that James Davis has turned in his two weeks notice to voluntarily terminate his employment for personal reasons. His termination has to be processed.
To terminate a work relationship:
- Retrieve (GET) the work relationship details and obtain the work relationship item link.
- Perform a POST operation on this URL by providing the action code and termination date in the request body.
Example URL
Use this resource URL format.
POST
/hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/workRelationships/{PeriodOfServiceId}/action/terminate
Example Request
Here's an example of the response body in JSON format.
Provide the headers.
Content-Type : application/vnd.oracle.adf.action+json
REST-Framework-Version : 4
{
"actionCode": "TERMINATION" ,
"terminationDate": "2019-06-09"
}
Example Response
Here's an example of the response body in JSON format.
{
"result": "true"
}
Correct a Termination
Let's say that James Davis is leaving a day earlier than his initial termination date. His termination date needs to be updated.
To correct a termination:
- Retrieve (GET) the work relationship details and obtain the work relationship item link.
- Perform a POST operation on this URL by providing the new termination date in the request body.
Example URL
Use this resource URL format.
POST
/hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/workRelationships/{PeriodOfServiceId}/action/correctTermination
Example Request
Here's an example of the request body in JSON format.
Provide the headers.
Content-Type : application/vnd.oracle.adf.action+json
REST-Framework-Version : 4
{
"terminationDate": "2019-06-09"
}
Example Response
Here's an example of the response body in JSON format.
{
"result": "true"
}
Reverse a Termination
Upon learning that James Davis was leaving the company for compensatory reasons, his management offered a competitive offer. James has accepted the offer, so his termination needs to be reversed.
To reverse a worker termination:
- Retrieve (GET) the work relationship details and obtain the work relationship item link.
- Perform a POST operation on this URL by providing the action code details in the request body.
Example URL
Use this resource URL format.
POST
/hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/workRelationships/{PeriodOfServiceId}/action/reverseTermination
Example Request
Here's an example of the request body in JSON format.
Provide the headers.
Content-Type : application/vnd.oracle.adf.action+json
REST-Framework-Version : 4
Example Response
Here's an example of the response body in JSON format.
{
"result": "true"
}