Setting an Areas preferred employees

In Deputy, you are able to set preferred employees for each area in a location. This allows you to tell the Deputy system that it should prioritise filling open shifts for those areas with particular employees. If these employees are unavailable or scheduled elsewhere, Deputy will still fill the shifts with other available employees.

You can set the preferred employees for an Area via the following API request.

curl --POST 'https://{install}.{geo}.deputy.com/api/v1/resource/OperationalUnit/{id}

The {id} is the unique id of the Area in the Deputy install. In the API an Area is referred to as an Operational Unit.

{
  "RosterEmployeeOperationalUnit": [1,2,3]
}

In the example we are setting the employees with the id's of 1, 2 and 3 as the preferred employees for the Area. Even if you are only setting one employee you will need to send the id within an array structure.

How do I remove employees as preferred employees in an Area

The easiest way to remove employees as preferred employees for an Area via the API is to send the above request, however omit the id's you no longer want to be included as a preferred employee. For example if you no longer want the employee with the id of 3 to be included as a preferred employee for an Area, based on the above payload you would send the following

{
  "RosterEmployeeOperationalUnit": [1,2]
}