# Kenjo

> Manage employees, attendance, time off and candidates in Kenjo.

App · 31 actions. Web page: https://docs.lodol.com/docs/integrations/kenjo

## Actions

### Activate employee

Activate an employee, which emails them an invitation to set up their Kenjo account.

**Inputs**

- Employee (`employee_id`, text, required): The employee.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "message": "example"
  }
}
```

### Clock in or out

Clock an employee in or out at a time of day. The first time starts an entry and the next one ends it, in order.

**Inputs**

- Employee (`employee_id`, text, required): The employee.
- Date (`date`, date, required): The day.
- Time (`time`, time, required): The time of day.
- Ends an overnight shift (`is_overnight_shift`, true/false): Turn on when this clocks out of a shift that began the day before.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "dateTime": "example",
    "email": "example",
    "externalId": "example",
    "userId": "example"
  }
}
```

### Create attendance entry

Record when an employee worked on a day. Entries on the same day can't overlap.

**Inputs**

- Employee (`employee_id`, text, required): The employee.
- Date (`date`, date, required): The day worked.
- Start time (`start_time`, time, required): When the work started, as a time of day.
- End time (`end_time`, time): When the work ended, as a time of day. Leave empty while it's still going on.
- Ends the next day (`is_overnight_shift`, true/false): Turn on when the end time is on the next day.
- Comment (`comment`, text): A note about this entry, up to 150 characters.
- Category (`attendance_category_id`, text): The attendance category.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "_id": "example",
    "attendanceCategoryId": "example",
    "attendanceSubCategoryId": "example",
    "breakTime": 1,
    "breaks": [
      {
        "end": "example",
        "start": "example"
      }
    ],
    "comment": "example",
    "email": "example",
    "endTime": "example",
    "externalId": "example",
    "startTime": "example",
    "userId": "example"
  }
}
```

### Create candidate

Add a candidate to Kenjo's recruiting.

**Inputs**

- First name (`first_name`, text, required): The candidate's first name.
- Last name (`last_name`, text, required): The candidate's last name.
- Email (`email`, text, required): The candidate's email.
- Phone (`phone`, text): The candidate's phone number.
- Source (`source_field`, text): Where the candidate came from, such as a job board.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "_createdAt": "example",
    "_id": "example",
    "_updatedAt": "example",
    "email": "example",
    "firstName": "example",
    "lastName": "example",
    "origin": "example",
    "phone": "example",
    "sourceField": "example"
  }
}
```

### Create department

Add a department to Kenjo.

**Inputs**

- Name (`name`, text, required): The department's name.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "_id": "example",
    "name": "example"
  }
}
```

### Create employee

Add an employee to Kenjo. The employee starts deactivated; use Activate employee to send their invitation.

**Inputs**

- Email (`email`, text, required): The employee's work email, which must be unique in Kenjo.
- First name (`first_name`, text, required): The employee's first name.
- Last name (`last_name`, text, required): The employee's last name.
- Gender (`gender`, text): The employee's gender. One of: `Male`, `Female`, `Other`.
- Date of birth (`birthdate`, date): The employee's date of birth.
- Nationality (`nationality`, text): The employee's nationality, in English with a capital letter, such as `Spanish`.
- Company (`company_id`, text, required): The company the employee works for.
- Weekly hours (`weekly_hours`, number, required): How many hours a week the employee works. From 0 to 168.
- Office (`office_id`, text): The office the employee works at.
- Department (`department_id`, text): The employee's department.
- Job title (`job_title`, text): The job title.
- Start date (`start_date`, date): The employee's first day.
- Work phone (`work_phone`, text): The work phone.
- Work mobile (`work_mobile`, text): The work mobile phone.
- Reports to (`reports_to_id`, text): Who the employee reports to.
- Probation ends (`probation_period_end`, date): The last day of the probation period.
- Contract ends (`contract_end`, date): The last day of the employee's contract.
- Language (`language`, text): The language Kenjo shows the employee. One of: `en` (English), `es` (Spanish), `de` (German).
- External ID (`external_id`, text): Your own ID for the employee, such as a payroll number. Must be unique.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "account": {
      "_id": "example",
      "email": "example",
      "externalId": "example",
      "isActive": true,
      "language": "example"
    },
    "personal": {
      "_id": "example",
      "birthdate": "example",
      "displayName": "example",
      "firstName": "example",
      "gender": "example",
      "lastName": "example",
      "nationality": "example"
    },
    "work": {
      "_id": "example",
      "areaIds": [
        "example"
      ],
      "companyId": "example",
      "contractEnd": "example",
      "departmentId": "example",
      "isAssistant": true,
      "jobTitle": "example",
      "officeId": "example",
      "probationPeriodEnd": "example",
      "reportsToId": "example",
      "startDate": "example",
      "teamIds": [
        "example"
      ],
      "weeklyHours": 1,
      "workMobile": "example",
      "workPhone": "example"
    }
  }
}
```

