Skip to main content
Swiss HR Easy exposes a versioned contract for the employee self-service portal. It is what the iOS app talks to, and it is the supported surface for building against the platform.

Scope

The contract covers employee self-service: Every endpoint is self-scoped: it serves the caller’s own data, resolved from the session, with no id parameter to swap. There is no HR- or admin-facing public API — those surfaces are internal to the dashboard.

Generated, not hand-written

The specification is generated from the same Zod schemas the server validates requests and responses against. It is regenerated by npm run gen:openapi and verified byte-for-byte in CI, so the published contract cannot drift from the running code. This is ADR-009. The mobile app regenerates its Dart client from the artifact, which is why drift would be a cross-repo breakage rather than a documentation nit.
Do not hand-edit the specification. A change starts in the Zod schema under src/lib/contracts/portal/, and the spec follows.

Base URL

Swiss HR Easy is single-tenant, so each customer install serves the contract from its own host:
There is no shared API gateway and no cross-tenant endpoint.

Getting started

Authentication

Sessions, SSO, and why the mobile client is SSO-only.

Conventions

Response envelopes, error shapes, pagination, and idempotency.
The endpoint reference is generated from the specification and lives under Employee portal API in this tab.