Retrieving an Employees Pay Conditions

Updated for Fair Work Week changes

πŸ“˜

Note: This has changed as of April 2024 due to some changes related to Fair Work Week in the United States. For those integrating with non-US instances this does not apply.

There is two areas in Deputy where pay rates can be found inside Deputy - The Employee Agreement and also the Employment Contract (by then calling the Pay Rule endpoint using the id linked to the employee.

The Employee Agreement as of April 2024 can override the Employee Contract and set a different base rate to the Employment Contract. This is indicated by the new base_rate element as part of the EmployeeAgreement endpoint. If this returns null this indicates that the employee does not have an overridden pay rate and instead the EmploymentContract endpoint should be used to retrieve the linked BasePayRuleand to determine the amounts.

If the base_rate has an amount, not null this indicates that the employee does have an overridden base pay rate and this rate is what should be considered the employees base pay rate, not that which is present in the EmploymentContract endpoint.

Worked example

In this example we have an employee named Max Martin who has been employed into a business which has new system enabled (US based). Max has a pay rate of 11.11 however this has been set at the EmployeeAgreement level.

To retrieve this pay rate follow the below example.

curl --location request POST 'https://{install}.{geo}.deputy.com/api/v1/resource/EmployeeAgreement/QUERY

This will return the employee agreements which are included in the install. Below is the example from Max Martin

{
        "Id": 4,
        "EmployeeId": 2,
        "PayPoint": 1,
        "EmpType": 1,
        "CompanyName": null,
        "Active": true,
        "StartDate": "2024-04-08T00:00:00-07:00",
        "EndDate": null,
        "Contract": 145,
        "SalaryPayRule": 0,
        "ContractFile": null,
        "PayrollId": "",
        "PayPeriod": 1,
        "HistoryId": 3,
        "Creator": 1,
        "Created": "2024-04-08T17:36:56-07:00",
        "Modified": "2024-04-08T17:40:04-07:00",
        "BaseRate": 11.11,
        "Config": "[]",
        "_DPMetaData": {
            "System": "EmployeeAgreement",
            "CreatorInfo": {
                "Id": 1,
                "DisplayName": "David Kidd",
                "EmployeeProfile": 1,
                "Employee": 1,
                "Photo": "https://photo2.deputy.com/deputec_b240409002037_1638/-135x135_850e371db1b2dcfc225aafca8acd50ca.jpg?Expires=1712709348&Signature=al9Gtq7wXUEoKPXDbpEl-OSKgcXJUSEi5DUTkjXegRueQc4E2geCtlSTQqYQLXDrp0Y6yg3x3ISAvss84Njmogo9o4tU~AF4fXfKtfLoox9fKC5GwsD017UgAvWU8~uXdy71L0EMBIT4qlh~WS1n4q88s~BNOWANiwp2Pv9PznA_&Key-Pair-Id=APKAINP5UVPK4IGBHXOQ",
                "Pronouns": 0,
                "CustomPronouns": null
            }
        }
    }

As you can see, BaseRate has an amount of 11.11 set meaning that Max Martin's base pay rate has been set at the Employee Agreement level not the Employment Contract level.

Here is another example from the same install

{
        "Id": 3,
        "EmployeeId": 1,
        "PayPoint": 1,
        "EmpType": 1,
        "CompanyName": "",
        "Active": true,
        "StartDate": "2012-10-14T00:00:00-07:00",
        "EndDate": null,
        "Contract": 133,
        "SalaryPayRule": 0,
        "ContractFile": 0,
        "PayrollId": "",
        "PayPeriod": 1,
        "HistoryId": 2954,
        "Creator": 1,
        "Created": "2012-10-13T17:00:00-07:00",
        "Modified": "2016-01-19T06:36:49-08:00",
        "BaseRate": null,
        "Config": "[]",
        "_DPMetaData": {
            "System": "EmployeeAgreement",
            "CreatorInfo": {
                "Id": 1,
                "DisplayName": "David Kidd",
                "EmployeeProfile": 1,
                "Employee": 1,
                "Photo": "https://photo2.deputy.com/deputec_b240409002037_1638/-135x135_850e371db1b2dcfc225aafca8acd50ca.jpg?Expires=1712709348&Signature=al9Gtq7wXUEoKPXDbpEl-OSKgcXJUSEi5DUTkjXegRueQc4E2geCtlSTQqYQLXDrp0Y6yg3x3ISAvss84Njmogo9o4tU~AF4fXfKtfLoox9fKC5GwsD017UgAvWU8~uXdy71L0EMBIT4qlh~WS1n4q88s~BNOWANiwp2Pv9PznA_&Key-Pair-Id=APKAINP5UVPK4IGBHXOQ",
                "Pronouns": 0,
                "CustomPronouns": null
            }
        }
    }

In this example the BaseRate has been set to null indicating that the base pay rule and employee contract has not been overridden. To get the pay rate you should use the id 133 which is found in the Contractelement to then call the Employee Contract API endpoint.

Summary

To ensure that you capture all pay rates within an install you should:

  • Check the EmploymentAgreements to see if the BaseRate has been set
  • Retrieve the Pay Rules using the Pay Rules endpoint to retrieve the pay rates which have not been overridden at the employee agreement layer.