### Create team

Add a team to Kenjo.

**Inputs**

- Name (`name`, text, required): The team's name.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "_id": "example",
    "name": "example"
  }
}
```

### Create time off request

Ask for time off for an employee, which then goes to their approver as a request.

**Inputs**

- Employee (`employee_id`, text, required): The employee.
- Time off type (`time_off_type_id`, text, required): The kind of time off.
- From (`from_date`, date, required): The first day off.
- To (`to_date`, date, required): The last day off.
- First day (`part_of_day_from`, text): Whether the whole first day is off or only its second half. Leave empty for the whole day. One of: `StartOfDay` (Whole first day), `HalfOfDay` (Half day).
- Last day (`part_of_day_to`, text): Whether the whole last day is off or only its first half. Leave empty for the whole day. One of: `EndOfDay` (Whole last day), `HalfOfDay` (Half day).
- Description (`description`, text): A note for the approver, up to 1,000 characters.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "_id": "example",
    "_timeOffTypeId": "example",
    "_userId": "example",
    "description": "example",
    "from": "example",
    "partOfDayFrom": "example",
    "partOfDayTo": "example",
    "to": "example"
  }
}
```

### Deactivate employee

Deactivate an employee, which ends their access to Kenjo.

**Inputs**

- Employee (`employee_id`, text, required): The employee.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "message": "example"
  }
}
```

### Delete attendance entry

Delete an attendance entry.

**Inputs**

- Attendance entry (`attendance_id`, text, required): The attendance entry, as the ID Kenjo gave it.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Delete department

Delete a department from Kenjo.

**Inputs**

- Department (`department_id`, text, required): The department.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Delete team

Delete a team from Kenjo.

**Inputs**

- Team (`kenjo_team_id`, text, required): The team.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Get employee

Get everything Kenjo holds about one employee: account, personal, work, work schedule, address, home and emergency details.

**Inputs**

- Employee (`employee_id`, text, required): The employee.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "account": {
      "_id": "example",
      "email": "example",
      "externalId": "example",
      "isActive": true,
      "language": "example"
    },
    "address": {},
    "emergency": {},
    "home": {},
    "personal": {
      "_id": "example",
      "birthdate": "example",
      "displayName": "example",
      "firstName": "example",
      "gender": "example",
      "lastName": "example",
      "nationality": "example"
    },
    "work": {
      "_id": "example",
      "areaIds": [
        "example"
      ],
      "companyId": "example",
      "contractEnd": "example",
      "departmentId": "example",
      "isAssistant": true,
      "jobTitle": "example",
      "officeId": "example",
      "probationPeriodEnd": "example",
      "reportsToId": "example",
      "startDate": "example",
      "teamIds": [
        "example"
      ],
      "weeklyHours": 1,
      "workMobile": "example",
      "workPhone": "example"
    },
    "workSchedule": {}
  }
}
```

### List applications

List applications to job openings, optionally for one opening or one candidate.

**Inputs**

