Setting Pay Rates via the API

A core case for Embed includes setting pay rates via the API. Here is how!

📘

Deputy Pay Rate Library

This example will show how to set a pay rate for a user in a particular install. For the example we are using FLSA, setting up an employee with the FLSA pay rate and a base pay of $50.

Getting the award code

The first step in setting a payrate for a user is retrieving the pay rates award code.

curl --location --request GET '<https://{install}.{geo}.deputy.com/api/v1/payroll/listAwardsLibrary>'

This will return all of the available awards in the pay rate library for this particular install account, including those in the new pay rate library. The response will include the names of Deputy provisioned pay rates (eg. FLSA Pay Rate), as well as their corresponding AwardCode (eg. "2QUXgEwMKsHBPyCthMxG2orWtjE").

🚧

New Pay Rate Library

The Deputy team is in the process of converting some pay rates over to a new pay rate engine, including FLSA. If the award code is not of the format above (mixed case alphanumeric), the pay rate is of the old format.

The process remains the same for rates in the new and old library, but the format of their award code may be different.

Get the Base Pay Rule Id for the pay policy

The next step in setting a pay rate is retrieving a base pay rule ID. Use the award code you just found and the listAwardsLibrary endpoint to get this, for example:

curl --location --request GET '<https://{install}.{geo}.deputy.com/api/v1/payroll/listAwardsLibrary/{AwardCode}>'

Which will give the repsonse:

AwardCode: "2QUXgEwMKsHBPyCthMxG2orWtjE"  
CountryCode: "us"  
DeputecEmploymentContract:  
  Award: "flsa"  
  AwardStartDate: "2009-07-24"  
  BasePayRule: "2IZfeFPQFTHVpzVtzq9q3dFNiqQ"  
  BasePayRuleObject: {Id: '2IZfeFPQFTHVpzVtzq9q3dFNiqQ', PayTitle: 'US Regular Base', RemunerationType: 1, RemunerationBy: 1, HourlyRate: 7.25, …}  
  Code: "2QUXgEwMKsHBPyCthMxG2orWtjE"  
  Description: "FLSA Pay Rate"  
  EmploymentBasis: 1  
  EmploymentCategory: 1  
  EmploymentStatus: 1  
  EmploymentSubType: "flsa"  
  Id: null  
  Name: "FLSA Pay Rate"  
  PeriodType: 1

The value of the pay rule ID is stored in BasePayRule - in this example 2IZfeFPQFTHVpzVtzq9q3dFNiqQ.

Set the pay rate for the user

To set an award or update an award from the Deputy library rates you will need to call the /setAwardFromLibrary endpoint.

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

An example body

{  
     "strCountryCode": "us",  
      "strAwardCode": "2QUXgEwMKsHBPyCthMxG2orWtjE",  
      "arrOverridePayRules": [  
        {  
          "Id": "2IZfeFPQFTHVpzVtzq9q3dFNiqQ",  
          "HourlyRate": 50  
        }  
      ]  
}

Note: Replace the strAwardCode and the ID with the values you got in steps 1 and 2. Additionally, set the hourly HourlyRate variable to the intended hourly rate.

Setting the pay rate for multiple employees.

Once the pay rate has been set like above, the response will include a newly created agreement ID.

Use may use the ID in the response, alongside the management/v2/employees:bulk endpoint, to assign this contract to multiple additional users.