Delete Changes

This table shows the required date effective header parameters and the criteria to perform a DELETE_CHANGES operation on date effective objects.

Header Attribute Applicable Required Default Value Criteria

RangeStartDate

Yes

No

EffectiveStartDate of the record in context

These values are optional. If not provided in the header, then DELETE_CHANGES is applied to the record in context.

If RangeStartDate and RangeEndDate are provided in the header, then RangeStartDate must match EffectiveStartDate of any one of the physical records and RangeEndDate must match EffectiveEndDate of any one of the physical records. All records between the specified RangeStartDate and RangeEndDate are deleted.

RangeEndDate

Yes

No

EffectiveEndDate of the record in context

RangeMode

Yes

Yes

NA

You must provide the value DELETE_CHANGES.

RangeSpan

Yes

No

PHYSICAL_ROW_END_DATE

Supports both PHYSICAL_ROW_END_DATE and LOGICAL_ROW_END_DATE. Optional. If not provided, the value defaults to PHYSICAL_ROW_END_DATE.

RangeStartSequence (MCPD Only)

Yes

No

NA

If not provided, the latest MCPD record (effectiveLatestChange=Y) is deleted.

RangeEndSequence (MCPD Only)

Yes

No

NA

NA

Examples

Let's look at some examples of the DELETE_CHANGES operation performed on the assignments child resource of workers to delete records for date effective objects.

Let's say that Mark has an assignment with four physical records, as shown in the table. Each row represents a physical record with an effective start date and an effective end date. This sample data is used in the following examples to retrieve the appropriate records, based on the context date provided, and delete them.

Physical Record Effective Start Date Effective End Date Department

1

2016-01-01

2016-12-31

D1

2

2017-01-01

2017-12-31

D1

3

2018-01-01

2018-12-31

D1

4

2019-01-01

4712-12-31

D1

Example 1

Let's get Mark's worker assignment effective as of 2018-03-01 and delete the physical record.

  1. Retrieve the worker record by performing a GET operation on the workers resource, providing the effectiveDate parameter in the URL.
    GET
    
    /hcmRestApi/resources/11.13.18.05/workers?q=PersonId={id}&effectiveDate=2018-03-01
  2. Obtain the assignments child singular link from the response.
  3. Perform a DELETE operation on the assignments child link by providing the RangeMode in the effective-Of header attribute.
    DELETE
    
    /hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/workRelationships/{PeriodOfServiceId}/
    child/assignments/{assignmentsUniqID}

    Header

    REST-Framework-Version : 4
    Content-Type : application/vnd.oracle.adf.resourceitem+json
    effective-Of : RangeMode=DELETE_CHANGES
  4. Physical record 3 is deleted and physical record 2 is end dated with the effective end date of physical record 3 to close the range gap.
    Before Deletion   After Deletion
    Physical Record Effective Start Date Effective End Date Department   Physical Record Effective Start Date Effective End Date Department

    1

    2016-01-01

    2016-12-31

    D1

     

    1

    2016-01-01

    2016-12-31

    D1

    2

    2017-01-01

    2017-12-31

    D1

    2

    2017-01-01

    2018-12-31

    D1

    3

    2018-01-01

    2018-12-31

    D1

    3

    2019-01-01

    4712-12-31

    D1

    4

    2019-01-01

    4712-12-31

    D1

    -

    -

    -

    -

Example 2

