# Employment Hero

> Manage employees, leave requests and timesheets in Employment Hero.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/employment-hero

## Actions

### Add employee

Add a new employee with the basic details. Employment Hero emails them an invitation to finish setting up their profile.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- First name (`first_name`, text, required): The employee's first name.
- Last name (`last_name`, text, required): The employee's last name.
- Email (`email`, text, required): The employee's email address. It must not be in use by anyone else in the organisation; their invitation goes here.
- Date of birth (`date_of_birth`, date, required): The employee's date of birth.
- Employing entity (`employing_entity_id`, text, required): The business that employs them.
- Work location (`work_location_id`, text, required): Where they will work.
- Full legal name (`full_legal_name`, text): Their full name as it appears on official documents, if different.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

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

### Approve leave request

Approve a leave request.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- Leave request (`leave_request_id`, text, required): The leave request.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

```json
{
  "data": {
    "data": {
      "approvers": [
        {
          "id": "example",
          "name": "example"
        }
      ],
      "comment": "example",
      "created_at": "example",
      "day_part": "example",
      "edited_at": "example",
      "employee_id": "example",
      "employee_name": "example",
      "end_date": "example",
      "end_time": "example",
      "file_uploads": [
        {}
      ],
      "hours_per_day": [
        {
          "date": "example",
          "hours": 1
        }
      ],
      "id": "example",
      "is_open_ended": true,
      "leave_balance_amount": 1,
      "leave_category_id": "example",
      "leave_category_name": "example",
      "processed": true,
      "processed_at": "example",
      "reason": "example",
      "start_date": "example",
      "start_time": "example",
      "status": "example",
      "total_hours": 1,
      "total_units": 1,
      "unit_type": "example",
      "updated_at": "example"
    }
  }
}
```

### Approve timesheet entry

Approve a timesheet entry.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- Timesheet entry (`timesheet_entry_id`, text, required): The timesheet entry.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

```json
{
  "data": {
    "data": {
      "break_units": 1,
      "breaks": [
        {
          "end_time": "example",
          "paid": true,
          "start_time": "example"
        }
      ],
      "comment": "example",
      "cost_centre": {
        "id": "example",
        "name": "example"
      },
      "date": "example",
      "end_time": "example",
      "id": "example",
      "position_id": "example",
      "position_name": "example",
      "reason": "example",
      "start_time": "example",
      "status": "example",
      "time": 1,
      "unit_type": "example",
      "units": 1,
      "work_site_id": "example",
      "work_site_name": "example"
    }
  }
}
```

### Create leave request

Request leave for an employee. Days in the range count the employee's usual working hours.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- Employee (`employee_id`, text, required): The employee.
- Leave type (`leave_category_id`, text, required): The type of leave, such as annual leave or sick leave.
- First day (`start_date`, date, required): The first day of leave.
- Last day (`end_date`, date, required): The last day of leave.
- Comment (`comment`, text): A note about the leave, which the employee and approvers can see.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

```json
{
  "data": {
    "data": {
      "approvers": [
        {
          "id": "example",
          "name": "example"
        }
      ],
      "comment": "example",
      "created_at": "example",
      "day_part": "example",
      "edited_at": "example",
      "employee_id": "example",
      "employee_name": "example",
      "end_date": "example",
      "end_time": "example",
      "file_uploads": [
        {}
      ],
      "hours_per_day": [
        {
          "date": "example",
          "hours": 1
        }
      ],
      "id": "example",
      "is_open_ended": true,
      "leave_balance_amount": 1,
      "leave_category_id": "example",
      "leave_category_name": "example",
      "processed": true,
      "processed_at": "example",
      "reason": "example",
      "start_date": "example",
      "start_time": "example",
      "status": "example",
      "total_hours": 1,
      "total_units": 1,
      "unit_type": "example",
      "updated_at": "example"
    }
  }
}
```

### Create timesheet entry