- Job opening (`position_id`, text): Only list applications to this job opening.
- Candidate (`candidate_id`, text): Only list this candidate's applications.
- Page (`page`, number): Which page of applications to read: 1 is the first. Leave empty for the first page. At least 1.
- Results per page (`page_size`, text): How many applications to read per page. Leave empty for 50. One of: `25`, `50`, `100`.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "_candidateId": "example",
        "_createdAt": "example",
        "_id": "example",
        "_positionId": "example",
        "_updatedAt": "example",
        "hiredDate": "example",
        "isDisqualified": true,
        "rejectionDate": "example",
        "rejectionReason": "example",
        "source": "example",
        "stageId": "example"
      }
    ],
    "metadata": {
      "count": 1,
      "limit": 1,
      "offset": 1,
      "total": 1
    }
  }
}
```

### List attendance categories

List the categories attendance entries can be filed under.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "_id": "example",
        "isActive": true,
        "name": "example",
        "parentCategoryId": "example"
      }
    ]
  }
}
```

### List attendance entries

List the attendance entries of every employee between two dates, at most 31 days apart.

**Inputs**

- From (`from_date`, date, required): The first day of attendance to read.
- To (`to_date`, date, required): The last day of attendance to read, at most 31 days after the first.

**Outputs**

- `data` (list): The response from Kenjo.

**Example output**

```json
{
  "data": [
    {
      "_id": "example",
      "attendanceCategoryId": "example",
      "attendanceSubCategoryId": "example",
      "breakTime": 1,
      "breaks": [
        {
          "end": "example",
          "start": "example"
        }
      ],
      "comment": "example",
      "email": "example",
      "endTime": "example",
      "externalId": "example",
      "startTime": "example",
      "userId": "example"
    }
  ]
}
```

### List candidates

List the candidates in Kenjo's recruiting, optionally only those with an email or name.

**Inputs**

- Email (`email`, text): Only list the candidate with this email.
- First name (`first_name`, text): Only list candidates with this first name.
- Last name (`last_name`, text): Only list candidates with this last name.
- Page (`page`, number): Which page of candidates to read: 1 is the first. Leave empty for the first page. At least 1.
- Results per page (`page_size`, text): How many candidates to read per page. Leave empty for 50. One of: `25`, `50`, `100`.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "_createdAt": "example",
        "_id": "example",
        "_updatedAt": "example",
        "email": "example",
        "firstName": "example",
        "lastName": "example",
        "origin": "example",
        "phone": "example",
        "sourceField": "example"
      }
    ],
    "metadata": {
      "count": 1,
      "limit": 1,
      "offset": 1,
      "total": 1
    }
  }
}
```

### List companies

List the companies set up in Kenjo.

**Inputs**

- Name (`name`, text): Only list the company with this name.

**Outputs**

- `data` (list): The response from Kenjo.

**Example output**

```json
{
  "data": [
    {
      "_id": "example",
      "city": "example",
      "country": "example",
      "name": "example"
    }
  ]
}
```

### List departments

List the departments set up in Kenjo.

**Inputs**

- Name (`name`, text): Only list the department with this name.

**Outputs**

- `data` (list): The response from Kenjo.

**Example output**

```json
{
  "data": [
    {
      "_id": "example",
      "name": "example"
    }
  ]
}
```

### List employees

List every employee in Kenjo with their name, email, company, office, department and job title.

**Inputs**: None.

**Outputs**

- `data` (list): The response from Kenjo.

**Example output**

```json
{
  "data": [
    {
      "_id": "example",
      "companyId": "example",
      "departmentId": "example",
      "displayName": "example",
      "email": "example",
      "firstName": "example",
      "isActive": true,
      "jobTitle": "example",
      "lastName": "example",
      "officeId": "example"
    }
  ]
}
```

### List job openings

List the job openings (positions) in Kenjo's recruiting, optionally by status.

**Inputs**

- Status (`status`, text): Only list openings with this status. One of: `Active`, `Draft`, `Closed`, `Archived`.
- Page (`page`, number): Which page of openings to read: 1 is the first. Leave empty for the first page. At least 1.
- Results per page (`page_size`, text): How many openings to read per page. Leave empty for 50. One of: `25`, `50`, `100`.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "_id": "example",
        "companyId": "example",
        "departmentId": "example",
        "jobDescription": {
          "html": "example"
        },
        "jobTitle": "example",
        "officeId": "example",
        "positionType": "example",
        "status": "example"
      }
    ],
    "metadata": {
      "count": 1,
      "limit": 1,
      "offset": 1,
      "total": 1
    }
  }
}
```

