bexio Payroll
bexio_payrollCreate, read, update, and delete employees and absences, and download paystub PDFs for payroll management.
Instructions
Manage bexio payroll (4.0 API): employees, their absences and paystub PDFs. Employee and absence ids are UUID strings. Select a "resource" and an "action". Resource "employees": "list" (all active employees, no arguments), "get" (employee_id + date — the employee's state on that ISO date, includes vacation days used/left), "create" (payload; required: ahv_number; useful fields: first_name, last_name, email, nationality, marital_status, gender, date_of_birth, address, language, iban, annual_vacation_days), "update" (employee_id + payload; PATCH — send only the fields to change; the API spec also marks ahv_number required here, so include it if a partial update is rejected). Resource "absences": "list" (employee_id + year — absences of the employee in that business year), "get" (employee_id + absence_id), "create" (employee_id + payload; required: reason, start_date; reasons: Injury, Sickness, MaternityLeave, MilitaryLeave, Vacation, InterruptionOfWork), "update" (employee_id + absence_id + payload; PUT — the API requires the full absence object), "delete" (employee_id + absence_id — permanently deletes the absence, cannot be undone). Resource "paystubs": "download_pdf" (employee_id + year + month — downloads the paystub PDF; use save_path to write it to disk), "get" (employee_id + year + month — DEPRECATED endpoint returning the URI of the generated PDF; prefer "download_pdf").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | ISO 8601 date of the employee's state (required by the API for employees "get") | |
| year | No | Business year for absences "list"; calendar year for paystub actions | |
| month | No | Month (1-12) for paystub actions | |
| action | Yes | Operation to perform. employees: list/get/create/update; absences: list/get/create/update/delete; paystubs: download_pdf/get (deprecated) | |
| payload | No | Entity fields for create/update; use the fields matching the selected resource. Employees — required on create: ahv_number (the API spec also marks ahv_number required on the update PATCH, though updates normally send only the fields to change). Absences — required on create: reason, start_date; absence "update" uses PUT — the API requires the FULL object (reason, start_date, end_date, half_day, continued_pay, disability, paid_hours). | |
| resource | Yes | Payroll resource to operate on | |
| save_path | No | For "download_pdf": write the PDF to this file path instead of returning base64 inline | |
| absence_id | No | Absence UUID (required for absences get/update/delete) | |
| employee_id | No | Employee UUID (required for all actions except employees list/create) |