Developer Home / APIs / REST APIs / Standard Endpoints / GET/ employees

GET/ employees

This API returns a collection of employees existing within Guardian. This method can only return up to xx employees. Optional page_size and page parameters can be passed in order to limit the results. Results include the employee’s Guardian ID which can be used in a subsequent GET request to obtain additional details related to the employee. For additional parameter information access the employees data model section to review field information.

Method

GET

Resource Information

Requires authentication? YES
Response formats JSON

Parameters

Parameter Required Description
page No specifies the page number from where you want to begin accessing records

Filtering

The fields in the table below can be used in the query string of a GET request, for example:

GET https://sandbox.perfectcompliance.com/v1/employees?firstName=John

Currently, it is only possible to query for exact values (no wildcards or partial matches); however, the query criteria is case-insensitive.

Parameter Type Description
custom1 string Optional Organization-defined custom field
custom2 string Optional Organization-defined custom field
custom3 string Optional Organization-defined custom field
custom4 string Optional Organization-defined custom field
custom5 string Optional Organization-defined custom field
custom6 string Optional Organization-defined custom field
custom7 string Optional Organization-defined custom field
custom8 string Optional Organization-defined custom field
dateOfBirth date string Employee's birthdate
emailAddress string Employee's email address
firstName string Employee's first name
jobTitle string Employee's title
languagePreference int Employee's preferred language (used to present onscreen help text). Send a 1 value to indicate 'English' and 2 to indicate 'Spanish'
lastName string Employee's last name
legalEntity int Employee's assigned legal entity's system ID
locationId int Employee's assigned worksite location's system ID
middleName string Employee's middle name
otherName string Employee's maiden name
profileId string Employee's company-issued identification
socialSecurityNumber string Employee's social security number

Example

Request Example

GET https://sandbox.perfectcompliance.com/v1/employees?page_size=5&page=1

Response Example

{
    "searchResult": [
        {
            "id": 269027,
            "i9Status": "Approved",
            "i9Expiration": "2015-11-30",
            "firstName": "Jennifer",
            "lastName": "Smith",
            "socialSecurityNumber": "346-06-0657",
            "profileId": "12345"
        },
        {
            "id": 242339,
            "i9Status": "",
            "i9Expiration": "",
            "firstName": "Roger",
            "lastName": "Wilco",
            "socialSecurityNumber": "222-22-2222",
            "profileId": "67898"
        },
        {
            "id": 269117,
            "i9Status": "Signed Sec 1",
            "i9Expiration": "null",
            "firstName": "Mark",
            "lastName": "Davis",
            "socialSecurityNumber": "333-33-3333",
            "profileId": "232434"
        },
        {
            "id": 270109,
            "i9Status": "Approved",
            "i9Expiration": "null",
            "firstName": "John",
            "lastName": "Smith",
            "socialSecurityNumber": "444-44-444",
            "profileId": "2345435"
        },
        {
            "id": 242204,
            "i9Status": "Approved",
            "i9Expiration": "2012-10-01",
            "firstName": "David",
            "lastName": "Dubois",
            "socialSecurityNumber": "555-55-5555",
            "profileId": "23432545"
        }
    ],
    "links": [
        {
            "href": "/v1/employees/",
            "rel": "self"
        },
        {
            "href": "/v1/employees/?page=1",
            "rel": "first"
        },
        {
            "href": "/v1/employees/?page=5",
            "rel": "last"
        },
        {
            "href": "/v1/employees/?page=2",
            "rel": "next"
        },
        {
            "href": "/v1/employees/?page=5",
            "rel": "previous"
        }
    ]
}

Single Record Request Example

GET https://sandbox.perfectcompliance.com/v1/employees/<employee_id>

Single Record 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"
        }
    ]
}