---
title: "Import Payroll Employees"
method: POST
path: "/companies/{company_id}/payroll/employees/import"
tags: ["payroll"]
---

# Import Payroll Employees

`POST /companies/{company_id}/payroll/employees/import`

## Request

- Base URL: `https://app.zeno-works.ch` (the document declares no server; this is the origin it was published from)
- URL: `https://app.zeno-works.ch/companies/{company_id}/payroll/employees/import`
- Auth: none declared

Import a filled-in employee template (``.xlsx``/``.csv``).

All-or-nothing: the response carries ``ok=False`` plus every per-row problem
when nothing was written. Rows whose ``employee_no`` already exists are
reported as ``skip_existing`` and left untouched, so re-uploading a file is
a no-op. The upload is parsed in memory and never stored (it holds AHV
numbers, salaries and addresses).

## Path parameters

- `company_id` string, required

## Query parameters

- `dry_run` boolean: Validate and report only — never writes. The UI previews with this.

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Response `200`

Successful Response

- PayrollEmployeeImportResponse: Import outcome — identical shape for the preview and the real run. ``ok`` is the atomicity flag: when it is ``False`` nothing was written at all (every issue is in ``errors``). ``dry_run=True`` means nothing was written *regardless* of ``ok`` — it is the preview the UI confirms from.
  - `dry_run` boolean, required
  - `ok` boolean, required
  - `total_rows` integer, required
  - `created` integer, required
  - `skipped_existing` integer, required
  - `contracts_created` integer, required
  - `ibans_set` integer, required
  - `errors` PayrollEmployeeImportIssue[], required
    - `row_no` integer, required
    - `column` string, nullable
    - `message` string, required
  - `rows` PayrollEmployeeImportRowOut[], required
    - `row_no` integer, required
    - `employee_no` string, required
    - `display_name` string, required
    - `action` 'create' | 'skip_existing', required
    - `differs_in` string[], required
    - `employee_id` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zeno-works/apis/zeno-api.md) · [All operations](https://skmtc.dev/zeno-works/apis/zeno-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zeno-works/apis/zeno-api/revisions/1eb93dde146c?raw)