### List offices

List the offices set up in Kenjo, optionally for one company.

**Inputs**

- Name (`name`, text): Only list the office with this name.
- Company (`company_id`, text): Only list this company's offices.

**Outputs**

- `data` (list): The response from Kenjo.

**Example output**

```json
{
  "data": [
    {
      "_id": "example",
      "activeForShiftplan": true,
      "calendarId": "example",
      "city": "example",
      "companyId": "example",
      "country": "example",
      "name": "example",
      "street": "example"
    }
  ]
}
```

### List shifts

List the shift plan's shifts between two dates (both needed; without them Kenjo lists this month), optionally for one employee or status.

**Inputs**

- From (`from_date`, date): The first day of shifts to read.
- To (`to_date`, date): The last day of shifts to read.
- Employee (`employee_id`, text): Only list this employee's shifts.
- Status (`status`, text): Only list draft or published shifts. One of: `draft`, `published`.
- Assignment (`assignment_state`, text): Only list open shifts (no one assigned) or scheduled ones. One of: `open` (Open (no one assigned)), `scheduled` (Scheduled (someone assigned)).
- Page (`page`, number): Which page of shifts to read: 1 is the first. Leave empty for the first page. At least 1.
- Results per page (`page_size`, text): How many shifts to read per page. Leave empty for 50. One of: `25`, `50`, `100`.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "_createdAt": "example",
        "_id": "example",
        "_updatedAt": "example",
        "applicants": [
          "example"
        ],
        "assignmentState": "example",
        "break": 1,
        "date": "example",
        "employeeId": "example",
        "end": 1,
        "locationId": "example",
        "notes": "example",
        "ownerId": "example",
        "roleId": "example",
        "start": 1,
        "status": "example",
        "tagId": "example",
        "workingAreaId": "example"
      }
    ],
    "metadata": {
      "count": 1,
      "limit": 1,
      "offset": 1,
      "total": 1
    }
  }
}
```

### List teams

List the teams set up in Kenjo.

**Inputs**

- Name (`name`, text): Only list the team with this name.

**Outputs**

- `data` (list): The response from Kenjo.

**Example output**

```json
{
  "data": [
    {
      "_id": "example",
      "name": "example"
    }
  ]
}
```

### List time off requests

List time off requests between two dates, at most 92 days apart, optionally for one employee, type or status.

**Inputs**

- From (`from_date`, date, required): The first day of time off to read.
- To (`to_date`, date, required): The last day of time off to read, at most 92 days after the first.
- Employee (`employee_id`, text): Only list this employee's requests.
- Time off type (`time_off_type_id`, text): Only list requests of this type.
- Status (`status`, text): Only list requests with this status. One of: `Submitted`, `Pending`, `InApproval` (In approval), `Approved`, `Declined`, `Cancelled`, `Processed`, `CancelledAfterProcessed` (Cancelled after processing).
- Page (`page`, number): Which page of requests to read: 1 is the first. Leave empty for the first page. At least 1.
- Results per page (`page_size`, text): How many requests to read per page. Leave empty for 50. One of: `25`, `50`, `100`.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "_createdAt": "example",
        "_id": "example",
        "_policyId": "example",
        "_policyName": "example",
        "_policyType": "example",
        "_timeOffTypeId": "example",
        "_type": "example",
        "_userId": "example",
        "description": "example",
        "duration": 1,
        "from": "example",
        "hasAttachment": true,
        "partOfDayFrom": "example",
        "partOfDayTo": "example",
        "status": "example",
        "to": "example",
        "workingTime": 1
      }
    ],
    "metadata": {
      "count": 1,
      "limit": 1,
      "offset": 1,
      "total": 1
    }
  }
}
```

### List time off types

List the kinds of time off the company offers, such as holidays or sick days.

**Inputs**

