Skip to main content

Accounting Outputs in REST API

How to Generate Accounting Outputs via API?

Written by Petr Pech

Accounting outputs do not need to be generated exclusively through the desktop application or web interface. Just like other data, you can retrieve them using the ABRA Flexi REST API.

The documentation contains all new accounting outputs with the option to generate them via the REST API. Accounting outputs can be generated in both PDF and XLS formats (including print reports, see documentation).

Account Balances

Address

.../c/{firma}/stav-uctu[.xml]

Parameters

If you need balances for an accounting period other than the current one, you must add the ucetniObdobi parameter to the URL. The value of this parameter is the code of the required accounting period. The resulting URL would look like, for example, .../c/{firma}/stav-uctu[.xml]?ucetniObdobi=2016.

Another way to retrieve account balances for an accounting period other than the current one is to add the idUcetniObdobi parameter. This parameter allows the use of accounting period identifiers. If this parameter is used, it takes precedence over the ucetniObdobi parameter.

Account Balance Breakdown

Account balances can be broken down by cost centers using the groupByStredisko=true parameter, or by activities using groupByCinnost=true. Each row will then contain the account balance for a specific cost center or activity.

Usage Examples

URL

Description

/c/{firma}/stav-uctu[.xml]

Account balances for the current accounting period

/c/{firma}/stav-uctu[.xml]?idUcetniObdobi=3

Account balances for the accounting period with ID 3

/c/{firma}/stav-uctu[.xml]?idUcetniObdobi=code:2016

Account balances for the accounting period with code 2016

/c/{firma}/stav-uctu[.xml]?ucetniObdobi=2016

Account balances for the accounting period with code 2016

/c/{firma}/stav-uctu[.xml]?groupByStredisko=true

Account balances broken down by cost centers

/c/{firma}/stav-uctu[.xml]?groupByCinnost=true

Account balances broken down by activities

/c/{firma}/stav-uctu[.xml]?groupByStredisko=true&groupByCinnost=true

Account balances broken down by both cost centers and activities simultaneously

VAT Recapitulative Statement

Address

/c/firma/souhrnne-hlaseni-dph.pdf

firma - replace with your company identifier

Parameters

Two period parameters are always required (either rok and ctvrtleti, or rok and mesic).

  • rok - year of the declaration (e.g. 2018)

  • ctvrtleti - for quarterly filing (values 1 to 4)

  • mesic - for monthly filing (values 1 to 12)

  • statId - country for processing the declaration (object ID from the /stat register); defaults to the country set in the company legislation settings

Examples

GET/c/firma/souhrnne-hlaseni-dph.pdf?rok=2018&mesic=2&statId=38

A 200 OK response will result in the generation of the corresponding PDF file.

Job Cost Analysis

Address

/c/firma/analyza-zakazky.pdf

firma - replace with your company identifier

Parameters

Only the period parameters (uctovaniOd and uctovaniDo) are required.

  • report-name - defaults to analyzaZakazky if the parameter is not specified

  • uctovaniOd - start date of the accounting period in "yyyy-MM-dd" format (e.g. 2017-01-01)

  • uctovaniDo - end date of the accounting period in "yyyy-MM-dd" format (e.g. 2017-12-31)

  • zakazka - "kod" (code) of an object from the /zakazka register (multiple parameters can be used — e.g. zakazka=code:ZAK1&zakazka=code=ZAK2)

  • stredisko - "kod" (code) of an object from the /stredisko register (multiple parameters can be used — e.g. stredisko=code:C&stredisko=code:B)

  • cinnost - "kod" (code) of an object from the /cinnost register (multiple parameters can be used — e.g. cinnost=code:1&cinnost=code:2)

Examples

GET/c/firma/analyza-zakazky.pdf?uctovaniOd=2017-01-01&uctovaniDo=2017-12-31&zakazkaId=4&zakazkaId=6

A 200 OK response will result in the generation of the corresponding PDF file.

Outstanding Receivables/Payables Past Due

Address

/c/firma/po-splatnosti.pdf

firma - replace with your company identifier

Parameters

