Skip to main content

REST API accounting outputs

How to generate accounting outputs via the API?

Written by Petr Pech

Accounting outputs don't have to be generated only via the desktop application or web interface. Just like other data, you can retrieve them using the ABRA Flexi REST API.

In this article, you will find all the accounting outputs that can be generated via the REST API, including their addresses and parameters. The outputs are available in both PDF and XLSX (for print reports, see exporting print reports), and some of them are also available in XML, JSON, and CSV.


Overview of outputs

Output

Address

/c/{firma}/stav-uctu

/c/{firma}/ucetni-denik, /c/{firma}/pohyb-na-uctech

/c/{firma}/hlavni-kniha

/c/{firma}/obratova-predvaha

/c/{firma}/sestava + parameter report-name

/c/{firma}/rozvaha-vykaz.xml

/c/{firma}/vysledovka-po-uctech

/c/{firma}/rozvaha-po-uctech

/c/{firma}/vykaz-hospodareni

/c/{firma}/analyza-zakazky

/c/{firma}/po-splatnosti

/c/{firma}/souhrnne-hlaseni-dph

Where {firma} is the database company identifier. All outputs are retrieved using the method GET, and the desired format is selected via the file extension in the address.

⚠️ For these outputs, the server silently ignores unknown parameters and returns 200 OK — an incorrectly named parameter therefore does not result in an error, but in an output without the intended restriction. Be sure to copy parameter names exactly as shown in the tables below.


Account balances

Address: /c/{firma}/stav-uctu[.xml]. You can also use a level of detail and filtering.

If you need balances for an accounting period other than the current one, add the ucetniObdobi parameter to the URL, whose value is the abbreviation of the required accounting period. A second option is the idUcetniObdobi parameter, which allows the use of accounting period identifiers. If used, it takes precedence over the ucetniObdobi parameter.

Account balances can be broken down by cost center using groupByStredisko=true or by activity using groupByCinnost=true. Each row then contains the account balance for a specific cost center or activity.

Usage examples

URL

Description

/c/{firma}/stav-uctu

Account balances for the current accounting period

/c/{firma}/stav-uctu?idUcetniObdobi=3

Account balances for the accounting period with ID 3

/c/{firma}/stav-uctu?idUcetniObdobi=code:2016

Account balances for the accounting period with the abbreviation 2016

/c/{firma}/stav-uctu?ucetniObdobi=2016

Account balances for the accounting period with the abbreviation 2016

/c/{firma}/stav-uctu?groupByStredisko=true

Account balances broken down by cost center

/c/{firma}/stav-uctu?groupByCinnost=true

Account balances broken down by activity

/c/{firma}/stav-uctu?groupByStredisko=true&groupByCinnost=true

Account balances broken down by cost center and activity simultaneously

ℹ️ Account balances are covered in more detail in the article Account balances, and their recalculation in Recalculating account balances.


Accounting journal and account movements

Addresses: /c/{firma}/ucetni-denik, /c/{firma}/pohyb-na-uctech, and /c/{firma}/ucetni-denik-zjednoduseny. These are regular records, so you can use levels of detail, filtering, and pagination.

In all three records, you can use the postingState parameter to filter records by posting status:

Value

Description

posted

Returns only posted documents (zuctovano = true).

unposted

Returns only unposted documents (zuctovano = false).

all

Returns all documents regardless of posting status.

If you don't specify the parameter, the default behavior depends on the company's legislation: for DACH legislation (Germany, Austria, Switzerland), the default value is posted, while for other legislations (e.g., CZ, SK) it is all. The value is case-insensitive, so POSTED, Posted, and posted are all valid.

Call examples

GET https://demo.flexibee.eu/c/demo/ucetni-denik.json?postingState=posted
GET https://demo.flexibee.eu/c/demo/ucetni-denik.json?postingState=unposted
GET https://demo.flexibee.eu/c/demo/pohyb-na-uctech.json?postingState=all

If a different value is specified, the server returns 400 with code stavZauctovaniNeplatnaHodnota and a list of allowed values.


General ledger

