Skip to content

HR Module

Christian KASSE edited this page Apr 2, 2026 · 2 revisions

HR Module

Human Resources management: employees, departments, contracts, payroll, attendance, leaves, and more.

Accessor: client.hr

Available Resources

Resource Accessor Description
Employees client.hr.employees Employee lifecycle management
Departments client.hr.departments Organizational departments
Contracts client.hr.contracts Employment contracts
Payroll client.hr.payroll Payroll runs and processing
Attendance client.hr.attendance Time and attendance tracking
Leaves client.hr.leaves Leave requests and balances
Benefits client.hr.benefits Employee benefits
Loans client.hr.loans Employee loans
Expenses client.hr.expenses Expense reports
Disciplinary client.hr.disciplinary Disciplinary actions
Documents client.hr.documents Employee documents
History client.hr.history Employment history
Positions client.hr.positions Job positions
Performance client.hr.performance Performance reviews
Recruitment client.hr.recruitment Recruitment pipeline
Skills client.hr.skills Employee skills
Training client.hr.training Training programs
Onboarding client.hr.onboarding Onboarding checklists
Shifts client.hr.shifts Shift definitions
Shift Schedules client.hr.shift_schedules Shift scheduling
Timesheets client.hr.timesheets Timesheet entries
Webhooks client.hr.webhooks HR event webhooks
Config client.hr.config Module configuration
Reports client.hr.reports HR reports and analytics

Standard CRUD Methods

All resource classes (except Config and Reports) expose:

list(*, page=1, page_size=25, **filters) -> PageResponse
list_all(*, page_size=25, **filters) -> Generator[PageResponse]
create(**data) -> dict
retrieve(resource_id: str) -> dict
update(resource_id: str, **data) -> dict
delete(resource_id: str) -> dict

Code Examples

Employee Management

from essabu import Essabu

client = Essabu(api_key="esa_live_xxx", tenant_id="tenant-id")

# List employees with filters
page = client.hr.employees.list(page=1, page_size=10, department="engineering")

# Iterate all pages
for page in client.hr.employees.list_all(page_size=50):
    for employee in page.data:
        print(employee["name"])

# Create an employee
employee = client.hr.employees.create(
    first_name="Jean",
    last_name="Dupont",
    email="jean.dupont@company.com",
    department_id="dept-uuid",
    position_id="pos-uuid",
    hire_date="2026-01-15",
)

# Retrieve, update, delete
emp = client.hr.employees.retrieve("emp-uuid")
client.hr.employees.update("emp-uuid", salary=55000)
client.hr.employees.delete("emp-uuid")

Attendance

records = client.hr.attendance.list(employee_id="emp-uuid", date="2026-03-26")
client.hr.attendance.create(employee_id="emp-uuid", check_in="08:00", check_out="17:00")

Leave Management

leave = client.hr.leaves.create(
    employee_id="emp-uuid",
    type="annual",
    start_date="2026-04-01",
    end_date="2026-04-05",
    reason="Vacation",
)

Payroll

run = client.hr.payroll.create(period="2026-03", department_id="dept-uuid")
details = client.hr.payroll.retrieve("run-uuid")

Reports

headcount = client.hr.reports.headcount(year=2026)
turnover = client.hr.reports.turnover(start_date="2026-01-01", end_date="2026-03-31")
balances = client.hr.reports.leave_balance(department_id="dept-uuid")

Configuration

settings = client.hr.config.get_settings()
leave_types = client.hr.config.get_leave_types()
pay_grades = client.hr.config.get_pay_grades()
client.hr.config.update_settings(default_leave_days=25, overtime_rate=1.5)

See Also

Clone this wiki locally