Employees

GET

All Employee Details

Retrieve detailed employee information.

 

{
  "employeeId":"string",
  "alternateId":"string",
  "names":[
    {
      "effectiveDate":"datetime",
      "formOfAddress":"string",
      "lastName":"string",
      "firstName":"string",
      "middleName":"string",
      "nameFormat":"string",
      "suffix":"string",
      "nameType":"primary#preferred",
      "personTitle":"string",
      "reasonChangeCode":"string",
      "uniqueId":"string"
    }
  ],
  "employmentInfo":{
    "jobCode":"string",
    "serviceDate":"datetime",
    "temporaryIndicator":"regular#temporary",
    "employeeType":"fulltime#parttime",
    "flsaCode":"C#Z#T#N",
    "employmentStatus":"A#D#L#P#S#T#U",
    "standardhours":"int",
    "businessTitle":"string",
    "supervisorId":"string",
    "supervisorName":"string",
    "workEmail":"string",
    "workPhone":"string",
    "groupA":"string",
    "groupB":"string",
    "workersCompCodes":{
      "state":"string",
      "workersCompCode":"string"
    },
    "payGroup":"string",
    "departmentId":"string",
    "locationId":"string",
    "effectiveDate":"datetime"
  }
  "employeePhoto": {
    "mimeType": "string",
    "photoId": "number",
    "uri": "string"
  }
}
{
  "employeeId":"string",
  "alternateId":"string",
  "employmentInfo":{
    "effectiveDate":"datetime",
    "regularTemporary":"Regular#Temporary",
    "serviceDate":"datetime",
    "terminationDate":null,
    "standardHours":"number",
    "jobCode":"string",
    "workersCompCode":{
      "code":"string",
      "state":"string"
    },
    "flsaCode":"C#Z#T#N",
    "employmentStatus":"A#D#L#P#S#T#U",
    "payGroup":"string",
    "employeeType":"string",
    "businessTitle":"string",
    "customGroupA":"string",
    "customGroupB":"string",
    "workPhone":"string",
    "workEmail":"string",
    "location":{
      "locationtId":"string",
      "locationtName":"string"
    },
    "department":{
      "deptName":"string",
      "deptId":"string"
    },
    "supervisor":{
      "supervisorName":"string",
      "supervisorId":"string"
    }
  },
  "customFields": [
    {
      "fieldLabel": "string",
      "fieldType": "string",
      "fieldValue": "string"
    }
  ],
  "roles":[
    {
      "role":"string"
    }
  ],
  "employeeContacts":[
    {
      "accessType":"string",
      "actualAccessType":"string",
      "effectiveDate":"datetime",
      "media":"string",
      "notes":"string",
      "telephoneNumber":"string",
      "uniqueId":"string",
      "url":"string"
    }
  ],
  "emergencyContacts":[
    {
      "primaryContactFlag":"boolean",
      "contactRelationship":"string",
      "sameAddressPerson":"boolean",
      "address":{
        "address1":"string",
        "address2":"string",
        "address3":"string",
        "address4":"string",
        "city":"string",
        "state":"string",
        "postalCode":"string",
        "county":"string",
        "country":"string"
      },
      "samePhonePerson":"boolean",
      "telephoneNumbers":{
        "telephoneNumber1":"string",
        "telephoneNumber2":"string",
        "telephoneNumber3":"string",
        "telephoneNumber4":"string"
      }
    }
  ],
  "nationalIds":{
    "country":"string",
    "idType":"SSN#SIN",
    "id":"string"
  },
  "names":[
    {
      "nameType":"PRI#PRF",
      "firstName":"string",
      "personTitle":"string",
      "lastName":"string",
      "nameFormat":"string",
      "formOfAddress":"string",
      "name":"string",
      "middleName":"string",
      "suffix":"string",
      "effectiveDate":"datetime",
      "uniqueId":"string",
      "reasonChangeCode":"string"
    }
  ],
  "workEligibility":{
    "citizenshipStatus":"string",
    "visa":{
      "visaExpirationDate":"datetime",
      "visaId":"string",
      "visaType":"string"
    },
    "USWorkEligibility":"string",
    "effectiveDate":"datetime"
  },
  "bioInfo":{
    "effectiveDate":"datetime",
    "gender":"M#F",
    "marriageStatus":"string",
    "birthDate":"datetime",
    "country":"string",
    "militaryStatus":"string",
    "ethnicity":"string"
  },
  "payInfo":{
    "compRate":"number",
    "compFrequency":"string",
    "lastIncreaseDate":"datetime",
    "lastIncreasedAmt":"number",
    "bonus":[
      {
        "mount":"number",
        "type":"string",
        "date":"datetime"
      }
    ],
    "additionalPay":[
      {
        "amount":"number",
        "description":"string"
      }
    ]
  },
  "departmentSplit":[
    {
      "departmentId":"string",
      "departmentName":"string",
      "splitPercentage":"number",
      "effectiveDate":"datetime"
    }
  ],
  "homeAddress":{
    "effectiveDate":"datetime",
    "address1":"string",
    "address2":"string",
    "address3":"string",
    "address4":"string",
    "city":"string",
    "county":"string",
    "state":"string",
    "postalCode":"string",
    "country":"string",
    "primaryInd":"boolean"
  }
  "employeePhoto": {
    "mimeType": "string",
    "photoId": "number",
    "uri": "string"
  }
}
Field Description