Address: /c/{firma}/hlavni-kniha.{přípona}. The supported formats are pdf, xlsx, xml, json, and csv.

Parameters

  • ucetniObdobi — accounting period code in the form with code: (e.g., code:2024)

  • koncovyMesicRok — general ledger up to the specified month in the format MM/yyyy (e.g., 06/2024)

  • pocetMesicu — number of months in the general ledger

  • stredisko — object code from the /stredisko record, can be specified multiple times (e.g., stredisko=code:C&stredisko=code:B)

  • mena — currency code, can be specified multiple times (e.g., mena=code:CZK&mena=code:EUR)

  • filtrUcty — account codes, or their prefix or range, separated by commas (e.g., 311000,32,3-4)

  • ucet — account code, can be specified multiple times (e.g., ucet=code:211001&ucet=code:112001)

If no parameters are specified, the general ledger for the current accounting period is returned. The resulting period can be selected either via the ucetniObdobi parameter, or via a combination of the koncovyMesicRok and pocetMesicu parameters.

GET https://demo.flexibee.eu/c/demo/hlavni-kniha.pdf?ucetniObdobi=code:2024
GET https://demo.flexibee.eu/c/demo/hlavni-kniha.pdf?koncovyMesicRok=12/2024&pocetMesicu=12
GET https://demo.flexibee.eu/c/demo/hlavni-kniha.json?ucetniObdobi=code:2024&filtrUcty=311


Trial balance

Address: /c/{firma}/obratova-predvaha.{přípona}, typically pdf or xlsx. The parameters ucetniObdobi, koncovyMesicRok, pocetMesicu, stredisko, mena, filtrUcty, and ucet behave the same way as with the general ledger.

In addition, the report-name parameter can be used to select the report format:

  • Predvaha — Trial balance

  • PredvahaPort — Trial balance (portrait)

If you don't specify these parameters, the Trial balance (portrait) is generated for the current accounting period.

GET https://demo.flexibee.eu/c/demo/obratova-predvaha.pdf?report-name=Predvaha&ucetniObdobi=code:2024&koncovyMesicRok=06/2024&pocetMesicu=12&stredisko=code:C&mena=code:CZK&filtrUcty=3&ucet=code:211001

⚠️ For both the trial balance and the general ledger, the ucetniObdobi parameter requires the form with the code: prefix. A value without the prefix (e.g., ucetniObdobi=2024) results in the 404 error. For the financial statement report, it's the opposite — see Financial statement report.


Balance sheet

Address: /c/{firma}/sestava.{přípona}. The required report-name parameter specifies the required print report:

  • rozvaha$$SUM_ZAKL — Balance sheet in basic scope

  • rozvaha$$SUM — Balance sheet in simplified scope

  • rozvaha$$NES — Balance sheet in full scope

GET https://demo.flexibee.eu/c/demo/sestava.pdf?report-name=rozvaha$$SUM_ZAKL
GET https://demo.flexibee.eu/c/demo/sestava.pdf?report-name=rozvaha$$SUM
GET https://demo.flexibee.eu/c/demo/sestava.pdf?report-name=rozvaha$$NES

In all cases, the response is 200 OK and the requested document.

ℹ️ Without the report-name parameter, the /c/{firma}/sestava.pdf address returns an overview of accounting report definitions, not a specific statement. The recalculation and structure of reports is covered in the article Accounting reports in the API.


Profit and loss statement

Address: /c/{firma}/sestava.{přípona}, values of the report-name parameter:

  • vysledovka$$SUM — Profit and loss statement in simplified scope

  • vysledovka$$NES — Profit and loss statement in full scope

GET https://demo.flexibee.eu/c/demo/sestava.pdf?report-name=vysledovka$$SUM
GET https://demo.flexibee.eu/c/demo/sestava.pdf?report-name=vysledovka$$NES


Cash flow statement

Address: /c/{firma}/sestava.{přípona}, values of the report-name parameter:

  • cashFlow$$NES — Cash flow statement

  • cashFlow$$MIN_OBDOBI — Cash flow statement including data for the previous period

