Setting Shared Settings

The Employment Contract Config endpoint is used to configure many components of a pay rate, including:

  • General Settings
  • Employment Type and Active
  • Junior Rates
  • Pay Rule Shared Settings

This page will go through Shared Settings.

For more information on what shared pay rule settings do, click here: https://help.deputy.com/hc/en-au/articles/10051979047823-How-to-edit-or-create-a-pay-rate-general-settings#h_01J1VJNR9VJE8NY0CRH1EQ99FP

These are required for the correct operation of some pay rules, particularly overtimes.

URL and Payload

URL

curl --location --request POST 'https://{install}.{geo}.deputy.com/api/management/v2/compliance/contract-config:batch-save'

Sample

{
  "configs": [
    {
      "id": "<long>",
      "contractId": "<long>",
      "category": "CONTRACT_CONFIG_CATEGORY_UNKNOWN",
      "config": "<string>",
      "status": "CONTRACT_CONFIG_STATUS_INACTIVE"
    },
    {
      "id": "<long>",
      "contractId": "<long>",
      "category": "CONTRACT_CONFIG_CATEGORY_UNKNOWN",
      "config": "<string>",
      "status": "CONTRACT_CONFIG_STATUS_INACTIVE"
    }
  ]
}

Example -

{
  "configs": \[  
            {  
                "id": 318,  
                "contractId": 403,  
                "category": "CONTRACT_CONFIG_CATEGORY_SHARED_CONTEXT",  
                "config": "{\"useRollingPeriod\": false, \"periodOvertimeThreshold\": \"0\", \"rollingPeriodLengthSeconds\": \"0\", \"resetConsecutiveDaysEveryWorkWeek\": true}",  
                "status": "CONTRACT_CONFIG_STATUS_ACTIVE"
            }]}

Response

{
  "success": "<boolean>",
  "error": "<string>"
}

Data Elements - Pay Policy Context

Data ElementMandatoryInfo
contract_IdYesPay Rate id assigned to
categoryYes

This selects the type of contract config being set. Options are:

CONTRACT_CONFIG_CATEGORY_GLOBAL_SETTINGS = 2;
CONTRACT_CONFIG_CATEGORY_JUNIOR_RATE = 3;
CONTRACT_CONFIG_CATEGORY_CONTRACT_DETAILS = 4;
CONTRACT_CONFIG_CATEGORY_PAY_POLICY_CONTEXT = 5;
CONTRACT_CONFIG_CATEGORY_SHARED_CONTEXT = 6;

configYesSee below - variable based on what config is being set.
statusYes"CONTRACT_CONFIG_STATUS_ACTIVE" for active

Config - Shared Settings Context

This is attached as a blob. Not all values are required depending on the pay rules used. See https://help.deputy.com/hc/en-au/articles/10051979047823-How-to-edit-or-create-a-pay-rate-general-settings#h_01J1VJNR9VJE8NY0CRH1EQ99FP for which pay rules use which config.


What’s Next

Did this page help you?