Let's get Mark's worker assignment effective as of 2019-02-25 and delete the physical record.

  1. Retrieve the worker record by performing a GET operation on the workers resource, providing the effectiveDate parameter in the URL.
    GET
    
    /hcmRestApi/resources/11.13.18.05/workers?q=PersonId={id}&effectiveDate=2019-02-25
  2. Obtain the assignments child singular link from the response.
  3. Perform a DELETE operation on the assignments child link by providing the RangeMode in the effective-Of header attribute.
    DELETE
    
    /hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/workRelationships/{PeriodOfServiceId}/
    child/assignments/{assignmentsUniqID}

    Header

    REST-Framework-Version : 4
    Content-Type : application/vnd.oracle.adf.resourceitem+json
    effective-Of : RangeMode=DELETE_CHANGES
  4. Physical record 4 is deleted and physical record 3 is end dated with the effective end date of physical record 4 to close the range gap.
    Before Deletion   After Deletion
    Physical Record Effective Start Date Effective End Date Department   Physical Record Effective Start Date Effective End Date Department

    1

    2016-01-01

    2016-12-31

    D1

     

    1

    2016-01-01

    2016-12-31

    D1

    2

    2017-01-01

    2017-12-31

    D1

    2

    2017-01-01

    2017-12-31

    D1

    3

    2018-01-01

    2018-12-31

    D1

    3

    2018-01-01

    4712-12-31

    D1

    4

    2019-01-01

    4712-12-31

    D1

    -

    -

    -

    -

Example 3

Let's get Mark's worker assignment effective as of 2019-02-25 and delete the physical record by providing the RangeStartDate.

  1. Retrieve the worker record by performing a GET operation on the workers resource, providing the effectiveDate parameter in the URL.
    GET
    
    /hcmRestApi/resources/11.13.18.05/workers?q=PersonId={id}&effectiveDate=2019-02-25
  2. Obtain the assignments child singular link from the response.
  3. Perform a DELETE operation on the assignments child link by providing the RangeMode and RangeStartDate in the effective-Of header attribute.
    DELETE
    
    /hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/workRelationships/{PeriodOfServiceId}/
    child/assignments/{assignmentsUniqID}

    Header

    REST-Framework-Version : 4
    Content-Type : application/vnd.oracle.adf.resourceitem+json
    effective-Of : RangeMode=DELETE_CHANGES;RangeStartDate=2019-01-01
  4. Physical record 4 is deleted and physical record 3 is end dated with the effective end date of physical record 4 to close the range gap.
    Before Deletion   After Deletion
    Physical Record Effective Start Date Effective End Date Department   Physical Record Effective Start Date Effective End Date Department

    1

    2016-01-01

    2016-12-31

    D1

     

    1

    2016-01-01

    2016-12-31

    D1

    2

    2017-01-01

    2017-12-31

    D1

    2

    2017-01-01

    2017-12-31

    D1

    3

    2018-01-01

    2018-12-31

    D1

    3

    2018-01-01

    4712-12-31

    D1

    4

    2019-01-01

    4712-12-31

    D1

Example 4

Let's get Mark's worker assignment effective as of 2018-03-01 and delete the physical record by providing the RangeStartDate.

  1. Retrieve the worker record by performing a GET operation on the workers resource, providing the effectiveDate parameter in the URL.
    GET
    
    /hcmRestApi/resources/11.13.18.05/workers?q=PersonId={id}&effectiveDate=2018-03-01
  2. Obtain the assignments child singular link from the response.
  3. Perform a DELETE operation on the assignments child link by providing the RangeMode and RangeStartDate in the effective-Of header attribute.
    DELETE
    
    /hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/workRelationships/{PeriodOfServiceId}/
    child/assignments/{assignmentsUniqID}

    Header

    REST-Framework-Version : 4
    Content-Type : application/vnd.oracle.adf.resourceitem+json
    effective-Of : RangeMode=DELETE_CHANGES;RangeStartDate=2018-01-01
  4. Physical record 3 is deleted and physical record 2 is end dated with the effective end date of physical record 3 to close the range gap.
    Before Deletion   After Deletion
    Physical Record Effective Start Date Effective End Date Department   Physical Record Effective Start Date Effective End Date Department

    1

    2016-01-01

    2016-12-31

    D1

     

    1

    2016-01-01

    2016-12-31

    D1

    2

    2017-01-01

    2017-12-31

    D1

    2

    2017-01-01

    2018-12-31

    D1

    3

    2018-01-01

    2018-12-31

    D1

    4

    2019-01-01

    4712-12-31

    D1

    3

    2019-01-01

    4712-12-31

    D1

Example 5

