Modifying location settings

Although the API for adding an updating a location inside Deputy is relatively simple to use, it does not cover off all the nitty gritty settings that locations can have set against them. For that purpose we have the location settings API.

There are two ways the location settings API can be used:

  • An endpoint which when used will adjust the settings of every location
  • An endpoint which when used specifically targets a location to update individual settings.

Both of these options are explored below

Updating the settings of all locations at the same time

If your clients organisation requires the same settings across all locations in their Deputy install, we have an easy endpoint to use to bulk update all locations at once.

URL

curl --location --request POST 'https://{install}.{geo}.deputy.com/api/v1/supervise/company/settings

Because we have not defined a company id in the url call, this would affect all locations. Further down in the guide we explore specifically targeting one location.

Sample Payload

{
    "ACTIVE_HOURS_END": "00:00",
    "ACTIVE_HOURS_START": "09:00",
    "AUTO_SUGGEST_BREAK": true,
    "CAN_BUMP_SHIFT_VIA_DESK": true,
    "CAN_CLOCKIN_SHIFT_EARLIER": true,
    "CAN_CLOCKIN_SHIFT_EARLIER_MINS": 5,
    "CAN_DISPLAY_BREAK_WARNING": false,
    "CAN_END_BREAK_EARLIER": true,
    "CAN_MOBILE_BUMP_SHIFT": true,
    "CAN_MODIFY_TIMESHEET_ON_END": true,
    "CAN_SMS_BUMP_SHIFT": false,
    "CAN_SUBMIT_SHIFT_VIA_DESK": true,
    "DEFAULT_MEALBREAK_DURATION": 0,
    "MEALBREAK_IS_PAID": false,
    "REQUIRE_KIOSK_PHOTO_BUMP_SHIFT": true,
    "ROSTER_ALLOW_OFFER_SHIFT": false,
    "ROSTER_ALLOW_PEER_VIEW": 1,
    "ROSTER_ALLOW_SMS_WITH_FULL_NAME": false,
    "ROSTER_ALLOW_SWAP_SHIFT": false,
    "ROSTER_DEFAULT_SHIFT_LEN": 6,
    "ROSTER_NOTIFICATION_MANAGER": 2,
    "ROSTER_PREVENT_CHANGE_HOURS": 72,
    "ROSTER_RECOMMENDATION_SORTING": "BEST",
    "ROSTER_REQUIRE_CONFIRM_HOURS": 336,
    "ROSTER_SWAP_REQUIRE_APPROVAL": false,
    "SHIFT_COST_ADDITIONAL": 30,
    "TIMESHEET_AUTO_ROUND": false,
    "TIMESHEET_AUTO_TIME_APPROVE": 0,
    "TIMESHEET_CLOSEST_BLOCK": 15,
    "TIMESHEET_MATCH_ROSTER": 0,
    "TIMESHEET_MATCH_ROSTER_TIME": 0,
    "TIMESHEET_MATURITY": 15,
    "TIMESHEET_ROUND_END_TIME": "c15",
    "TIMESHEET_ROUND_END_TIME_RS": false,
    "TIMESHEET_ROUND_MEALBREAK": "c15",
    "TIMESHEET_ROUND_MEALBREAK_RS": false,
    "TIMESHEET_ROUND_START_TIME": "c15",
    "TIMESHEET_ROUND_START_TIME_RS": false,
    "WEEK_START": 1
  }

You do not need to include all the items in the payload, it is possible to only send the settings you want to update


Data Element

Info

ACTIVE_HOURS_END

The hour of the day that the location closes

ACTIVE_HOURS_START

The hour of the day that the location opens

AUTO_SUGGEST_BREAK

When enabled, if the employee has not clocked in for a break during the shift, when approving the timesheet a suggested break will be included automatically for the timesheet approver to review

CAN_BUMP_SHIFT_VIA_DESK

Whether employees are allowed to clock in and out of shifts for this location via the web browser

CAN_CLOCK_IN_SHIFT_EARLIER

Whether employees are allowed to clock into their shifts earlier than the shift start time

CAN_CLOCK_SHIFT_EARLIER_MINS

This defines in minutes how long before the shift start an employee is allowed to clock into the location. This requires CAN_CLOCK_IN_SHIFT_EARLIER to be true.

CAN_DISPLAY_BREAK_WARNING

If this is set to true, timesheets will display warnings when employees did not take breaks, or the clocked break is less than the expected time.

CAN_END_BREAK_EARLIER

If this is set to true, employees are allowed to end their breaks before their rostered break time is scheduled to end

CAN_MOBILE_BUMP_SHIFT

When enabled employees can clock and and out of their shifts via the Deputy mobile app.

CAN_MODIFY_TIMESHEET_ON_END

When this is set to true, employees are able to adjust their timesheets before ending their shifts.

CAN_SMS_BUMP_SHIFT

When enabled employees are able to clock in and out of shifts via SMS text message.

CAN_SUBMIT_SHIFT_VIA_DESK

Enabling this will allow employees to amend or create timesheets in the past via the web application.

DEFAULT_MEALBREAK_DURATION

The length in minutes of the default breaks applied to shifts/rosters at this location.