- Name (`name`, text): Only list the type with this name, such as `Sick`.
- Page (`page`, number): Which page of types to read: 1 is the first. Leave empty for the first page. At least 1.
- Results per page (`page_size`, text): How many types to read per page. Leave empty for 50. One of: `25`, `50`, `100`.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "_id": "example",
        "name": "example"
      }
    ],
    "metadata": {
      "count": 1,
      "limit": 1,
      "offset": 1,
      "total": 1
    }
  }
}
```

### Rename department

Change a department's name.

**Inputs**

- Department (`department_id`, text, required): The department.
- Name (`name`, text, required): The department's name.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "_id": "example",
    "name": "example"
  }
}
```

### Update attendance entry

Change the times, comment or category of an attendance entry. Fields left empty stay as they are.

**Inputs**

- Attendance entry (`attendance_id`, text, required): The attendance entry, as the ID Kenjo gave it.
- Start time (`start_time`, time): When the work started, as a time of day.
- End time (`end_time`, time): When the work ended, as a time of day. Leave empty while it's still going on.
- Ends the next day (`is_overnight_shift`, true/false): Turn on when the end time is on the next day.
- Comment (`comment`, text): A note about this entry, up to 150 characters.
- Category (`attendance_category_id`, text): The attendance category.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "_id": "example",
    "attendanceCategoryId": "example",
    "attendanceSubCategoryId": "example",
    "breakTime": 1,
    "breaks": [
      {
        "end": "example",
        "start": "example"
      }
    ],
    "comment": "example",
    "email": "example",
    "endTime": "example",
    "externalId": "example",
    "startTime": "example",
    "userId": "example"
  }
}
```

### Update candidate

Change a candidate's name, email, phone or source. Fields left empty stay as they are.

**Inputs**

- Candidate (`candidate_id`, text, required): The candidate.
- First name (`first_name`, text): The candidate's first name.
- Last name (`last_name`, text): The candidate's last name.
- Email (`email`, text): The candidate's email.
- Phone (`phone`, text): The candidate's phone number.
- Source (`source_field`, text): Where the candidate came from, such as a job board.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "_createdAt": "example",
    "_id": "example",
    "_updatedAt": "example",
    "email": "example",
    "firstName": "example",
    "lastName": "example",
    "origin": "example",
    "phone": "example",
    "sourceField": "example"
  }
}
```

### Update employee personal details

Change an employee's name, gender, date of birth or nationality. Fields left empty stay as they are.

**Inputs**

- Employee (`employee_id`, text, required): The employee.
- First name (`first_name`, text): The employee's first name.
- Last name (`last_name`, text): The employee's last name.
- Gender (`gender`, text): The employee's gender. One of: `Male`, `Female`, `Other`.
- Date of birth (`birthdate`, date): The employee's date of birth.
- Nationality (`nationality`, text): The employee's nationality, in English with a capital letter, such as `Spanish`.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "_id": "example",
    "birthdate": "example",
    "displayName": "example",
    "firstName": "example",
    "gender": "example",
    "lastName": "example",
    "nationality": "example"
  }
}
```

### Update employee work details

Change an employee's work details, such as job title, department, office or manager. Fields left empty stay as they are.

**Inputs**

- Employee (`employee_id`, text, required): The employee.
- Company (`company_id`, text): The company the employee works for.
- Office (`office_id`, text): The office the employee works at.
- Department (`department_id`, text): The employee's department.
- Job title (`job_title`, text): The job title.
- Start date (`start_date`, date): The employee's first day.
- Work phone (`work_phone`, text): The work phone.
- Work mobile (`work_mobile`, text): The work mobile phone.
- Reports to (`reports_to_id`, text): Who the employee reports to.
- Probation ends (`probation_period_end`, date): The last day of the probation period.
- Contract ends (`contract_end`, date): The last day of the employee's contract.

**Outputs**

- `data` (object): The response from Kenjo.

**Example output**

```json
{
  "data": {
    "_id": "example",
    "areaIds": [
      "example"
    ],
    "companyId": "example",
    "contractEnd": "example",
    "departmentId": "example",
    "isAssistant": true,
    "jobTitle": "example",
    "officeId": "example",
    "probationPeriodEnd": "example",
    "reportsToId": "example",
    "startDate": "example",
    "teamIds": [
      "example"
    ],
    "weeklyHours": 1,
    "workMobile": "example",
    "workPhone": "example"
  }
}
```
