Cancel a Work Relationship

Let's say that Amanda Harris was created as a pending worker in the application. However, she decided not to work for your company. You need to cancel her work relationship.

To cancel a work relationship:

  1. Retrieve (GET) the work relationship details and obtain the work relationship item link.
  2. Perform a POST operation on this URL by providing the action code and the effective 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/cancelWorkRelationship

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"
}