Company settings has its own record /nastaveni, which you can find here.
In the application, you can find it in the section Company > Settings.
Retrieving company settings via API
Company settings are available in XML/JSON; basic information can be retrieved using the GET method:
The XML output looks as follows:
?xml version="1.0" encoding="utf-8"?>
<winstrom version="1.0">
<!-- Nastavení -->
<nastaveni>
<!-- ID (celé číslo) - -->
<id>1</id>
<!-- Poslední změna (datum a čas) - -->
<lastUpdate>2020-12-08T15:49:29.868+01:00</lastUpdate>
<!-- Změny budou platné od data (datum) - -->
<platiOdData></platiOdData>
<!-- Jméno (řetězec) - max. délka: 255 -->
<nazFirmy>Demo firma</nazFirmy>
...
</nastaveni>
<nastaveni>
<id>2</id>
<nazFirmy>Demo firma s.r.o.</nazFirmy>
...
</nastaveni>
</winstrom>
Settings are stored as individual versions, similar to the desktop application:
Settings can also be modified via API
When creating new settings valid from a specific date, it is necessary to specify the original settings that the new settings should be based on. Any information not provided will remain identical to the original settings:
The settings are submitted using the POST or PUT method:
Request body:
<winstrom version="1.0">
<nastaveni>
<puvodniNastaveni>
<id>1</id>
</puvodniNastaveni>
<platiOdData>2021-12-29</platiOdData>
<uliceNazev>Přestěhovaná</uliceNazev>
<!-- Další vlastnosti "nastaveni", které chceme uložit. -->
...
</nastaveni>
</winstrom>
Configuring the initial settings
If you want to create the so-called initial (first) company settings prior to an already existing initial configuration, you need to specify additional properties:
prvniNastaveni- a flag indicating that we are creating the first settings (valuetrue)prvniNastaveniPlatiDoData- the date until which these settings should be valid (this will automatically be set on the already existing initial settings asplatiOdData)
Again, use the POST or PUT method:
Request body:
<winstrom version="1.0">
<nastaveni>
<puvodniNastaveni>
<id>1</id>
<prvniNastaveni>true</prvniNastaveni>
<prvniNastaveniPlatiDoData>2021-12-22</prvniNastaveniPlatiDoData>
</puvodniNastaveni>
<!-- Další vlastnosti "nastaveni", které chceme uložit. -->
</nastaveni>
</winstrom>

