Manage Assigned Payroll

You can use the Payroll REST API to manage payroll definitions and element duration dates for an assigned payroll. In this use case, we discuss these scenarios:

  • Assign a Payroll to an Assignment
  • Retrieve Element Duration Dates for Assigned Payroll

Assign a Payroll

You can add a weekly payroll definition to an assignment. Typically, you add a payroll to an assignment when you hire an employee. Occasionally, you add a payroll to an assignment after the hiring process completes.

Let's say that Andy Jones was hired by Vision Corporation and his weekly payroll definition needs to be added to his assignment.

To assign a payroll definition:

  1. Perform a PATCH operation on the assignedPayrolls resource by providing the payroll definition details in the request body.
  2. Verify the details returned in the response.

Example URL

Use this resource URL format.

PATCH

/hcmRestApi/resources/11.13.18.05/payrollRelationships/{Id}/child/payrollAssignments/{Id}/child/assignedPayrolls

Example Request

Here's an example of the response body in JSON format.

{ 
  "PayrollId": 300100095492336, 
  "StartDate": "2015-01-01", 
  "EffectiveStartDate": "2015-01-01" 
 }

Example Response

Here's an example of the response body in JSON format.

{
  "AssignedPayrollId": 300100180646773,
  "PayrollId": 300100095492336,
  "StartDate": "2015-01-01",
  "EndDate": "4712-12-31",
  "TimeCardRequired": null,
  "OverridingPeriodId": null,
  "EffectiveStartDate": "2015-01-01",
  "EffectiveEndDate": "4712-12-31",
  "Lsed": null
}

Retrieve Element Duration Dates

You can use the assignedPayrollDates resource to manage element duration dates for an assigned payroll. The payroll dates on the assigned payroll control when the employee is processed in a specific payroll.

David is on a monthly payroll, but starting 20-Feb-19, he's transferred to a semi-monthly payroll. His various time definition dates look like this.

Time Definitions Monthly Semi-Monthly
First Standard Earnings Date (FSED) 01/01/18 02/20/2018
Last Standard Earnings Date (LSED) 02/19/2018
Last Standard Process Date (LSPD) 02/28/2018
Final Close (FC) 07/31/2018

Here's a graphic to help you understand this scenario.

Retrieving the element duration dates.

To retrieve the last standard earnings date:

  1. Perform a GET operation on the assignedPayrollDates resource using the date identifier.
  2. Verify the standard earnings details returned in the response.

Example URL

Use this resource URL format.

GET

/hcmRestApi/resources/11.13.18.05/payrollRelationships/{Id}/child/payrollAssignments/{Id}/child/assignedPayrolls/{Id}/child/assignedPayrollDates/{Id}

Example Response

Here's an example of the response body in JSON format.

{
    "DateValue": "2019-02-19",
    "PayDateId": 300100178289895,
    "ShortName": "LSED"
}