MEALBREAK_IS_PAID

When set to true, employees will be paid when they are on meal breaks

REQUIRE_KIOSK_PHOTO_BUMP_SHIFT

When enabled, if employees are clocking in via a kiosk, a photo needs to be taken during that process.

ROSTER_ALLOW_OFFER_SHIFT

When enabled employees are allowed to offer their shifts to co-workers when they are unavailable to work.

ROSTER_ALLOW_PEER_VIEW

When enabled, employees are allowed to view the shifts of their co-workers

ROSTER_ALLOW_SMS_WITH_FULL_NAME

When SMS are sent to employees related to this location, the full name of the location and area related to the roster is included in the SMS. This may lead to additional SMS charges if the location name is lengthy.

ROSTER_ALLOW_SWAP_SHIFT

When enabled and employees have permission to view each others shifts, they can swap shifts amongst each other.

ROSTER_DEFAULT_SHIFT_LEN

The default shift length in hours for the location

ROSTER_NOTIFICATION_MANAGER

The id of the employee for that location who should receive manager notifications such as late to clock on etc.

ROSTER_PREVENT_CHANGE_HOURS

How long in hours before a shift starts that it is prevented from being modified. In our example this is 72 hours.

ROSTER_RECOMMENDATION_SORTING

This allows you to determine how the location should be handled when using auto schedule functionality. The options are:

ALPHA - Alphabetically
WAGE - By wage cost (low to high)
HOUR - By hours (low to high)
BEST - Spreads hours evenly amongst staff while minimising costs

ROSTER_REQUIRE_CONFIRM_HOURS

The amount of time in hours before a shift that the employee must confirm that shift, before it will automatically become an open shift for other employees to pick up.

ROSTER_SWAP_REQUIRE_APPROVAL

If enabled managers have to approve a roster swap before it is completed

SHIFT_COST_ADDITIONAL

A number as a percentage to add on top of the calculated wage costs as the actual labor cost for labor costings when considering shift costs.

TIMESHEET_AUTO_ROUND

When enabled timesheets will be rounded by what is set in other areas of the location such as TIMESHEET_ROUND_END_TIME

TIMESHEET_AUTO_TIME_APPROVE

Either set to 0 or 1. When set to 1, timesheets are automatically approved for that location once an employee clocks off.

TIMESHEET_CLOSEST_BLOCK

Timesheets that are submitted by mobile and are less than this set number in minutes will be automatically discarded.

TIMESHEET_MATCH_ROSTER

When enabled the system will try to match unscheduled timesheets with a scheduled shift. There is multiple options for this setting:

0 - Best Fit (default) - System runs a number of checks to try and match it
1 - If a timesheet area matches with a scheduled shift area
2 - If a timesheet location matches with a scheduled shift location
3 - If a timesheet is within a time variance of a scheduled shift

TIMESHEET_MATCH_ROSTER_TIME

Can only be used when TIMESHEET_MATCH_ROSTER is set to 3. Options are:

0 - No preference
1 - 60 - Match when roster is up to 60 minutes before timesheet time
2 - 120 - Match when roster is up to 120 minutes before timesheet time
3 - 240 - Match when roster is up to 240 minutes before timesheet time

TIMESHEET_MATURITY

A setting in minutes (default 15) as to when a timesheet becomes valid. Any timesheet which is less than this length will be automatically discarded.

TIMESHEET_ROUND_END_TIME

What rounding should occur when a timesheet finishes.

Options are:
0 - None
1 - cX - where X represents a time in minutes, for example c15 is 15 minutes. This is in 5 minute increments from 5 - 60.

TIMESHEET_ROUND_END_TIME_RS

When set to true, this will enforce that timesheets must always end at the time the rostered shift ends. If a timesheet ends earlier than the rostered time, the rounding set in TIMESHEET_ROUND_END_TIME will be used to round it.

TIMESHEET_ROUND_MEAL_BREAK

When a mealbreak ends what rounding should be applied. Options:

0 - None
1 - cX - where X represents a time in minutes for example c15 is 15 minutes. This is in 5 minute increments from 5- 60.

TIMESHEET_ROUND_MEAL_BREAK_RS

When set to true this will enforce that meal breaks must always end at the time the rostered meal break ends. If a meal break ends earlier than the rostered time, the rounding set in TIMESHEET_ROUND_MEAL_BREAK will be used to round it.

TIMESHEET_ROUND_START_TIME

What rounding should occur when a timesheet starts.

Options are:
0 - None
1 - cX where X represents a time in minutes, for example c15 is 15 minutes. This is in 5 minute increments from 5 - 60.

TIMESHEET_ROUND_START_TIME_RS

When set to true this will enforce that the timesheet must always start at the time the timesheet is rostered to start.

WEEK_START

Day of the week a week should start for the location. 1 - Monday, 2 - Tuesday, 3 - Wednesday, 4 - Thursday, 5- Friday, 6 - Saturday, 7 - Sunday.

Updating an individual locations settings.

The process is the same except for including a company record id in the URL when submitting the payload.

curl --location --request POST 'https://{install}.{geo}.deputy.com/api/v1/supervise/company/{id}/settings