employeeId

TriNet Employee ID

alternateId

Alternate ID, if your company uses different employee IDs

names

 

effectiveDate

Date the name change became effective

formOfAddress

Title or form of address

lastName

Last name

firstName

First name

middleName

Middle name

nameFormat

Not currently used

suffix

Suffix

nameType

Whether the name is primary or preferred

personTitle

Not currently used

reasonChangeCode

Not currently used

uniqueId

TriNet only – please ignore

employmentInfo

 

jobCode

Job code or job category for EEOC reporting

serviceDate

Service date: typically the hire date, can be changed for benefits eligibility or time off accrual

temporaryIndicator

Whether the employee is regular or temporary

employeeType

Employee type such as full time or part time

FlsaCode

Fair Labor Standards Act (FLSA) code

Whether the employee is exempt or nonexempt

employmentStatus

Employment Status

standardhours

Standard hours per week

bussinessTitle

Job title

supervisorId

Unique ID for the supervisor

supervisorName

Supervisor’s name

workEmail

Work email address

workPhone

Work phone number

groupA

Group A-Used to store company-specific information

groupB

Group B- Used to store company-specific information

workersCompCodes

 

state

Employee’s state for workers’ compensation

workersCompCode

Workers’ compensation code

payGroup

Pay group

departmentId

Department ID

locationId

Location ID

effectiveDate

Date the employment info change became effective

bioInfo

 

effectiveDate

Date the information became effective

gender

Male or female

marriageStatus

Marital status

birthdate

Birthdate

country

Country

militaryStatus

Military status

ethnicity

Ethnicity for EEOC reporting

homeAddress

 

effectiveDate

Date the information became effective

address1

Address line 1

address2

Address line 2

address3

Address line 3

address4

Address line 4

city

City

county

County

state

State or province

postalCode

ZIP or postal code

country

Country

Values: CA (for Canada) or US (for United States)

primaryInd

Whether this is the primary address

payInfo

 

compRate

Compensation rate

compFrequency

Compensation frequency

Values: hourly, annual

lastIncreaseDate

Last increase date

lastIncreaseAmt

Last increase amount

bonus

 

bonusAmount

Bonus amount

bonusType

Bonus type

bonusDate

Bonus date

bonusPercentage

Whether this is a percentage bonus vs flat amount

additionalPay

 

additionalPay

Additional pay amount

additionalPayDescription

Additional pay description

workEligibility

 

citizenshipStatus

Citizenship status

Values: Naturalized, Permanent Resident…

USWorkEligibility

Whether or not the employee is eligible to work in the U.S. 