Record hours an employee worked on one day, as a number of hours or as a start and end time.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- Employee (`employee_id`, text, required): The employee.
- Date (`date`, date, required): The day the hours were worked.
- Hours (`units`, number): Hours worked, from more than 0 up to 24. Leave empty when you give a start and end time, which Employment Hero counts the hours from. From 0 to 24.
- Start time (`start_time`, date and time): When work started. Must be on the entry's date.
- End time (`end_time`, date and time): When work ended. Must be on the entry's date.
- Comment (`comment`, text): A note about the hours worked.
- Position (`position_id`, text): The position the hours were worked in. Needed when your organisation uses work sites and positions.
- Needs approval (`require_approval`, true/false): Turn on to leave the entry waiting for a manager to approve it, even when your account could approve it straight away.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

```json
{
  "data": {
    "data": {
      "break_units": 1,
      "breaks": [
        {
          "end_time": "example",
          "paid": true,
          "start_time": "example"
        }
      ],
      "comment": "example",
      "cost_centre": {
        "id": "example",
        "name": "example"
      },
      "date": "example",
      "end_time": "example",
      "id": "example",
      "position_id": "example",
      "position_name": "example",
      "reason": "example",
      "start_time": "example",
      "status": "example",
      "time": 1,
      "unit_type": "example",
      "units": 1,
      "work_site_id": "example",
      "work_site_name": "example"
    }
  }
}
```

### Decline leave request

Decline a leave request, with an optional reason for the employee.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- Leave request (`leave_request_id`, text, required): The leave request.
- Reason (`reason`, text): Why it was declined. The employee can see this.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

```json
{
  "data": {
    "data": {
      "approvers": [
        {
          "id": "example",
          "name": "example"
        }
      ],
      "comment": "example",
      "created_at": "example",
      "day_part": "example",
      "edited_at": "example",
      "employee_id": "example",
      "employee_name": "example",
      "end_date": "example",
      "end_time": "example",
      "file_uploads": [
        {}
      ],
      "hours_per_day": [
        {
          "date": "example",
          "hours": 1
        }
      ],
      "id": "example",
      "is_open_ended": true,
      "leave_balance_amount": 1,
      "leave_category_id": "example",
      "leave_category_name": "example",
      "processed": true,
      "processed_at": "example",
      "reason": "example",
      "start_date": "example",
      "start_time": "example",
      "status": "example",
      "total_hours": 1,
      "total_units": 1,
      "unit_type": "example",
      "updated_at": "example"
    }
  }
}
```

### Decline timesheet entry

Decline a timesheet entry, with an optional reason for the employee.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- Timesheet entry (`timesheet_entry_id`, text, required): The timesheet entry.
- Reason (`reason`, text): Why it was declined. The employee can see this.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

```json
{
  "data": {
    "data": {
      "break_units": 1,
      "breaks": [
        {
          "end_time": "example",
          "paid": true,
          "start_time": "example"
        }
      ],
      "comment": "example",
      "cost_centre": {
        "id": "example",
        "name": "example"
      },
      "date": "example",
      "end_time": "example",
      "id": "example",
      "position_id": "example",
      "position_name": "example",
      "reason": "example",
      "start_time": "example",
      "status": "example",
      "time": 1,
      "unit_type": "example",
      "units": 1,
      "work_site_id": "example",
      "work_site_name": "example"
    }
  }
}
```

### Delete leave request

Delete a leave request for good. Leave already paid out through payroll can't be deleted.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- Leave request (`leave_request_id`, text, required): The leave request.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

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

### Delete timesheet entry

Delete a timesheet entry for good. Entries already sent to payroll can't be deleted.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- Timesheet entry (`timesheet_entry_id`, text, required): The timesheet entry.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

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

### Get employee

Get an employee's full record.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- Employee (`employee_id`, text, required): The employee.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

