Getting employees

Retrieving employees from Deputy

Retrieving employee data from Deputy is likely going to be one of your key use cases for the Deputy API. Much of the functionality available within Deputy is linked to employees. Items such as rosters, timesheets and agreements are all related to employees and finding employee information is key to putting it all together.

You can retrieve employees in a bulk manner, as well as by individual id.

Retrieving employee data in bulk

URL

curl --request POST --url 'https://{install}.{geo}.deputy.com/api/v1/resource/Employee/QUERY'

This will return a payload containing multiple employee objects. Up to 500 can be returned in a single request.

The structure in the response is the same as the one seen below in the Retrieving employee data by Id section, only it will contain multiple records.

Retrieving individual employees by record id

The smoothest way to find employees details based on their id is using the Resource API. As part of the request, we include a parameter that contains the employee id instead of the word QUERY

URL

curl --request GET --url 'https://{install}.{geo}.deputy.com/api/v1/Resource/Employee/{id}
{
    "Id": 1,
    "Company": 1,
    "FirstName": "John",
    "LastName": "Doe",
    "DisplayName": "John Doe",
    "OtherName": null,
    "Salutation": null,
    "MainAddress": 195,
    "PostalAddress": 195,
    "Contact": 101184,
    "EmergencyAddress": null,
    "DateOfBirth": null,
    "Gender": 0,
    "Pronouns": 0,
    "CustomPronouns": "",
    "Photo": 931,
    "UserId": 1,
    "JobAppId": null,
    "Active": true,
    "StartDate": "2022-05-05T00:00:00+10:00",
    "TerminationDate": null,
    "StressProfile": 1,
    "Position": null,
    "HigherDuty": null,
    "Role": 1,
    "AllowAppraisal": true,
    "HistoryId": 105907,
    "CustomFieldData": null,
    "Creator": 1,
    "Created": "2022-05-05T16:42:21+10:00",
    "Modified": "2022-07-29T11:55:56+10:00"
}

Data elements

Data ElementInfo
IdThe id of this record
CompanyThe integer of the primary location for the employee. This can be used with the Get location by id endpoint.
FirstNameThe first name of the employee
LastNameThe last name of the employee
DisplayNameHow the employees name is displayed in the Deputy UI
OtherNameAny other name (eg middle name) entered against the employee
SalutationAny salutation entered against the employee
MainAddressInteger of the Address object associated with the employee. Can be used with the Address object in the Resource API
PostalAddressInteger of the Postal address object associated with the employee. Can be used with the Address object in the Resource API
ContactInteger of the Contact details related to the Contact Object in the Resource API
EmergencyAddressInteger of the emergency address object associated with the employee. Can be used with the Address object in the Resource API
DateOfBirthThe date of birth entered for the employee
GenderEnums

0 - Prefer not to say
1 - Male
2 - Female
3 - Non-Binary
PronounsEnums
CustomPronounsIf the custom type is set for Pronouns, what the user has entered will appear as a string here
PhotoDeputy internal use only
UserIdThe Userid for the employee
JobAppIdDeputy internal use only
ActiveBoolean. Whether the employee is considered active or not in the Deputy install
StartDateThe start date of the employee
TerminationDateIf the employee is terminated the date that is set for it
StressProfileEnums
PositionJob title entered against the employees profile
HigherDutyDeputy internal use only
RoleDeputy internal use only
AllowAppraisalOnly in Deputy Enterprise. Whether an employee can be appraised and rated.
HistoryIdThe id of the history object associated with the employee. Can be used with the EmployeeHistory object in the Resource API
CustomFieldDataIf there is any custom field data stored against the employee it will appear here
CreatorThe id of the employee that created the record
CreatedWhen the record was created
ModifiedWhen the record was last modified