# TriNet

> Read employees, company configuration, departments, locations, benefit plans and payroll schedules.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/trinet

## Actions

### Get company

Get company.

**Inputs**

- View type (`view_type`, text): when set to "all" allows provides additional details. One of: `Basic`, `All`, `Custom`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": {
      "companyId": "example",
      "companyName": "example",
      "legalName": "example",
      "liveDate": "example",
      "parentClientId": "example"
    }
  }
}
```

### Get department

Get department.

**Inputs**

- Department ID (`department_id`, text, required): Find results based on department Id
- Effective date (`effective_date`, date): Provides information as of date. Allows retrieving historical information. YYYY-MM-DD format.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": []
  }
}
```

### Get location

Get location.

**Inputs**

- Location ID (`location_id`, text, required): Filters locations based on location id
- Effective date (`effective_date`, date): Provides information as of date. Allows retrieving historical information. YYYY-MM-DD format.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": []
  }
}
```

### Get paygroup

Get paygroup.

**Inputs**

- Paygroup ID (`paygroup_id`, text, required): Filter results by Pay Group ID
- Effective date (`effective_date`, date): Provides information as of date. Allows retrieving historical information. YYYY-MM-DD format.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": {
      "effectiveDate": "example",
      "payFrequency": "example",
      "payGroupDescription": "example",
      "payGroupId": "example",
      "payGroupShortName": "example"
    }
  }
}
```

### List benefit classes

List benefit classes.

**Inputs**

- Efft date (`efft_date`, date): Provides information as of date. Allows retrieving historical information. YYYY-MM-DD format.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": []
  }
}
```

### List benefits

List benefits.

**Inputs**: None.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": []
  }
}
```

### List company custom fields

List company custom fields.

**Inputs**: None.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_error": {
      "detailMessage": {},
      "errorCode": "example",
      "field": "example",
      "message": "example",
      "moreInfo": "example"
    },
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": []
  }
}
```

### List departments

List departments.

**Inputs**

- Dept name (`dept_name`, text): Filters results based on department name
- Dept code (`dept_code`, text): Filters results based on department code
- Effective date (`effective_date`, date): Provides information as of date. Allows retrieving historical information. YYYY-MM-DD format.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": []
  }
}
```

### List employee changes

List employee changes.

**Inputs**

- Events (`events`, text): Comma delimited list of events to filter the returned data for.
- From date (`from_date`, date): Date that the changes should be reported from. Required format, YYYY-MM-DDTHH:MM:SS.999Z
- To date (`to_date`, date): Date that the changes should be reported to. If empty current will report to current time. Required format, YYYY-MM-DDTHH:MM:SS.999Z

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": []
  }
}
```

### List employees

List employees.

**Inputs**

- Employee ID (`employee_id`, text): Returns the requested employee information for a specified Employee ID.
- Alternate ID (`alternate_id`, text): Returns the requested employee information for a specified Alternate ID.
- Employment status (`employment_status`, text): Filters results by Employment Status.
- Last name (`last_name`, text): Filters results by employee's last name. Wild characters are allowed. Example. "?lastName=Smit*"
- First name (`first_name`, text): Filters results by employee's first name. Wild characters are allowed. Example. "?firstName=Joh*"
- Department ID (`department_id`, text): Lists employees assigned to a specified Department ID.
- Location ID (`location_id`, text): Lists employees assigned to a specified Location ID.
- Supervisor ID (`supervisor_id`, text): Lists employees assigned to a specified supervisor. You must provide the supervisor’s Employee ID.
- View type (`view_type`, text): 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. One of: `Basic`, `All`, `Custom`.
- Limit (`limit`, number): Specify the number of returned records to control the data size. By default it displays the maximum of 100 employees.
- Offset (`offset`, number): 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.
- Field mask (`field_mask`, text): 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.
- Sort order (`sort_order`, text): 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.
- Has roles (`has_roles`, text): Lists employees has at least one role. You must provide the yes

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": {
      "employeeData": [],
      "employeesTotal": 1,
      "hasMore": false
    }
  }
}
```

### List holidays

List holidays.

**Inputs**

- Date limit (`date_limit`, text): Provides information as of date. Allows retrieving historical information. YYYY-MM-DD format.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": {
      "companyHolidayDetails": []
    }
  }
}
```

### List jobs

List jobs.

**Inputs**

- Job ID (`job_id`, text): Filter results to given Job ID

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": []
  }
}
```

### List leave plans

List leave plans.

**Inputs**

- Effective date (`effective_date`, date): Provides information as of date. Allows retrieving historical information. YYYY-MM-DD format.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": []
  }
}
```

### List locations

List locations.

**Inputs**

- Location name (`location_name`, text): Filters locations based on location name
- State code (`state_code`, text): Filters locations by state code
- Headquarter (`headquarter`, true/false): Lists only headquarter
- Effective date (`effective_date`, date): Provides information as of date. Allows retrieving historical information. YYYY-MM-DD format.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": []
  }
}
```

### List pay codes

List pay codes.

**Inputs**

- Type (`type`, text): Filter results based on pay type

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": []
  }
}
```

### List paygroups

List paygroups.

**Inputs**

- Effective date (`effective_date`, date): Provides information as of date. Allows retrieving historical information. YYYY-MM-DD format.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": []
  }
}
```

### List payroll schedules

List payroll schedules.

**Inputs**

- Start date (`start_date`, date): startDate can be used to limit the data returned by API. If not provided all data is returned. If provided endDate has to be provided as well. Format, YYYY-MM-DD can be used to limit the data returned by API. Start date is applied to payrollPreparationDate and is in YYYY-MM-DD format
- End date (`end_date`, date): endDate can be used to limit the data returned by API. If not provided all data is returned. If provided startDate has to be provided as well. Format, YYYY-MM-DD can be used to limit the data returned by API. Start date is required if endDate provided. Applied to payrollPreparationDate and is in YYYY-MM-DD format

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": []
  }
}
```

### List savings plans

List savings plans.

**Inputs**: None.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": []
  }
}
```

### List supervisors

List supervisors.

**Inputs**: None.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": []
  }
}
```

### List workers comp codes

List workers comp codes.

**Inputs**

- State (`state`, text): Filter results based on State
- Work comp code (`work_comp_code`, text): Filter results based on Workers Comp Code

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "_requestId": "example",
    "_statusCode": "example",
    "_statusMessage": "example",
    "_statusText": "example",
    "data": []
  }
}
```