```json
{
  "data": {
    "data": {
      "account_email": "example",
      "address": "example",
      "avatar_url": "example",
      "biography": "example",
      "code": "example",
      "company_email": "example",
      "company_landline": "example",
      "company_mobile": "example",
      "country": "example",
      "date_of_birth": "example",
      "email": "example",
      "employing_entity": "example",
      "employment_type": "example",
      "external_id": "example",
      "first_name": "example",
      "full_legal_name": "example",
      "full_name": "example",
      "gender": "example",
      "home_phone": "example",
      "id": "example",
      "independent_contractor": true,
      "job_title": "example",
      "known_as": "example",
      "last_name": "example",
      "location": "example",
      "marital_status": "example",
      "middle_name": "example",
      "nationality": "example",
      "payroll_type": "example",
      "personal_email": "example",
      "personal_mobile_number": "example",
      "postal_address": {
        "address_type": "example",
        "block_number": "example",
        "city": "example",
        "country": "example",
        "level_number": "example",
        "line_1": "example",
        "line_2": "example",
        "line_3": "example",
        "postcode": "example",
        "state": "example",
        "street_name": "example",
        "suburb": "example",
        "unit_number": "example"
      },
      "primary_cost_centre": {
        "id": "example",
        "name": "example"
      },
      "primary_manager": {
        "id": "example",
        "name": "example"
      },
      "probation_length": 1,
      "pronouns": "example",
      "residential_address": {
        "address_type": "example",
        "block_number": "example",
        "city": "example",
        "country": "example",
        "level_number": "example",
        "line_1": "example",
        "line_2": "example",
        "line_3": "example",
        "postcode": "example",
        "state": "example",
        "street_name": "example",
        "suburb": "example",
        "unit_number": "example"
      },
      "role": "example",
      "secondary_cost_centres": [
        {
          "id": "example",
          "name": "example"
        }
      ],
      "secondary_manager": {
        "id": "example",
        "name": "example"
      },
      "start_date": "example",
      "status": "example",
      "teams": [
        {
          "id": "example",
          "name": "example"
        }
      ],
      "termination_date": "example",
      "termination_summary": "example",
      "time_zone": "example",
      "title": "example",
      "trading_name": "example",
      "typical_work_day": "example",
      "updated_at": "example",
      "work_country": "example"
    }
  }
}
```

### Get leave request

Get a leave request.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- Leave request (`leave_request_id`, text, required): The leave request.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

```json
{
  "data": {
    "data": {
      "approvers": [
        {
          "id": "example",
          "name": "example"
        }
      ],
      "comment": "example",
      "created_at": "example",
      "day_part": "example",
      "edited_at": "example",
      "employee_id": "example",
      "employee_name": "example",
      "end_date": "example",
      "end_time": "example",
      "file_uploads": [
        {}
      ],
      "hours_per_day": [
        {
          "date": "example",
          "hours": 1
        }
      ],
      "id": "example",
      "is_open_ended": true,
      "leave_balance_amount": 1,
      "leave_category_id": "example",
      "leave_category_name": "example",
      "processed": true,
      "processed_at": "example",
      "reason": "example",
      "start_date": "example",
      "start_time": "example",
      "status": "example",
      "total_hours": 1,
      "total_units": 1,
      "unit_type": "example",
      "updated_at": "example"
    }
  }
}
```

### List employees

List an organisation's employees and contractors, optionally filtered.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- Search (`query`, text): Find people by name, email address, job title or employee code.
- Type (`member_type`, text): Only employees or only contractors. Leave empty for both. One of: `employee`, `contractor`.
- Statuses (`employee_status`, list): Only people with these statuses. One or more of: `active`, `pending`, `terminated`, `offboarding`, `expired`.
- Groups (`team_ids`, list): Only people in these groups.
- Changed since (`updated_since`, date and time): Only people whose record changed after this time.
- Page (`page_index`, number): Which page of results to get, starting at 1. At least 1.
- Results per page (`item_per_page`, number): How many results to get on each page, up to 100. Employment Hero gives 20 when this is empty. From 1 to 100.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

