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 and Level Ids

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").

Sample Response:


{
  "AwardCode": "34l0i61qfOlMYYCAtRNDWUZFWn4",
  "CountryCode": "au",
  "employmentTerm": 2,
  "isPayPolicy": true,
  "isSalary": false,
  "levels": [
    {
      "title": "Retail employee level 1",
      "level_id": "hlR2ahxckHiH7U85qn7GE3OiP1j"
    },
    {
      "title": "Retail employee level 2",
      "level_id": "uIAp6lOsRtxm0bQzS9Kximv31en"
    },
    {
      "title": "Retail employee level 3",
      "level_id": "L9CF93qrUGSUCKsnwVwf08oCvGi"
    },
    {
      "title": "Retail employee level 4",
      "level_id": "qL5WgY9aqp6xTaPyBvmghhOBBnr"
    },
    {
      "title": "Retail employee level 5",
      "level_id": "JMEhNuwNIYny0t1xpjNIbajjwKQ"
    },
    {
      "title": "Retail employee level 6",
      "level_id": "fq309qLsMx5xVEKS8czCLMLCZEq"
    },
    {
      "title": "Retail employee level 7",
      "level_id": "l254OVsMqyxpzDfVX0osylUXez9"
    },
    {
      "title": "Retail employee level 8",
      "level_id": "9Uk6yWAKxuKkIo0fTW6KLD6AWco"
    }
  ]
}
🚧

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", 
			"strLevelId": "2p0AAkN0EbRBwYGJmKzpF4N1SvN" 
      "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.
You can also use the LevelId from the first step to set the level. The HourlyRate override will override the default from the level. This is recommended particularly for junior employees who are paid less than adult rate, as this will not be automatically set.

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.


Using the SetAwardFromTemplate

This method is recommended if:

  • Your pay rate is already created in the tenant;
  • You created this pay rate outside of the library using the Pay Rate Builder.

curl --location --request GET '<https://{install}.{geo}.deputy.com/api/management/v2/compliance/contract>'

The above will give a list of pay rates in your account that use this method.


curl --location --request GET '<https://{install}.{geo}.deputy.com/api/management/v2/compliance/contract/{contractId}>'

Specifying the contractId will give all details, including levelId and BasePayRule.

Truncated Example Response:

{
  "success": true,
  "data": {
    "id": 700,
    "name": "[MA000009] - HIGA - Full Time - 1-July-2025",
    "description": "[MA000009] - HIGA - Full Time - 1-July-2025",
    "payPolicyName": "[MA000009] - HIGA - Full Time - 1-July-2025",
    "employmentCategory": "EMPLOYMENT_CATEGORY_PERMANENT",
    "employmentType": "EMPLOYMENT_TYPE_FULL_TIME",
    "payType": "CONTRACT_PAY_TYPE_HOURLY",
    "standardHours": "0",

    "basePayRule": {
      "id": 6367,
      "title": "HIGA - FT - 1-July-2025 - M-F Ordinary",
      "comment": "HIGA - FT - 1-July-2025 - M-F Ordinary",
      "payrollCategory": "HIGA - FT - 1-July-2025 - M-F Ordinary",
      "payrollTaxCode": "OTE",

      "calculationRuleId": "2lKHRiG13AeHWTndDEMwAkoEyIX",
      "calculationTypeId": "2QUX94TMEN3fRELiypnfM1eRsbw",

      "rateType": "RATE_TYPE_ORDINARY",
      "rateTag": "",
      "value": 0,

      "remunerationType": "REMUNERATION_TYPE_HOURLY",
      "remunerationBy": "REMUNERATION_BY_BASE",

      "payPortionRule": "PAY_PORTION_RULE_EXACT",
      "toilMultiplier": 0,

      "isExported": true,
      "leaveRuleId": 0,

      "levelAssnType": 1,
      "levelIds": [],
      "operationalUnitIds": [],

      "localContext": {
        "minPaidThreshold": "0",
        "maxPaidThreshold": "0"
      },

      "payConfig": {
        "roundUpHours": false,
        "classificationReference": ""
      },

      "filter": {
        "customFieldAnswers": [],
        "recurrenceRule": "",
        "shiftSchedulingType": "UNSPECIFIED",
        "shiftStartTimeRange": "",
        "shiftEndTimeRange": ""
      },

      "stpClass": "",
      "stpCode": ""
    },

    "configs": [
      "... 4 config objects ..."
    ],

    "payRules": [
      "... 43 pay rule objects ..."
    ],

    "juniorRates": [
      "... 7 junior rate objects ..."
    ],

    "leaveRules": [],

    "levels": [
      {
        "id": 769,
        "name": "Introductory",
        "levelKsuid": "Z6OAuKG7VOJw2FQR07C67KOkIo1",
        "baseRate": "24.28"
      },
      {
        "id": 741,
        "name": "Level 4 food and beverage attendant (tradesperson) grade 4",
        "levelKsuid": "0ToEnprrNvrEGxA4sejjAbeDto3",
        "baseRate": "28.12"
      },
      {
        "id": 742,
        "name": "Level 1 kitchen attendant grade 1",
        "levelKsuid": "20nGwTQiS3rH8G8hzq9WPNcrUF5",
        "baseRate": "24.95"
      },
      {
        "id": 743,
        "name": "Level 2 door person/security officer grade 1",
        "levelKsuid": "2JCTCRJiTbdWcslROHs95YmEaHi",
        "baseRate": "25.85"
      },
      {
        "id": 750,
        "name": "Level 5 front office supervisor",
        "levelKsuid": "7VfPKHfbfvX3OumBVJFXpRSMn1E",
        "baseRate": "29.88"
      },
      {
        "id": 757,
        "name": "Level 6 gaming finance employee grade 5",
        "levelKsuid": "IWJJLZ3oi9FYor4Xl06Y8vcJH7L",
        "baseRate": "31.66"
      },
      {
        "id": 787,
        "name": "Managerial staff - hotel",
        "levelKsuid": "nlYfJ8D2yjP5tK7aCXi5b2x1kuk",
        "baseRate": "30.73"
      },
      {
        "id": 800,
        "name": "Level 6 cook (tradesperson) grade 5",
        "levelKsuid": "z6NWXFpBTyQiIlJUWXKp7xnjbEu",
        "baseRate": "30.68"
      }

      // ... remaining 50+ levels omitted for brevity ...
    ]
  }
}

You can use this with


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

{
    "intContractId": 368,
    "intLevelId": 19,    
    "arrOverridePayRules": [
        {
            "Id": 1764,
            "HourlyRate": 50
        }
    ],
    "arrAgreementId": [
        363,
        392
    ]