GET https://demo.flexibee.eu/c/demo/sestava.pdf?report-name=cashFlow$$NES
GET https://demo.flexibee.eu/c/demo/sestava.pdf?report-name=cashFlow$$MIN_OBDOBI


Balance sheet and profit and loss statement in XML

Address: /c/{firma}/rozvaha-vykaz.xml. The output is an XML document for the tax administration. The service requires three mandatory parameters — druh, rozsah, and typ (accounting entity):

Parameter

Values

druh

B — regular, O — regular corrective, D — additional, E — additional corrective

rozsah

P — full, Z — simplified

typ

M — micro, L — small, S — medium, V — large

Error for an uncalculated report

GET https://demo.flexibee.eu/c/demo/rozvaha-vykaz.xml?druh=B&rozsah=P&typ=M

The response is 400 Bad Request with code priznaniDanPoNeniVypocet:

<?xml version="1.0" ?>
<winstrom version="1.0">
<success>false</success>
<message>Pro vygenerování Rozvaha a výkaz zisku a ztráty v XML musí být vypočtené sestavy Rozvaha v plném rozsahu a Výkaz zisku a ztráty - druhové členění.</message>
</winstrom>

Successful call

After recalculating the necessary reports, the same call returns 200 OK and XML in the following structure (values are illustrative):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Pisemnost nazevSW="ABRA Flexi" verzeSW="2026.5.2">
<DPPDP8 verzePis="05.01.01">
<VetaD c_nace="582000" c_ufo_cil="451" dapdpp_forma="B" dokument="DP8" k_uladis="DPP" kat_uj="M" typ_dapdpp="A" typ_popldpp="1" typ_zo="A" uv_vyhl="500" zdobd_do="31.12.2024" zdobd_od="01.01.2024"/>
<VetaP c_pop="1" c_pracufo="2005" dic="CZ12345678" naz_obce="Praha" opr_jmeno="Jan" opr_postaveni="Jednatel" opr_prijmeni="Vzorový" psc="10000" ulice="Ulice 1" zkrobchjm="Vzorová firma s.r.o."/>
<VetaO/>
<VetaUA c_radku="1" kc_brutto="0" kc_korekce="0" kc_netto="0" kc_netto_min="0"/>
<VetaUB c_radku="1" kc_min="13817245.31" kc_sled="3788007.63"/>
<VetaUD c_radku="66" kc_min="0" kc_sled="0"/>
</DPPDP8>
</Pisemnost>


List of costs and revenues

Address: /c/{firma}/vysledovka-po-uctech.{přípona}.

Parameters

  • report-name — print report code (e.g., vysledovkaPoUctechStavy)

  • ucetniObdobi — accounting period code (e.g., 2024), defaults to the current accounting period

  • filtrUcty — account codes, or their prefix or range, separated by commas (e.g., 311000,32,3-4)

  • ucet — account code, can be specified multiple times (e.g., ucet=code:211001&ucet=code:112001)

  • danoveUcty — if not specified, both taxable and non-taxable accounts are included

  • stredisko — object code from the /stredisko record, can be specified multiple times

  • cinnost — object code from the /cinnost record, can be specified multiple times

  • mena — currency code, can be specified multiple times

  • groupByStrediskotrue / false, enables or disables breakdown by cost center

  • groupByCinnosttrue / false, enables or disables breakdown by activity

GET https://demo.flexibee.eu/c/demo/vysledovka-po-uctech.pdf?report-name=vysledovkaPoUctechStavy&ucetniObdobi=2024&mena=code:CZK&danoveUcty=true&stredisko=code:C

⚠️ If the company doesn't have the corresponding print report available, the service returns 406 with code neexistujeReport. In this case, the report definition is missing, not a call parameter.


List of assets and liabilities

Address: /c/{firma}/rozvaha-po-uctech.{přípona}. The parameters are identical to those of the list of costs and revenues, except without the danoveUcty parameter.