```json
{
  "data": {
    "data": {
      "item_per_page": 1,
      "items": [
        {
          "account_email": "example",
          "address": "example",
          "avatar_url": "example",
          "biography": "example",
          "code": "example",
          "company_email": "example",
          "company_landline": "example",
          "company_mobile": "example",
          "country": "example",
          "date_of_birth": "example",
          "email": "example",
          "employing_entity": "example",
          "employment_type": "example",
          "external_id": "example",
          "first_name": "example",
          "full_legal_name": "example",
          "full_name": "example",
          "gender": "example",
          "home_phone": "example",
          "id": "example",
          "independent_contractor": true,
          "job_title": "example",
          "known_as": "example",
          "last_name": "example",
          "location": "example",
          "marital_status": "example",
          "middle_name": "example",
          "nationality": "example",
          "payroll_type": "example",
          "personal_email": "example",
          "personal_mobile_number": "example",
          "postal_address": {
            "address_type": "example",
            "block_number": "example",
            "city": "example",
            "country": "example",
            "level_number": "example",
            "line_1": "example",
            "line_2": "example",
            "line_3": "example",
            "postcode": "example",
            "state": "example",
            "street_name": "example",
            "suburb": "example",
            "unit_number": "example"
          },
          "primary_cost_centre": {
            "id": "example",
            "name": "example"
          },
          "primary_manager": {
            "id": "example",
            "name": "example"
          },
          "probation_length": 1,
          "pronouns": "example",
          "residential_address": {
            "address_type": "example",
            "block_number": "example",
            "city": "example",
            "country": "example",
            "level_number": "example",
            "line_1": "example",
            "line_2": "example",
            "line_3": "example",
            "postcode": "example",
            "state": "example",
            "street_name": "example",
            "suburb": "example",
            "unit_number": "example"
          },
          "role": "example",
          "secondary_cost_centres": [
            {
              "id": "example",
              "name": "example"
            }
          ],
          "secondary_manager": {
            "id": "example",
            "name": "example"
          },
          "start_date": "example",
          "status": "example",
          "teams": [
            {
              "id": "example",
              "name": "example"
            }
          ],
          "termination_date": "example",
          "termination_summary": "example",
          "time_zone": "example",
          "title": "example",
          "trading_name": "example",
          "typical_work_day": "example",
          "updated_at": "example",
          "work_country": "example"
        }
      ],
      "page_index": 1,
      "total_items": 1,
      "total_pages": 1
    }
  }
}
```

### List leave requests

List an organisation's leave requests, optionally filtered by status, employee, leave type or dates.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- Statuses (`statuses`, list): Only requests with these statuses. One or more of: `pending`, `approved`, `declined`.
- Employees (`employee_ids`, list): Only requests from these employees.
- Leave types (`leave_category_ids`, list): Only requests for these types of leave.
- Leave from (`start_date`, date): Only leave from this date.
- Leave to (`end_date`, date): Only leave up to this date.
- Requested from (`submitted_from`, date): Only requests made on or after this date.
- Requested to (`submitted_to`, date): Only requests made on or before this date.
- Changed since (`updated_since`, date and time): Only requests changed after this time.
- Processed through payroll (`processed`, true/false): Only requests paid out through payroll (on) or not yet paid out (off). Leave empty for both.
- Page (`page_index`, number): Which page of results to get, starting at 1. At least 1.
- Results per page (`item_per_page`, number): How many results to get on each page, up to 100. Employment Hero gives 20 when this is empty. From 1 to 100.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

```json
{
  "data": {
    "data": {
      "item_per_page": 1,
      "items": [
        {
          "approvers": [
            {
              "id": "example",
              "name": "example"
            }
          ],
          "comment": "example",
          "created_at": "example",
          "day_part": "example",
          "edited_at": "example",
          "employee_id": "example",
          "employee_name": "example",
          "end_date": "example",
          "end_time": "example",
          "file_uploads": [
            {}
          ],
          "hours_per_day": [
            {
              "date": "example",
              "hours": 1
            }
          ],
          "id": "example",
          "is_open_ended": true,
          "leave_balance_amount": 1,
          "leave_category_id": "example",
          "leave_category_name": "example",
          "processed": true,
          "processed_at": "example",
          "reason": "example",
          "start_date": "example",
          "start_time": "example",
          "status": "example",
          "total_hours": 1,
          "total_units": 1,
          "unit_type": "example",
          "updated_at": "example"
        }
      ],
      "page_index": 1,
      "total_items": 1,
      "total_pages": 1
    }
  }
}
```

### List leave types

List the types of leave an organisation offers, such as annual leave.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- Page (`page_index`, number): Which page of results to get, starting at 1. At least 1.
- Results per page (`item_per_page`, number): How many results to get on each page, up to 100. Employment Hero gives 20 when this is empty. From 1 to 100.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