Let's get Mark's worker assignment effective as of 2018-01-01 and delete the physical record by providing the RangeStartDate and RangeEndDate.

  1. Retrieve the worker record by performing a GET operation on the workers resource, providing the effectiveDate parameter in the URL.
    GET
    
    /hcmRestApi/resources/11.13.18.05/workers?q=PersonId={id}&effectiveDate=2018-01-01
  2. Obtain the assignments child singular link from the response.
  3. Perform a DELETE operation on the assignments child link by providing the RangeMode, RangeStartDate, and RangeEndDate in the effective-Of header attribute.
    DELETE
    
    /hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/workRelationships/{PeriodOfServiceId}/
    child/assignments/{assignmentsUniqID}
    

    Header

    REST-Framework-Version : 4
    Content-Type : application/vnd.oracle.adf.resourceitem+json
    effective-Of : RangeMode=DELETE_CHANGES;RangeStartDate=2018-01-01;RangeEndDate=2018-12-31
  4. Physical record 3 is deleted and physical record 2 is end dated with the effective end date of physical record 3 to close the range gap.
    Before Deletion   After Deletion
    Physical Record Effective Start Date Effective End Date Department   Physical Record Effective Start Date Effective End Date Department

    1

    2016-01-01

    2016-12-31

    D1

     

    1

    2016-01-01

    2016-12-31

    D1

    2

    2017-01-01

    2017-12-31

    D1

    2

    2017-01-01

    2018-12-31

    D1

    3

    2018-01-01

    2018-12-31

    D1

    4

    2019-01-01

    4712-12-31

    D1

    3

    2019-01-01

    4712-12-31

    D1

Example 6

Let's get Mark's worker assignment effective as of 2018-01-01 and delete the physical record by providing the RangeStartDate and RangeSpan.

  1. Retrieve the worker record by performing a GET operation on the workers resource, providing the effectiveDate parameter in the URL.
    GET
    
    /hcmRestApi/resources/11.13.18.05/workers?q=PersonId={id}&effectiveDate=2018-01-01
  2. Obtain the assignments child singular link from the response.
  3. Perform a DELETE operation on the assignments child link by providing the RangeMode, RangeStartDate, and RangeSpan in the effective-Of header attribute.
    DELETE
    
    /hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/workRelationships/{PeriodOfServiceId}/
    child/assignments/{assignmentsUniqID}
    

    Header

    REST-Framework-Version : 4
    Content-Type : application/vnd.oracle.adf.resourceitem+json
    effective-Of : RangeMode=DELETE_CHANGES;RangeStartDate=2018-01-01;RangeSpan=PHYSICAL_ROW_END_DATE
  4. Physical record 3 is deleted and physical record 2 is end dated with the effective end date of physical record 3 to close the range gap.
    Before Deletion   After Deletion
    Physical Record Effective Start Date Effective End Date Department   Physical Record Effective Start Date Effective End Date Department

    1

    2016-01-01

    2016-12-31

    D1

     

    1

    2016-01-01

    2016-12-31

    D1

    2

    2017-01-01

    2017-12-31

    D1

    2

    2017-01-01

    2018-12-31

    D1

    3

    2018-01-01

    2018-12-31

    D1

    4

    2019-01-01

    4712-12-31

    D1

    3

    2019-01-01

    4712-12-31

    D1

Example 7

Let's get Mark's worker assignment effective as of 2019-02-25 and delete the physical record by providing the RangeStartDate and RangeSpan.

  1. Retrieve the worker record by performing a GET operation on the workers resource, providing the effectiveDate parameter in the URL.
    GET
    
    /hcmRestApi/resources/11.13.18.05/workers?q=PersonId={id}&effectiveDate=2019-02-25
  2. Obtain the assignments child singular link from the response.
  3. Perform a DELETE operation on the assignments child link by providing the RangeMode, RangeStartDate, and RangeSpan in the effective-Of header attribute.
    DELETE
    
    /hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/workRelationships/{PeriodOfServiceId}/
    child/assignments/{assignmentsUniqID}
    

    Header

    REST-Framework-Version : 4
    Content-Type : application/vnd.oracle.adf.resourceitem+json
    effective-Of : RangeMode=DELETE_CHANGES;RangeStartDate=2019-01-01;RangeSpan=PHYSICAL_ROW_END_DATE
  4. Physical record 4 is deleted and physical record 3 is end dated with the effective end date of physical record 4 to close the range gap.
    Before Deletion   After Deletion
    Physical Record Effective Start Date Effective End Date Department   Physical Record Effective Start Date Effective End Date Department

    1

    2016-01-01

    2016-12-31

    D1

     

    1

    2016-01-01

    2016-12-31

    D1

    2

    2017-01-01

    2017-12-31

    D1

    2

    2017-01-01

    2017-12-31

    D1

    3

    2018-01-01

    2018-12-31

    D1

    3

    2018-01-01

    4712-12-31

    D1

    4

    2019-01-01

    4712-12-31

    D1

