Correction

This table shows the required date effective header parameters and the criteria to perform a PATCH Correction 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 correction 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 corrected.

RangeEndDate

Yes

No

EffectiveEndDate of the record in context

RangeMode

Yes

Yes

NA

You must provide the value CORRECTION.

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.

When RangeSpan and RangeEndDate are both provided, RangeEndDate takes precedence and RangeSpan is ignored.

RangeStartSequence (MCPD only)

Yes

No

NA

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

RangeEndSequence(MCPD only)

Yes

No

NA

NA

Examples

Let's look at some examples of PATCH correction operations performed on the assignments child resource of workers to correct 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 correct 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 assignment details without providing a context date and correct the physical record.

  1. Retrieve the worker record by performing a GET operation on the workers resource using this URL format.
    GET
    
    /hcmRestApi/resources/11.13.18.05/workers?q=PersonId={id}
  2. Obtain the assignments child singular link from the response.
  3. Perform a PATCH operation on the assignments child link by providing the RangeMode in the effective-Of header attribute and the updated details in the request body.
    PATCH
    
    /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=CORRECTION

    Sample Request

    {
      "DepartmentName": "L1"
    }
  4. Verify the details returned in the response. The assignment record as of sysdate is retrieved and corrected.
    Before Correction   After Correction
    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

    2018-12-31

    D1

    4

    2019-01-01

    4712-12-31

    D1

    4

    2019-01-01

    4712-12-31

    L1

Example 2

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

  1. Retrieve the worker record by performing a GET operation on the workers resource using this URL format.
    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 PATCH operation on the assignments child link by providing the RangeMode in the effective-Of header attribute and the updated details in the request body.
    PATCH
    
    /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=CORRECTION

    Sample Request

    {
      "DepartmentName": "L1"
    }
  4. Verify the details returned in the response. The assignment record effective as of 2018-03-01 is retrieved and corrected.
    Before Correction   After Correction
    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

    2018-12-31

    L1

    4

    2019-01-01

    4712-12-31

    D1

    4

    2019-01-01

    4712-12-31

    D1

Example 3

Let's get Mark's assignment details effective as of 2019-02-25 and correct 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 PATCH operation on the assignments child link by providing the RangeMode and RangeStartDate in the effective-Of header attribute and the updated details in the request body.
    PATCH
    
    /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=CORRECTION;RangeStartDate=2019-01-01

    Sample Request

    {
      "DepartmentName": "L1"
    }
  4. Verify the details returned in the response. The assignment record effective as of 2019-02-25 with RangeStartDate 2019-01-01 is retrieved and corrected.
    Before Correction   After Correction  
    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

    2018-12-31

    D1

    4

    2019-01-01

    4712-12-31

    D1

    4

    2019-01-01

    4712-12-31

    L1

Example 4

Let's get Mark's assignment details effective as of 2018-01-01 and correct 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 PATCH operation on the assignments child link by providing the RangeMode, RangeStartDate, and RangeEndDate in the effective-Of header attribute, and the updated details in the request body.
    PATCH
    
    /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=CORRECTION;RangeStartDate=2018-01-01;RangeEndDate=2018-12-31

    Sample Request

    {
      "DepartmentName": "L1"
    }
  4. Verify the details returned in the response. The assignment record effective as of 2018-01-01 within the RangeStartDate 2018-01-01 and RangeEndDate 2018-12-31 is retrieved and corrected.
    Before Correction   After Correction  
    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

    2018-12-31

    L1

    4

    2019-01-01

    4712-12-31

    D1

    4

    2019-01-01

    4712-12-31

    D1

Example 5

Let's get Mark's assignment details effective as of 2018-01-01 and correct 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 PATCH operation on the assignments child link by providing the RangeMode , RangeStartDate , and RangeSpan in the effective-Of header attribute and the updated details in the request body.
    PATCH
    
    /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=CORRECTION;RangeStartDate=2018-01-01;RangeSpan=PHYSICAL_ROW_END_DATE

    Sample Request

    {
      "DepartmentName": "L1"
    }
  4. Verify the details returned in the response. The assignment record effective as of 2018-01-01 with RangeStartDate 2018-01-01 and (physical row end date) 2018-12-31 is retrieved and corrected.
    Before Correction   After Correction  
    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

    2018-12-31

    L1

    4

    2019-01-01

    4712-12-31

    D1

    4

    2019-01-01

    4712-12-31

    D1

Example 6

Let's get Mark's assignment details effective as of 2018-01-01 and correct 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 PATCH operation on the assignments child link by providing the RangeMode, RangeStartDate and RangeSpan in the effective-Of header attribute and the updated details in the request body.
    PATCH
    
    /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=CORRECTION;RangeStartDate=2018-01-01;RangeSpan=LOGICAL_ROW_END_DATE

    Sample Request

    {
      "DepartmentName": "L1"
    }
  4. Verify the details returned in the response. The assignment record effective as of 2018-01-01 with RangeStartDate 2018-01-01 and RangeSpan (logical row end date) 4712-12-31 is retrieved and corrected. That is, both physical records 3 and 4 are corrected.
    Before Correction   After Correction  
    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

    2018-12-31

    L1

    4

    2019-01-01

    4712-12-31

    D1

    4

    2019-01-01

    4712-12-31

    L1