GET https://demo.flexibee.eu/c/demo/rozvaha-po-uctech.pdf?report-name=rozvahaPoUctechObraty&mena=code:CZK&filtrUcty=2,32,022001&ucet=code:082001&stredisko=code:C


Financial statement report

Address: /c/{firma}/vykaz-hospodareni.{přípona}.

Parameters

  • report-name — required value vykazHospodareni

  • mesicRok — required month and year in the format MM/yyyy (e.g., 04/2024)

  • ucetniObdobi — accounting period code without the code: prefix (e.g., 2024), defaults to the current accounting period

  • filtrUcty, ucet, stredisko, cinnost, mena — same meaning as with the list of costs and revenues

GET https://demo.flexibee.eu/c/demo/vykaz-hospodareni.pdf?report-name=vykazHospodareni&ucetniObdobi=2024&mesicRok=04/2024&mena=code:CZK

⚠️ The month specified in the mesicRok parameter must fall within the selected accounting period. If it doesn't match, the service returns 400 with a message stating that the values of the mesicRok and ucetniObdobi parameters are not mutually compatible. Without the report-name parameter, the call fails with the 406 error.


Accounting analysis of a project

Address: /c/{firma}/analyza-zakazky.{přípona}. Only the period parameters are required.

Parameters

  • uctovaniOd — required starting posting date in the format yyyy-MM-dd (e.g., 2024-01-01)

  • uctovaniDo — required ending posting date in the format yyyy-MM-dd (e.g., 2024-12-31)

  • report-name — if not specified, analyzaZakazky is used

  • zakazka — object code from the /zakazka record, can be specified multiple times (e.g., zakazka=code:ZAK1&zakazka=code:ZAK2)

  • stredisko — object code from the /stredisko record, can be specified multiple times (e.g., stredisko=code:C&stredisko=code:B)

  • cinnost — object code from the /cinnost record, can be specified multiple times (e.g., cinnost=code:1&cinnost=code:2)

GET https://demo.flexibee.eu/c/demo/analyza-zakazky.pdf?uctovaniOd=2024-01-01&uctovaniDo=2024-12-31&zakazka=code:ZAK1&zakazka=code:ZAK2

A missing period parameter results in the 400 error with code missing_param_exception, while a non-existent project, cost center, or activity results in the 404 error.


Unpaid overdue receivables and payables

Address: /c/{firma}/po-splatnosti.{přípona}.

Parameters

  • datumVypoctu — required report calculation date in the format yyyy-MM-dd (e.g., 2024-09-01)

  • report-name — if not specified, poSplatnosti is used; poSplatnostiDleDokladu is also available

  • modul — accounting module code, can be specified multiple times (e.g., modul=FAV&modul=PHL). Valid values are FAP, FAV, PHL, and ZAV.

  • rozmezi1 through rozmezi6 — due-date ranges in days, default values are 30, 60, 90, 180, 360, and 720

GET https://demo.flexibee.eu/c/demo/po-splatnosti.pdf?report-name=poSplatnostiDleDokladu&datumVypoctu=2024-09-01&rozmezi1=0&modul=FAP&modul=PHL

⚠️ If you specify the rozmezi1 through rozmezi6 parameters, each value must be equal to or greater than the previous one. Otherwise, the call fails with the 400 error. An invalid module code returns 404.


EC Sales List (VAT)

Address: /c/{firma}/souhrnne-hlaseni-dph.{přípona}.

Parameters

  • rok — return year (e.g., 2024), always required

  • ctvrtleti — for quarterly filings, values 1 through 4

  • mesic — for monthly filings, values 1 through 12

  • stat — the country for which the report should be processed. Values CZ and SK; if not specified, the country of the company's legislation is used.

A pair of period parameters must always be specified — either rok and ctvrtleti, or rok and mesic. rok alone results in the 400 error with code missing_param_exception.

GET https://demo.flexibee.eu/c/demo/souhrnne-hlaseni-dph.pdf?rok=2024&mesic=2&stat=CZ

ℹ️ The EC Sales List, including the XML output for the tax administration, is covered in detail in the article EC Sales List (VAT) - REST API.


Related

Did this answer your question?