effectiveDate

Date the information became effective

Ssn-sid

 

country

Country

socialId

Social Security number (in US) or Social Insurance Number (in Canada)

employeeContacts

 

accessType

Access Type, such as Work

actualAccessType

 

effectiveDate

Date the information became effective

media

Type of media/contact, such as Email, Phone

notes

Not currently used

telephoneNumber

Phone number

uniqueId

TriNet only

url

Email address

emergencyContacts

 

firstName

First name of emergency contact

fullName

Full name of emergency contact

middleName

Middle name of emergency contact

lastName

Last name of emergency contact

primaryIndicator

Whether this is the primary emergency contact

designeeRelation

Relationship to the employee

sameAddressPerson

Whether the emergency contact has the same address as the employee

address1

Address line 1

address2

Address line 2

address3

Address line 3

address4

Address line 4

city

City

state

State or province

postalCode

ZIP or postal code

county

County

country

Country

samePhonePerson

Whether the emergency contact has the same phone number as the employee

telephoneNumber1

Phone number 1

telephoneNumber2

Phone number 2

telephoneNumber3

Phone number 3

telephoneNumber4

Phone number 4

Roles

 

role

TriNet permissions/roles assigned to employee

departmentSplit

 

departmentId

Department ID

departmentName

Department Name

splitPercentage

Percentage employee works in the department

effectivedate

Date the information became effective

customFields

 

fieldLabel

Custom field label as shown in TriNet platform

fieldType

Custom field type (date, currency, text etc.)

fieldValue

Custom field value

employeePhoto

 

mimeType

Mime type of the photo file

photoId

Unique Id of the photo of associated with this profile

uri

URI to retrieve actual photo file

 

Resource URL

https://api.trinet.com /{version}/company/{companyId}/employees

Query Parameters


Name Values Description
employeeId

Returns the requested employee information for a specified Employee ID.

alternateId

Returns the requested employee information for a specified Alternate ID.

employmentStatus

Filters results by Employment Status. See Values.

lastName

Filters results by employee's last name. Wild characters are allowed. Example: "?lastName=Smit*"

firstName

Filters results by employee's first name. Wild characters are allowed. Example: "?firstName=Joh*"

departmentId

Lists employees assigned to a specified Department ID.

locationId

Lists employees assigned to a specified Location ID.

supervisorId

Lists employees assigned to a specified supervisor. You must provide the supervisor’s Employee ID.

sortOrder

Sorts the data based on a predefined list of fields: employeeId, alternateId, lastName, firstName, departmentId, locationId. Allows sorting on multiple fields. To use descending order, add "desc" to the query. Example: "?sortOrder=lastName desc, firstName" will sort results by lastName in descending order, then firstName in ascending order.

viewType

Controls what data is returned for each employee. Options are Basic, All or Custom. If not specified, then it will return Basic information. To use Custom, specify the sections in fieldMask. Required scopes differ based on the view type; Basic view requires basic-read scope while All and Custom require hr-pay-read

fieldMask

Required when viewType=Custom. Specify which sections to include or exclude from the results. To exclude add "-" as the first character. Examples: "?viewType=Custom&fieldMask=names,roles" returns the emloyeeId, alternateId, names and roles sections. "?viewType=Custom&fieldMask=-names,roles" returns all employee data from the All view, except the names and roles sections.

offset

Specify the starting record. This limits the returned data to 100 employees. If there are more than 100 employees, you will need to make subsequent calls. Example: Set the offset to 101 to return employees 101-200. The "hasMore" flag in the response indicates that the end of the range has been reached.

limit

Specify the number of returned records to control the data size. By default it displays the maximum of 100 employees.

hasRoles

Lists employees has at least one role. You must provide the yes


Request Body

HTTP Basic

OAuth 2.0

API Key

Reset

Make a request and see the response.

Make a request and see the response.

Make a request and see the response.

Resource Summary

Security:

Content Type:

application/json

Scope:

hr-pay-read, basic-read

Working...