Skip to main content

Payroll and HR via REST API

Payroll calculation via API does not work; people and employment relationships can be imported, including versioning

Written by Petr Pech

The actual payroll calculation cannot be performed via the REST API — the mzda record has import disabled. However, HR data can be managed via the API, and importing persons and employment relationships is now also described in the reference documentation.


What's possible via the API

Record type

Import

osoba, pracovni-pomer

Supported and documented — including versioning rules.

mzdova-slozka, stala-mzdova-slozka, nepritomnost

Import works, but is not documented.

mzda

Import disabled — payroll cannot be calculated or created via the API.

You can check the status of any record type in the importStatus field of the list of record types, see Importing records via the API.


Versioning of persons and employment relationships

Neither a person nor an employment relationship is stored as a single record, but as a series of time-valid versions defined by the platiOd and platiDo fields. An import with a new platiOd therefore:

  • finds the setting that overlaps with the new period and shortens it (sets platiDo to the day before the new platiOd),

  • creates a new version with values taken over from the previous one,

  • and only then writes the imported values into it.

<winstrom version="1.0">
<osoba>
<osbCis>123</osbCis>
<platiOd>2026-07-01</platiOd>
<prijmeni>Novotná</prijmeni>
</osoba>
</winstrom>

💡 The propsatDoBudoucna="true" attribute propagates the change to all future versions of the setting as well. The platiOd, platiDo, and password fields are not propagated.


Identifying records

A person is looked up sequentially by internal ID, personnel number (osbCis), birth number/national ID (rodCis), a combination of birth number and EČP, or ecp alone. An employment relationship is looked up by internal ID, kodCsszPP, or idPpv combined with platiOd.

Nested collections have a camelCase wrapper and hyphenated items — for example bankovniSpojeni / mzdy-bankovni-spojeni, pracovniPomery / pracovni-pomer, or staleMzdoveSlozky / stala-mzdova-slozka.

⚠️ Payroll is a legislatively sensitive area, and any data error will only show up in the paycheck. Always test procedures on a test company first and verify the result in the application.


Related articles

Did this answer your question?