Please Wait...

This API is used to create a new employee within Guardian, and is often used to add new hires to the system. Though not required globally, parameters used in the organization’s hierarchical structure must be included in the request and include pre-existing values.

If the employee is to complete Section 1 at home, use the sendLoginEmail and createLogin parameters to issue a system generated email containing Guardian credentials.

For remote employees who require an authorized representative to act on behalf of the company to complete Section 2, the parameter createRemoteHireI9 should be sent. This will create an I-9 record and place the employee in the remote processing workflow. The use of createLogin and sendLoginEmail parameters is not necessary in this case as an email will be sent automatically when the createRemoteHireI9 parameter is used.

While not required, the createI9 parameter can be sent to add an electronic I-9 (non-remote processing) to the employee’s record. This parameter is sent when the organization desires to track a pending I-9 rather than an employee without an I-9.

Re-hiring of employees (i.e. those employees who already exist in Guardian) is managed through the employees/PATCH endpoint.

Method

POST

Resource Information

Requires authentication? YES
Request formats JSON
Response formats JSON

Parameters

Parameter Label Description Type Max Length Required
id Guardian system generated unique key int N/A
firstName First Name Employee’s first name string 40 Yes
lastName Last Name Employee’s last name string 40 Yes
middleName Middle Name Employee’s middle name string 25 No
socialSecurityNumber Social Security # Employee’s social security number string 11 No
dateOfBirth Date of Birth Employee’s birthdate date string N/A No
startDate Date Hired Employee’s hire date date string N/A No
profileId Employee ID Employee’s company-issued identification string 30 No
otherName Maiden Name Employee’s maiden name string 40 No
jobTitle Title Employee’s title string 80 No
emailAddress E-Mail Employee’s email address string 80 No
locationId Job Location Employee’s assigned worksite location’s system ID int N/A Yes
legalEntity Current Business Unit Employee’s assigned legal entity’s system ID int N/A No
terminatedDate Date Terminated Employee’s termination date date string N/A No
languagePreference Preferred Language Employee’s preferred language (used to present onscreen help text). Send a 1 value to indicate ‘English’ and 2 to indicate ‘Spanish’ int N/A No
custom1 NA Optional Organization-defined custom field string 255 No
custom2 NA Optional Organization-defined custom field string 255 No
custom3 NA Optional Organization-defined custom field string 255 No
custom4 NA Optional Organization-defined custom field string 255 No
custom5 NA Optional Organization-defined custom field string 255 No
custom6 NA Optional Organization-defined custom field string 255 No
custom7 NA Optional Organization-defined custom field string 255 No
custom8 NA Optional Organization-defined custom field string 255 No
notificationEmail1 Address 1 Optional organization-defined email notification recipient string 255 No
notificationEmail2 Address 2 Optional organization-defined email notification recipient string 255 No
addressStreet Line 1 Physical street address string 80 No
addressStreet2 Line 2 Physical street address string 80 No
addressApartment Apt # Apartment number string 80 No
addressCity City City address string 50 No
addressState State State address string 20 No
addressCountry Country Country address string 50 No
addressZip Zip Zip code address string 10 No
workNumber Work Phone Work phone number string 20 No
workExtension Ext Work phone extension number string 10 No
homeNumber Home Phone Home phone number string 20 No
homeExtension Ext Home phone extension number string 10 No
cellNumber Cell Phone Cell phone number string 20 No
cellExtension Ext Cell phone extension number string 10 No
createLogin Create Login Indicates if a login should be created for the employee. Specify “true” to create a login for the employee. boolean No
sendLoginEmail Send Login Email Indicates if email about login info should be sent to employee. Specify “true” to trigger a welcome email to the employee. boolean No
createI9 Create I-9 This action creates an electronic I-9 (non-remote processing) within the employee record and assumes a Guardian user will complete Section 2. Send a ‘yes’ value to insert a new I-9 record. Send a ‘if allowed’ to allow the system to determine if an I-9 can be created for the employee. 7 string No
createRemotehireI9 Create Remote Hire I-9 This action creates an electronic I-9 within the employee record and activates the remote processing workflow in which the employee will complete the I-9 with an authorized representative acting on behalf of the company. It is not necessary to use the sendLoginEmail or createLogin parameters for this workflow. Send a ‘yes’ value to insert a new I-9 record. Send a ‘if allowed’ to allow the system to determine if an I-9 can be created for the employee. 7 string No

Example

Request Example

POST https://sandbox.perfectcompliance.com/v1/employees

{
    "startDate": "2013-06-09",
    "addressState": "GA",
    "terminatedDate": null,
    "workNumber": null,
    "cellExtension": "",
    "dateOfBirth": "04/02/1990",
    "locationId": 1,
    "otherName": "",
    "languagePreference": 1,
    "addressCountry": "",
    "homeNumber": null,
    "legalEntity": 412,
    "addressStreet": "400 17th Street",
    "jobTitle": "",
    "notificationEmail2": null,
    "notificationEmail1": null,
    "socialSecurityNumber": "111-222-333",
    "emailAddress": "",
    "cellNumber": null,
    "addressCity": "Atlanta",
    "firstName": "Jennifer",
    "lastName": "Smith",
    "workExtension": "",
    "homeExtension": "",
    "middleName": "P",
    "addressStreet2": "",
    "profileId": "test",
    "addressApartment": "#1238",
    "addressZip": "30309"
}

Response Example

{
    "id": 2690279,
    "startDate": "2013-06-09",
    "addressState": "GA",
    "terminatedDate": null,
    "workNumber": null,
    "cellExtension": "",
    "dateOfBirth": "04/02/1990",
    "locationId": 1,
    "otherName": "",
    "languagePreference": 1,
    "addressCountry": "",
    "homeNumber": null,
    "legalEntity": 412,
    "addressStreet": "400 17th Street",
    "jobTitle": "",
    "notificationEmail2": null,
    "notificationEmail1": null,
    "socialSecurityNumber": "111-222-333",
    "emailAddress": "",
    "cellNumber": null,
    "fullName": "Smith, Jennifer P",
    "addressCity": "Atlanta",
    "firstName": "Jenny",
    "lastName": "Smith-Jones",
    "workExtension": "",
    "homeExtension": "",
    "middleName": "P",
    "addressStreet2": "",
    "profileId": "test",
    "addressApartment": "#1238",
    "addressZip": "30309",
    "custom8": null,
    "custom4": null,
    "custom5": null,
    "custom6": null,
    "custom7": null,
    "custom1": null,
    "custom2": null,
    "custom3": null,
    "links": [
        {
            "href": "/v1/employees/269027/",
            "rel": "self"
        },
        {
            "href": "/v1/employees/269027/i9s",
            "rel": "i9s"
        }
    ]
}