```json
{
  "data": {
    "data": {
      "item_per_page": 1,
      "items": [
        {
          "attachment_requirement": "example",
          "balance_untracked": true,
          "external_id": "example",
          "id": "example",
          "include_non_workdays": true,
          "leave_category_type": "example",
          "name": "example",
          "paid": true,
          "prevent_negative_leave_balance": true,
          "requires_leave_reason": true,
          "unit_type": "example",
          "updated_at": "example"
        }
      ],
      "page_index": 1,
      "total_items": 1,
      "total_pages": 1
    }
  }
}
```

### List organisations

List the Employment Hero organisations you can reach.

**Inputs**

- Page (`page_index`, number): Which page of results to get, starting at 1. At least 1.
- Results per page (`item_per_page`, number): How many results to get on each page, up to 100. Employment Hero gives 20 when this is empty. From 1 to 100.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

```json
{
  "data": {
    "data": {
      "item_per_page": 1,
      "items": [
        {
          "country": "example",
          "id": "example",
          "logo_url": "example",
          "name": "example",
          "phone": "example"
        }
      ],
      "page_index": 1,
      "total_items": 1,
      "total_pages": 1
    }
  }
}
```

### List timesheet entries

List timesheet entries for one employee, or for everyone when no employee is chosen.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- Employee (`employee_id`, text): Only this employee's entries. Leave empty for everyone.
- From date (`from_date`, date): Only entries on or after this date.
- To date (`to_date`, date): Only entries on or before this date.
- Page (`page_index`, number): Which page of results to get, starting at 1. At least 1.
- Results per page (`item_per_page`, number): How many results to get on each page, up to 100. Employment Hero gives 20 when this is empty. From 1 to 100.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

```json
{
  "data": {
    "data": {
      "item_per_page": 1,
      "items": [
        {
          "break_units": 1,
          "breaks": [
            {
              "end_time": "example",
              "paid": true,
              "start_time": "example"
            }
          ],
          "comment": "example",
          "cost_centre": {
            "id": "example",
            "name": "example"
          },
          "date": "example",
          "end_time": "example",
          "id": "example",
          "position_id": "example",
          "position_name": "example",
          "reason": "example",
          "start_time": "example",
          "status": "example",
          "time": 1,
          "unit_type": "example",
          "units": 1,
          "work_site_id": "example",
          "work_site_name": "example"
        }
      ],
      "page_index": 1,
      "total_items": 1,
      "total_pages": 1
    }
  }
}
```

### Update employment details

Change an employee's work details, such as their manager, groups, cost centre or work contact details. Only the details you fill in change.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- Employee (`employee_id`, text, required): The employee.
- Employee code (`code`, text): The employee's code in your organisation.
- Manager (`primary_manager_id`, text): Their manager. Employment Hero applies a manager change within a few moments rather than at once.
- Second manager (`secondary_manager_id`, text): Their second manager, if they have one.
- Groups (`team_ids`, list): Every group the employee should be in.
- Cost centre (`cost_centre_id`, text): Their main cost centre.
- Work email (`company_email`, text): Their work email address.
- Work mobile (`company_mobile`, text): Their work mobile number.
- Work landline (`company_landline`, text): Their work landline number.
- Start date (`start_date`, date): The day they started.
- System access date (`system_access_date`, date): The day they can start signing in to Employment Hero.
- Probation (months) (`probation_length`, number): How many months their probation lasts. At least 0.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