Example 8

Let's get Mark's worker assignment effective as of 2018-01-01 and delete the physical record by providing the RangeStartDate and RangeSpan.

  1. Retrieve the worker record by performing a GET operation on the workers resource, providing the effectiveDate parameter in the URL.
    GET
    
    /hcmRestApi/resources/11.13.18.05/workers?q=PersonId={id}&effectiveDate=2018-01-01
  2. Obtain the assignments child singular link from the response.
  3. Perform a DELETE operation on the assignments child link by providing the RangeMode, RangeStartDate, and RangeSpan in the effective-Of header attribute.
    DELETE
    
    /hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/workRelationships/{PeriodOfServiceId}/
    child/assignments/{assignmentsUniqID}
    

    Header

    REST-Framework-Version : 4
    Content-Type : application/vnd.oracle.adf.resourceitem+json
    effective-Of : RangeMode=DELETE_CHANGES;RangeStartDate=2018-01-01;RangeSpan=LOGICAL_ROW_END_DATE
  4. Physical records 3 and 4 are deleted and physical record 2 is end dated with the effective end date of physical record 4 to close the range gap.
    Before Deletion   After Deletion
    Physical Record Effective Start Date Effective End Date Department   Physical Record Effective Start Date Effective End Date Department

    1

    2016-01-01

    2016-12-31

    D1

     

    1

    2016-01-01

    2016-12-31

    D1

    2

    2017-01-01

    2017-12-31

    D1

    2

    2017-01-01

    4712-12-31

    D1

    3

    2018-01-01

    2018-12-31

    D1

    4

    2019-01-01

    4712-12-31

    D1

Example 9

Let's get Mark's worker assignment effective as of 2019-02-25 and delete the physical record by providing the RangeStartDate and RangeSpan.

  1. Retrieve the worker record by performing a GET operation on the workers resource, providing the effectiveDate parameter in the URL.
    GET
    
    /hcmRestApi/resources/11.13.18.05/workers?q=PersonId={id}&effectiveDate=2019-02-25
  2. Obtain the assignments child singular link from the response.
  3. Perform a DELETE operation on the assignments child link by providing the RangeMode, RangeStartDate, and RangeSpan in the effective-Of header attribute.
    DELETE
    
    /hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/workRelationships/{PeriodOfServiceId}/
    child/assignments/{assignmentsUniqID}
    

    Header

    REST-Framework-Version : 4
    Content-Type : application/vnd.oracle.adf.resourceitem+json
    effective-Of : RangeMode=DELETE_CHANGES;RangeStartDate=2019-01-01;RangeSpan=LOGICAL_ROW_END_DATE
  4. Physical record 4 is deleted and physical record 3 is end dated with the effective end date of physical record 4 to close the range gap.
    Before Deletion   After Deletion
    Physical Record Effective Start Date Effective End Date Department   Physical Record Effective Start Date Effective End Date Department

    1

    2016-01-01

    2016-12-31

    D1

     

    1

    2016-01-01

    2016-12-31

    D1

    2

    2017-01-01

    2017-12-31

    D1

    2

    2017-01-01

    2017-12-31

    D1

    3

    2018-01-01

    2018-12-31

    D1

    3

    2018-01-01

    4712-12-31

    D1

    4

    2019-01-01

    4712-12-31

    D1