If the rozmezi1-6 parameters are specified, each value must be equal to or greater than the preceding value. The datumVypoctu parameter is required.

  • report-name - defaults to poSplatnosti if the parameter is not specified

  • datumVypoctu - report calculation date in "yyyy-MM-dd" format (e.g. 2018-09-01)

  • modul - accounting module codes (FAP, FAV, PHL, ZAV); multiple parameters can be used — e.g. modul=FAV&modul=PHL

  • rozmezi1 - due date range in days (default 30)

  • rozmezi2 - due date range in days (default 60)

  • rozmezi3 - due date range in days (default 90)

  • rozmezi4 - due date range in days (default 180)

  • rozmezi5 - due date range in days (default 360)

  • rozmezi6 - due date range in days (default 720)

Examples

GET/c/firma/po-splatnosti.pdf?report-name=poSplatnostiDleDokladu&datumVypoctu=2018-09-01&rozmezi1=0&modul=FAP&modul=PHL

A 200 OK response will result in the generation of the corresponding PDF file.

Summary of Costs and Revenues

Address

/c/firma/vysledovka-po-uctech.pdf

firma - replace with your company identifier

Parameters

  • report-name

  • ucetniObdobi - accounting period code (e.g. 2018); defaults to the current accounting period

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

  • ucet - account code (multiple parameters can be used — e.g. ucet=code:211001&ucet=code:112001)

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

  • stredisko - "kod" (code) of an object from the /stredisko register (multiple parameters can be used — e.g. stredisko=code:C&stredisko=code:B)

  • cinnost - "kod" (code) of an object from the /cinnost register (multiple parameters can be used — e.g. cinnost=code:1&cinnost=code:2)

  • mena - currency code (multiple parameters can be used — e.g. mena=code:CZK&mena=code:EUR)

  • groupByStredisko - true / false (enables / disables breakdown by cost centers)

  • groupByCinnost - true / false (enables / disables breakdown by activities)

Examples

GET/c/firma/vysledovka-po-uctech.pdf?report-name=vysledovkaPoUctechStavy&ucetniObdobi=2018&mena=code:CZK&danoveUcty=true&stredisko=code:C

A 200 OK response will result in the generation of the corresponding PDF file.

Summary of Assets and Liabilities

Address

/c/firma/rozvaha-po-uctech.pdf

firma - replace with your company identifier

Parameters

  • report-name

  • ucetniObdobi - accounting period code (e.g. 2018); defaults to the current accounting period

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

  • ucet - account code (multiple parameters can be used — e.g. ucet=code:211001&ucet=code:112001)

  • stredisko - "kod" (code) of an object from the /stredisko register (multiple parameters can be used — e.g. stredisko=code:C&stredisko=code:B)

  • cinnost - "kod" (code) of an object from the /cinnost register (multiple parameters can be used — e.g. cinnost=code:1&cinnost=code:2)

  • mena - currency code (multiple parameters can be used — e.g. mena=code:CZK&mena=code:EUR)

  • groupByStredisko - true / false (enables / disables breakdown by cost centers)

  • groupByCinnost - true / false (enables / disables breakdown by activities)

Examples

GET/c/firma/rozvaha-po-uctech.pdf?report-name=rozvahaPoUctechObraty&mena=code:CZK&filtrUcty=2,32,022001&ucet=code:082001&stredisko=1

A 200 OK response will result in the generation of the corresponding PDF file.

Financial Performance Report

Address

/c/firma/vykaz-hospodareni.pdf

firma - replace with your company identifier

Parameters

  • report-name - value vykazHospodareni (required)

  • ucetniObdobi - accounting period code (e.g. 2018); defaults to the current accounting period

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

  • ucet - account code (multiple parameters can be used — e.g. ucet=code:211001&ucet=code:112001)

  • mesicRok - month and year in "mm/yyyy" format (month values 1–12, year corresponding to the accounting period) — e.g. 04/2018 (this parameter is required)

  • stredisko - "kod" (code) of an object from the /stredisko register (multiple parameters can be used — e.g. stredisko=code:C&stredisko=code:B)

  • cinnost - "kod" (code) of an object from the /cinnost register (multiple parameters can be used — e.g. cinnost=code:1&cinnost=code:2)

  • mena - currency code (multiple parameters can be used — e.g. mena=code:CZK&mena=code:EUR)

Examples

