Employee API V1

📘

Employee API V2

This API is still present for existing developers however we recommend using our new Employee API V2 where possible. Click here for details.

Adding an employee in Deputy is a quite common use case for the API. You can easily sync new employees from own system into Deputy, ready to have shifts and timesheets associated with them. For the addition of new employees to Deputy, we recommend that you use the management endpoints, known as supervise. The process is detailed below

URL and Payload

URL

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

Sample

{
    "strFirstName": "John",
    "strLastName": "Doe",
    "intCompanyId": 1,
    "intGender": 2,
    "intStressProfile": 1,
    "intRoleId": 50,
    "strDob": "1971-01-01",
    "strCountryCode": "AR",
    "strDob": "1971-01-01",
    "strStartDate": "2022-01-01",
    "strMobilePhone": "0441234567",
    "strStreeet": "1 Smith Street",
    "strPayrollId": "1234",
    "fltWeekDayRate": 30,
    "strEmail": "[email protected]",
    "blnSendInvite": 1
}

Response

{
    "Id": 112,
    "Company": 1,
    "FirstName": "John",
    "LastName": "Doe",
    "DisplayName": "Jane Doe",
    "OtherName": null,
    "Salutation": null,
    "MainAddress": null,
    "PostalAddress": null,
    "Contact": 101371,
    "EmergencyAddress": null,
    "DateOfBirth": "1971-01-01T00:00:00+10:00",
    "Gender": 2,
    "Pronouns": 0,
    "CustomPronouns": null,
    "Photo": null,
    "UserId": 112,
    "JobAppId": null,
    "Active": true,
    "StartDate": "2022-01-01T00:00:00+11:00",
    "TerminationDate": null,
    "StressProfile": 1,
    "Position": null,
    "HigherDuty": null,
    "Role": 50,
    "AllowAppraisal": true,
    "HistoryId": 105823,
    "CustomFieldData": null,
    "Creator": 1,
    "Created": "2022-07-18T14:31:36+10:00",
    "Modified": "2022-07-18T14:31:37+10:00",
    "_DPMetaData": {
        "System": "Employee",
        "CreatorInfo": {}
    },
    "IsSubordinate": true,
    "WorkplaceArray": [
        {
            "Id": 118,
            "EmployeeId": 112,
            "Company": 1,
            "SortOrder": 0,
            "Agreement1": 117,
            "Agreement2": null,
            "Agreement3": null,
            "Creator": 1,
            "Created": "2022-07-18T14:31:36+10:00",
            "Modified": "2022-07-18T14:31:36+10:00",
            "_DPMetaData": {
                "System": "EmployeeWorkplace",
                "CreatorInfo": {}
            }
        }
    ],
    "TrainingArray": "",
    "TrainingFileArray": [],
    "LeaveAccrualArray": [],
    "PayrollId": "1234",
    "Contract": "",
    "SalaryDistributionConfig": null,
    "Email": null,
    "Mobile": "0441234567",
    "PhotoLinkId": "",
    "Img": "https://d11hmzhsuwuq9f.cloudfront.net/my/avatar?name=J+D&width=30&height=30",
    "Status": 3,
    "CanAskToShowPin": true,
    "HasIPhoneToken": false,
    "HasAndroidToken": false,
    "HasEnabled2FA": false,
    "AnalyticsID": "d41d8cd98f00b204e9800998ecf8427e",
    "UserName": "jdoe",
    "AllowLogin": true,
    "OnboardingStatus": 1001,
    "isNew": true
}

Data Elements

Data Element

Mandatory

Info

strFirstName

Yes

First name of the employee

strLastName

Yes

Last name of the employee

intCompanyId

Yes

The primary location to set for the employee. This is the integer of the location. You can use the Get Locations endpoint to discover these.

intGenderId

No - Will default to 1

The gender of the employee.

0 - Prefer not to say
1 - Male
2 - Female
3 - Non-Binary

intStressProfile

No

The integer of the stress profile to apply to the employee. Stress profiles can be found in the Stress Profile object in the Resource API

intRoleId

No

The integer of the employee role to apply to the employee. Roles can be found in the Employee Role object in the Resource API

strDob

No

A string of the employee date of birth in the format YYYY-MM-DD

strStartdate

No

A string of the employee start date in the format YYYY-MM-DD

strMobilePhone

No

A string of the employees mobile phone number

strPayrollId

No

A string of the employees payroll id

fltAnnualSalary

No

If the employee is on a salary based wage you can include it here

fltWeekdayRate

No

If employee has a weekday base rate you can include it here

fltSaturdayRate

No

If the employee has a Saturday base rate you can enter it here

fltSundayRate

No

If the employee has a Sunday base rate you can enter it here

fltPublicHolidayRate

No

If the employee has a public holiday rate you can enter it here

strStreet

No

String of the employees postal address. Maximum 64 characters.

strState

No

Code for the state related to the address. Can be retrieved from the State resource of the Resource API

strCountryCode

No

Code for the country related to the address. Can be retrieved from the Country Code resource of the Resource API

strCity

No

String of the city/suburb for the address

strPostCode

No

String of the postcode/zip code for the address

strEmergencyAddressContactName

No

String of the name to add as an emergency contact

strEmergencyAddressPhone

No

String of the emergency contact phone number

strEmail

No

The email address for the employee

blnSendInvite

No

Defaults to 1.

Enum

0 - No
1 - Yes

This is important because if this is set to 1 or null, the employee will be sent an invite to join the Deputy system. If the employee does join and setup an account, you will no longer be able to set items such as the Kiosk PIN or retrieve those.