Multiple Changes Per Day

Let's look at some examples of PATCH correction operations performed on the assignments child resource of workers to correct records for multiple changes on the same day.

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. Multiple changes are done on physical record 3 on the same day, 2018-01-01. This sample data is used in the following examples to retrieve the appropriate records, based on the context date provided, and correct them.

Physical Record Effective Start Date Effective End Date Department Range Sequence Effective Latest Change

1

2016-01-01

2016-12-31

D1

1

Y

2

2017-01-01

2017-12-31

D1

1

Y

3

2018-01-01

2018-01-01

D1

1

N

2018-01-01

2018-01-01

D1

2

N

2018-01-01

2018-01-01

D1

3

N

2018-01-01

2018-12-31

D1

4

Y

4

2019-01-01

4712-12-31

D1

1

Y

Example 1

Let's get Mark's assignment details effective as of 2018-01-01 and correct 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 PATCH operation on the assignments child link by providing the RangeMode, RangeStartDate and RangeEndDate in the effective-Of header attribute, and the updated details in the request body.
    PATCH
    
    /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=CORRECTION;RangeStartDate=2017-01-01;RangeEndDate=4712-12-31

    Sample Request

    {
      "DepartmentName": "L1"
    }
  4. Verify the details returned in the response. The assignment record effective as of 2018-01-01 with RangeStartDate 2017-01-01 and RangeEndDate 4712-12-31 is retrieved and corrected. Physical records 2 , 3, and 4 are corrected and the effective latest change is applied on physical record 3 with Range Sequence 4.
    Before Correction   After Correction
    Physical Record Effective Start Date Effective End Date Department Range Sequence Effective Latest Change Physical Record Effective Start Date Effective End Date Department Range Sequence Effective Latest Change

    1

    2016-01-01

    2016-12-31

    D1

    1

    Y

     

    1

    2016-01-01

    2016-12-31

    D1

    1

    Y

    2

    2017-01-01

    2017-12-31

    D1

    1

    Y

    2

    2017-01-01

    2017-12-31

    L1

    1

    N

    3

    2018-01-01

    2018-01-01

    D1

    1

    N

    3

    2018-01-01

    2018-01-01

    L1

    1

    N

    2018-01-01

    2018-01-01

    D1

    2

    N

    2018-01-01

    2018-01-01

    L1

    2

    N

    2018-01-01

    2018-01-01

    D1

    3

    N

    2018-01-01

    2018-01-01

    L1

    3

    N

    2018-01-01

    2018-12-31

    D1

    4

    Y

    2018-01-01

    2018-12-31

    L1

    4

    Y

    4

    2019-01-01

    4712-12-31

    D1

    1

    Y

    4

    2019-01-01

    4712-12-31

    L1

    1

    Y

Example 2

Let's get Mark's assignment details effective as of 2018-01-01 and correct the physical record by providing the RangeStartDate, RangeStartSequence, and RangeEndSequence.

  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 PATCH operation on the assignments child link by providing the RangeMode, RangeStartDate, RangeStartSequence, and RangeEndSequence in the effective-Of header attribute, and the updated details in the request body.
    PATCH
    
    /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=CORRECTION;RangeStartDate=2018-01-01;RangeStartSequence=1; RangeEndSequence=4

    Sample Request

    {
      "DepartmentName": "L1"
    }
  4. Verify the details returned in the response. The assignment record effective as of 2018-01-01 with RangeStartSequence 1 and RangeEndSequence 4 is retrieved and corrected. That is, physical record 3 is corrected and the effective latest change is applied on the record with Range Sequence 4.
    Before Correction   After Correction
    Physical Record Effective Start Date Effective End Date Department Range Sequence Effective Latest Change Physical Record Effective Start Date Effective End Date Department Range Sequence Effective Latest Change

    1

    2016-01-01

    2016-12-31

    D1

    1

    Y

     

    1

    2016-01-01

    2016-12-31

    D1

    1

    Y

    2

    2017-01-01

    2017-12-31

    D1

    1

    Y

    2

    2017-01-01

    2017-12-31

    D1

    1

    Y

    3

    2018-01-01

    2018-01-01

    D1

    1

    N

    3

    2018-01-01

    2018-01-01

    L1

    1

    N

    2018-01-01

    2018-01-01

    D1

    2

    N

    2018-01-01

    2018-01-01

    L1

    2

    N

    2018-01-01

    2018-01-01

    D1

    3

    N

    2018-01-01

    2018-01-01

    L1

    3

    N

    2018-01-01

    2018-12-31

    D1

    4

    Y

    2018-01-01

    2018-12-31

    L1

    4

    Y

    4

    2019-01-01

    4712-12-31

    D1

    1

    Y

    4

    2019-01-01

    4712-12-31

    D1

    1

    Y