GET/c/firma/vykaz-hospodareni.pdf?report-name=vykazHospodareni&ucetniObdobi=2018&mesicRok=04/2018&mena=code:CZK

A 200 OK response will result in the generation of the corresponding PDF file.

Balance Sheet and Profit & Loss Statement in XML

Address

/c/firma/rozvaha-vykaz.xml

Parameters (required):

  • druh

  • rozsah

  • typ (of the accounting entity)

Examples

Error when the report cannot be calculated

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

400 Bad Request

<?xml version="1.0"?> <success>false</success>

<?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 od r. 2018 a Výkaz zisku a ztráty - druhové členění od r.2016.</message>
</winstrom>

Correct request

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

200 OK

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Pisemnost nazevSW="ABRA Flexi" verzeSW="2020.3.0.3-SNAPSHOT-20201118-r29393">
<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="30.06.2019" zdobd_od="01.07.2018"/>
<VetaP c_orient="7b" c_pop="1422" c_pracufo="2005" c_telef="371124340" dic="28019920" naz_obce="Praha 15" opr_jmeno="Stanislav" opr_postaveni="Jednatel" opr_prijmeni="Kurinec" psc="15500" ulice="Jeremiášova 1422/7b" zkrobchjm="ABRA Flexi s.r.o."/>
<VetaO/>
<VetaUA c_radku="1" kc_brutto="0" kc_korekce="0" kc_netto="0" kc_netto_min="0"/>
<VetaUA c_radku="2" kc_brutto="0" kc_korekce="0" kc_netto="0" kc_netto_min="0"/>
<VetaUA c_radku="3" 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"/>
<VetaUB c_radku="2" kc_min="0" kc_sled="0"/>
<VetaUB c_radku="3" kc_min="2987294.06" kc_sled="664191.27"/>
...

<VetaUD c_radku="64" kc_min="0" kc_sled="0"/>
<VetaUD c_radku="65" kc_min="0" kc_sled="0"/>
<VetaUD c_radku="66" kc_min="0" kc_sled="0"/>
</DPPDP8>
</Pisemnost>

Profit and Loss Statement

Address

/c/firma/sestava.pdf

Parameters

report-name

  • vysledovka$$SUM - Profit and Loss Statement in simplified scope

  • vysledovka$$NES - Profit and Loss Statement in full scope

Examples

A 200 OK response will result in the generation of the corresponding PDF file.

A 200 OK response will result in the generation of the corresponding PDF file.

Cash Flow Statement

Address

/c/firma/sestava.pdf

Parameters

report-name

  • cashFlow$$NES - Cash Flow Statement

  • cashFlow$$MIN_OBDOBI - Cash Flow Statement (including data for the prior period)

Examples

A 200 OK response will result in the generation of the corresponding PDF file.

A 200 OK response will result in the generation of the corresponding PDF file.

Balance Sheet

Address

/c/firma/sestava.pdf

Parameters

report-name

  • rozvaha$$SUM_ZAKL - Balance Sheet in basic scope

  • rozvaha$$SUM - Balance Sheet in simplified scope

  • rozvaha$$NES - Balance Sheet in full scope

Examples

A 200 OK response will result in the generation of the corresponding PDF file.

A 200 OK response will result in the generation of the corresponding PDF file.

A 200 OK response will result in the generation of the corresponding PDF file.

Trial Balance

(the same procedure also applies to the General Ledger output).

Address

/c/firma/obratova-predvaha.pdf

Parameters

If not specified, the default output is the Trial Balance (portrait orientation) for the current accounting period.

  • report-name

  • ucetniObdobi - accounting period code in the format with code: (e.g. code:2019)

  • koncovyMesicRok - turnovers up to the specified month in MM/yyyy "month/year" format (e.g. 06/2019 for turnovers up to June 2019)

  • pocetMesicu - number of months in the turnover

  • stredisko - "kod" (code) of an object from the /stredisko register (multiple parameters can be used — e.g. stredisko=code:C&stredisko=code:B)

  • mena - currency code in the format with code: (multiple parameters can be used — e.g. mena=code:CZK&mena=code:EUR)

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

  • ucet - account code (multiple parameters can be used — e.g. ucet=code:211001&ucet=code:112001)

Examples

A 200 OK response will result in the generation of the corresponding PDF file.

Did this answer your question?