```json
{
  "data": {
    "data": {
      "account_email": "example",
      "address": "example",
      "avatar_url": "example",
      "biography": "example",
      "code": "example",
      "company_email": "example",
      "company_landline": "example",
      "company_mobile": "example",
      "country": "example",
      "date_of_birth": "example",
      "email": "example",
      "employing_entity": "example",
      "employment_type": "example",
      "external_id": "example",
      "first_name": "example",
      "full_legal_name": "example",
      "full_name": "example",
      "gender": "example",
      "home_phone": "example",
      "id": "example",
      "independent_contractor": true,
      "job_title": "example",
      "known_as": "example",
      "last_name": "example",
      "location": "example",
      "marital_status": "example",
      "middle_name": "example",
      "nationality": "example",
      "payroll_type": "example",
      "personal_email": "example",
      "personal_mobile_number": "example",
      "postal_address": {
        "address_type": "example",
        "block_number": "example",
        "city": "example",
        "country": "example",
        "level_number": "example",
        "line_1": "example",
        "line_2": "example",
        "line_3": "example",
        "postcode": "example",
        "state": "example",
        "street_name": "example",
        "suburb": "example",
        "unit_number": "example"
      },
      "primary_cost_centre": {
        "id": "example",
        "name": "example"
      },
      "primary_manager": {
        "id": "example",
        "name": "example"
      },
      "probation_length": 1,
      "pronouns": "example",
      "residential_address": {
        "address_type": "example",
        "block_number": "example",
        "city": "example",
        "country": "example",
        "level_number": "example",
        "line_1": "example",
        "line_2": "example",
        "line_3": "example",
        "postcode": "example",
        "state": "example",
        "street_name": "example",
        "suburb": "example",
        "unit_number": "example"
      },
      "role": "example",
      "secondary_cost_centres": [
        {
          "id": "example",
          "name": "example"
        }
      ],
      "secondary_manager": {
        "id": "example",
        "name": "example"
      },
      "start_date": "example",
      "status": "example",
      "teams": [
        {
          "id": "example",
          "name": "example"
        }
      ],
      "termination_date": "example",
      "termination_summary": "example",
      "time_zone": "example",
      "title": "example",
      "trading_name": "example",
      "typical_work_day": "example",
      "updated_at": "example",
      "work_country": "example"
    }
  }
}
```

### Update leave request

Change a leave request's dates, type or comment. Only what you fill in changes. Leave already paid out through payroll can't be changed.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- Leave request (`leave_request_id`, text, required): The leave request.
- Leave type (`leave_category_id`, text): The type of leave, such as annual leave or sick leave.
- First day (`start_date`, date): The first day of leave.
- Last day (`end_date`, date): The last day of leave.
- Comment (`comment`, text): A note about the leave, which the employee and approvers can see.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

```json
{
  "data": {
    "data": {
      "approvers": [
        {
          "id": "example",
          "name": "example"
        }
      ],
      "comment": "example",
      "created_at": "example",
      "day_part": "example",
      "edited_at": "example",
      "employee_id": "example",
      "employee_name": "example",
      "end_date": "example",
      "end_time": "example",
      "file_uploads": [
        {}
      ],
      "hours_per_day": [
        {
          "date": "example",
          "hours": 1
        }
      ],
      "id": "example",
      "is_open_ended": true,
      "leave_balance_amount": 1,
      "leave_category_id": "example",
      "leave_category_name": "example",
      "processed": true,
      "processed_at": "example",
      "reason": "example",
      "start_date": "example",
      "start_time": "example",
      "status": "example",
      "total_hours": 1,
      "total_units": 1,
      "unit_type": "example",
      "updated_at": "example"
    }
  }
}
```

### Update personal details

Change an employee's personal details. Only the details you fill in change; changing part of the home address keeps the rest of it.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- Employee (`employee_id`, text, required): The employee.
- Title (`title`, text): The employee's title. One of: `Mr`, `Mrs`, `Miss`, `Ms`, `Dr`, `Mx`.
- First name (`first_name`, text): The employee's first name.
- Middle name (`middle_name`, text): The employee's middle name.
- Last name (`last_name`, text): The employee's last name.
- Known as (`known_as`, text): The name they like to be called.
- Full legal name (`full_legal_name`, text): Their full name as it appears on official documents.
- Gender (`gender`, text): The employee's gender. One of: `Male`, `Female`, `Non-binary`, `Prefer not to say`.
- Pronouns (`pronouns`, text): The employee's pronouns. One of: `He/Him`, `She/Her`, `They/Them`, `Other`.
- Date of birth (`date_of_birth`, date): The employee's date of birth.
- Marital status (`marital_status`, text): The employee's marital status. One of: `Single`, `Married`, `In a Relationship`, `Domestic Partnership`, `Prefer not to say`.
- Nationality (`nationality`, text): The employee's nationality.
- Personal email (`personal_email`, text): Their personal email address.
- Personal mobile (`personal_mobile_number`, text): Their personal mobile number.
- Home phone (`home_phone`, text): Their home phone number.
- Biography (`biography`, text): A short introduction shown in the staff directory.
- Address line 1 (`address_line_1`, text): The first line of the home address.
- Address line 2 (`address_line_2`, text): The second line of the home address.
- Suburb (`suburb`, text): The suburb of the home address.
- City (`city`, text): The city of the home address.
- State (`state`, text): The state or province of the home address, such as NSW.
- Postcode (`postcode`, text): The postcode of the home address.
- Country (`address_country`, text): The country of the home address, as a two-letter code such as AU or NZ.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

