Assigning Pay Rates to an Employee

Use Case:

With pay rate builder now in place, it will be common for businesses to want to assign pay rates of the rates in their account to employees. This API allows them to do that, allowing them to set pay via API.

Note that if they are using rates from our library awards, we still recommend using the process outlined here:Setting Pay Rates via the API to ensure they have the latest version of the library rate.

This is backward compatible with other rates not built using the pay rate engine.

Before assigning the pay rate, you need the employment contract and Base Pay Rule Id. This can be obtained with the below:


URL

curl --location --request GET 'https://{install}.{geo}.deputy.com/api/v1/resource/EmploymentContract'

Sample Return

{
 Award: "hourly"  
AwardStartDate: null  
BasePayRule: 1764  
Code: "2aLj35B9DspffHZzmhmEjY4Rrlw"  
CountryId: null  
Created: "2024-09-23T10:49:48+10:00"  
Creator: 1  
Description: "Default pay policy"  
EmploymentBasis: 1  
EmploymentCategory: 1  
EmploymentCondition: null  
EmploymentStatus: 1  
EmploymentSubType: ""  
EndDate: null  
File: null  
Id: 368  
Modified: "2024-09-23T10:52:57+10:00"  
Name: "Sample"  
PeriodType: 1  
PpId: "2aLj35B9DspffHZzmhmEjY4Rrlw"  
StartDate: null  
StressProfile: null  
StrictLeaveApproval: null  
}

You can get this by retrieving the EmploymentContract objects (Pay Rates) in your account.
This should return all the pay rates in your account. Find the one you want by name, and record the Id and BasePayRule.

To set an award or update an award from the Deputy library rates you use the Set Award From Template endpoint.


*URL**

curl --location --request POST 'https://{install}.{geo}.deputy.com/api/v1/supervise/employee/{employeeid}/setAwardFromTemplate'

Sample Request

$.post('api/v1/supervise/employee/1002/setAwardFromTemplate',JSON.stringify({
    "intContractId": 283,
    "arrOverridePayRules": [
        {
    "Id": 953,
    "HourlyRate": 70
        }
                            ]
    }))
}


Enterprise Customers:

If setting only for particular agreements, you can fill in the particular EmployeeAgreement IDs to only update these. If not entered, this field will update all agreements for the employee. For non-enterprise customers, do not fill this in.

Sample Request

$.post('api/v1/supervise/employee/1002/setAwardFromTemplate',JSON.stringify({
    "intContractId": 283,
    "arrOverridePayRules": [
        {
    "Id": 953,
    "HourlyRate": 70
        }
                            ],
  arrAgreementId: [363,392]
    }))
}

What’s Next

Did this page help you?