```json
{
  "data": {
    "data": {
      "account_email": "example",
      "address": "example",
      "avatar_url": "example",
      "biography": "example",
      "code": "example",
      "company_email": "example",
      "company_landline": "example",
      "company_mobile": "example",
      "country": "example",
      "date_of_birth": "example",
      "email": "example",
      "employing_entity": "example",
      "employment_type": "example",
      "external_id": "example",
      "first_name": "example",
      "full_legal_name": "example",
      "full_name": "example",
      "gender": "example",
      "home_phone": "example",
      "id": "example",
      "independent_contractor": true,
      "job_title": "example",
      "known_as": "example",
      "last_name": "example",
      "location": "example",
      "marital_status": "example",
      "middle_name": "example",
      "nationality": "example",
      "payroll_type": "example",
      "personal_email": "example",
      "personal_mobile_number": "example",
      "postal_address": {
        "address_type": "example",
        "block_number": "example",
        "city": "example",
        "country": "example",
        "level_number": "example",
        "line_1": "example",
        "line_2": "example",
        "line_3": "example",
        "postcode": "example",
        "state": "example",
        "street_name": "example",
        "suburb": "example",
        "unit_number": "example"
      },
      "primary_cost_centre": {
        "id": "example",
        "name": "example"
      },
      "primary_manager": {
        "id": "example",
        "name": "example"
      },
      "probation_length": 1,
      "pronouns": "example",
      "residential_address": {
        "address_type": "example",
        "block_number": "example",
        "city": "example",
        "country": "example",
        "level_number": "example",
        "line_1": "example",
        "line_2": "example",
        "line_3": "example",
        "postcode": "example",
        "state": "example",
        "street_name": "example",
        "suburb": "example",
        "unit_number": "example"
      },
      "role": "example",
      "secondary_cost_centres": [
        {
          "id": "example",
          "name": "example"
        }
      ],
      "secondary_manager": {
        "id": "example",
        "name": "example"
      },
      "start_date": "example",
      "status": "example",
      "teams": [
        {
          "id": "example",
          "name": "example"
        }
      ],
      "termination_date": "example",
      "termination_summary": "example",
      "time_zone": "example",
      "title": "example",
      "trading_name": "example",
      "typical_work_day": "example",
      "updated_at": "example",
      "work_country": "example"
    }
  }
}
```

### Update timesheet entry

Change a timesheet entry's date, times, hours, comment or position. Only what you fill in changes.

**Inputs**

- Organisation (`organisation_id`, text, required): The Employment Hero organisation to work in.
- Timesheet entry (`timesheet_entry_id`, text, required): The timesheet entry.
- Date (`date`, date): The day the hours were worked.
- Hours (`units`, number): Hours worked, from more than 0 up to 24. Leave empty when you give a start and end time, which Employment Hero counts the hours from. From 0 to 24.
- Start time (`start_time`, date and time): When work started. Must be on the entry's date.
- End time (`end_time`, date and time): When work ended. Must be on the entry's date.
- Comment (`comment`, text): A note about the hours worked.
- Position (`position_id`, text): The position the hours were worked in. Needed when your organisation uses work sites and positions.

**Outputs**

- `data` (object): The response from Employment Hero.

**Example output**

```json
{
  "data": {
    "data": {
      "break_units": 1,
      "breaks": [
        {
          "end_time": "example",
          "paid": true,
          "start_time": "example"
        }
      ],
      "comment": "example",
      "cost_centre": {
        "id": "example",
        "name": "example"
      },
      "date": "example",
      "end_time": "example",
      "id": "example",
      "position_id": "example",
      "position_name": "example",
      "reason": "example",
      "start_time": "example",
      "status": "example",
      "time": 1,
      "unit_type": "example",
      "units": 1,
      "work_site_id": "example",
      "work_site_name": "example"
    }
  }
}
```
