Skip to main content

VAT Return - REST API

How to get a VAT return in XML or PDF via the API?

Written by Petr Pech

The VAT return can be obtained in XML and PDF formats not only in the application, but also via the ABRA Flexi REST API.


Method of calling

The VAT return is available at /c/{firma}/priznani-dph.{přípona}, where {firma} is the database company identifier. The supported output formats are xml and pdf.

You can use the HTTP method GET as well as POST. Parameters are specified in the URL query.

ℹ️ The VAT return output is available only for Czech and Slovak legislation. An overview of supported countries is returned by the form-data in the supportXml and supportPdf flags.


Parameters

Parameter

Requirement

Meaning

rok

required

The year for which you are generating the return (e.g. 2024).

mesic

required

The month for which the return is generated (e.g. 1, 3). For quarterly filings, use the same parameter to specify the quarter Q1, Q2, Q3, or Q4.

koeficient

optional

Coefficient for calculating the proportional part of the tax deduction (§ 76). Default values: Czech Republic 100, Slovakia 0.

druh

optional

Type of VAT return, defaults to radne. Czech Republic: radne, radneOpravne, dodatecne, dodatecneOpravne. Slovakia: radne, opravne, dodatecne.

dodatecneOproti

required for additional returns

Reference to the VAT return lines where previous returns are stored, using the ID of the previous return.

duvodyProDodatecne

for additional returns in CZ

Reasons for filing an additional return. For Czech legislation, the form-data lists it among the required parameters for the dodatecne and dodatecneOpravne types.

datumZjisteni

optional

Date the changes were discovered for additional returns, in the yyyy-MM-dd format.

vyporadaciKoeficient

optional

Settlement coefficient. The program does not recalculate it; it must be calculated and entered manually.

zmenaOdpoctu

optional

Difference between the calculated and applied deduction (line 53).

danKUhrade

optional

Whole number, tax due for line 38. Only for the dodatecne return type.

kodZdanObd

optional

Tax period code (text).

ulozit

optional

true / false — whether the generated return should be saved to the database. The default is false.

report-name

optional

Report name, only for the PDF format (e.g. priznaniDPH2026$$SUM). A non-existent name returns 400.

stat

optional

Values CZ and SK. If not specified, the company's legislation country is used.

You can find the ID of the previous return for the dodatecneOproti parameter in the /radek-priznani-dph record. To find a specific previous return, you can use filtering:

/radek-priznani-dph/((rok eq "2024") and ((mesic eq "8") and ((clenDph is null) and (typSzbDphK is null))))

For quarterly filings, use ctvrtleti eq "Q3" instead of the month in the filter.


Available return types

The available return types, supported formats, and available reports for individual countries are returned by /c/{firma}/priznani-dph/form-data.xml:

GET https://demo.flexibee.eu/c/demo/priznani-dph/form-data.xml

The result is form-data, whose abbreviated form for Czech legislation looks like this:

<?xml version="1.0" ?>
<form-data>
<statyDph>
<statDph>
<dostupneReporty>
<report>
<reportId>priznaniDPH2026$$SUM</reportId>
<reportName>Přiznání DPH vzor č. 26 (od 01.01.2026)</reportName>
<isDefault>true</isDefault>
<statCodes>CZ</statCodes>
</report>
</dostupneReporty>
<parametry>
<zalohovyKoeficient>100.0</zalohovyKoeficient>
</parametry>
<kod>CZ</kod>
<nazev>Česká republika</nazev>
<supportXml>true</supportXml>
<supportPdf>true</supportPdf>
<dostupneDruhy>
<druh>
<kod>radne</kod>
<nazev>Řádné</nazev>
<povinneParametry>
<povinnyParametr>rok</povinnyParametr>
<povinnyParametr>mesic</povinnyParametr>
</povinneParametry>
</druh>
<druh>
<kod>dodatecne</kod>
<nazev>Dodatečné</nazev>
<povinneParametry>
<povinnyParametr>rok</povinnyParametr>
<povinnyParametr>mesic</povinnyParametr>
<povinnyParametr>dodatecneOproti</povinnyParametr>
<povinnyParametr>duvodyProDodatecne</povinnyParametr>
</povinneParametry>
</druh>
</dostupneDruhy>
</statDph>
</statyDph>
</form-data>


Sample calls

1. Regular VAT return in PDF for January 2024

GET https://demo.flexibee.eu/c/demo/priznani-dph.pdf?koeficient=100&rok=2024&mesic=1

The output is a PDF file of the return:

2. Regular VAT return in XML for January 2024

GET https://demo.flexibee.eu/c/demo/priznani-dph.xml?koeficient=100&rok=2024&mesic=1

The output is the XML document for the tax authority (values are illustrative):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Pisemnost nazevSW="ABRA Flexi" verzeSW="2026.5.2">
<DPHDP3 verzePis="02.01.03">
<VetaD c_okec="" d_poddp="15.02.2024" dapdph_forma="B" dokument="DP3" k_uladis="DPH" mesic="1" rok="2024" trans="A" typ_platce="P"/>
<VetaP c_pop="1" c_pracufo="2301" dic="CZ12345678" naz_obce="Praha" opr_postaveni="jednatel" psc="10000" stat="ČESKÁ REPUBLIKA" typ_ds="P" ulice="Ulice 1" zkrobchjm="Vzorová firma s.r.o."/>
<Veta1 dan23="0.0" dan5="0.0" obrat23="0.0" obrat5="0.0"/>
<Veta2 dod_zb="0.0" pln_ost="0.0" pln_sluzby="0.0" pln_vyvoz="0.0"/>
<Veta3 dov_osv="0.0" opr_dluz="0.0" opr_verit="0.0"/>
<Veta4 odp_sum_kr="0.0" odp_sum_nar="0.0" pln23="0.0" pln5="0.0"/>
<Veta5 koef_p20_nov="0.00" odp_uprav_kf="0.0" pln_nkf="0.0"/>
<Veta6 dan_vrac="0.0" dan_zocelk="0.0" dano="0.0" odp_zocelk="0.0"/>
</DPHDP3>
</Pisemnost>

3. Slovak VAT return in XML for January 2024

GET https://demo.flexibee.eu/c/demo/priznani-dph.xml?koeficient=0&rok=2024&mesic=1&stat=SK

The Slovak return has a different XML structure (values are illustrative):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dokument xsi:noNamespaceSchemaLocation="universal.xsd">
<hlavicka>
<identifikacneCislo>
<kodStatu>SK</kodStatu>
<cislo>12345678</cislo>
</identifikacneCislo>
<typDP>
<rdp>1</rdp>
<odp>0</odp>
<ddp>0</ddp>
</typDP>
<zdanObd>
<mesiac>1</mesiac>
<stvrtrok/>
<rok>2024</rok>
</zdanObd>
</hlavicka>
<telo>
<r01>0.00</r01>
<r02>0.00</r02>
</telo>
</dokument>


Result of the call

To determine whether the service was executed successfully, you can check the HTTP status of the response. On success, the status 200 is returned along with a document in the selected format (XML or PDF); on failure, the status 4xx or 5xx is returned along with a message explaining the reason for the failure.


Examples of invalid calls

1. Unsupported value for the type parameter

GET https://demo.flexibee.eu/c/demo/priznani-dph.xml?koeficient=0&rok=2024&mesic=1&druh=opravny

The response is 400 Bad Request with an error description and code unsupported_param_value_exception:

<winstrom version="1.0">
<success>false</success>
<message>Parametr 'druh' má nepodporovanou hodnotu! Zvolte jednu z následujících možností: [radne, radneOpravne, dodatecne, dodatecneOpravne].</message>
</winstrom>

2. The original return is in a different period than the requested one

GET https://demo.flexibee.eu/c/demo/priznani-dph.xml?koeficient=100&rok=2024&mesic=1&druh=dodatecne&dodatecneOproti=15&datumZjisteni=2024-06-13

The response is 400 Bad Request:

<?xml version="1.0" ?>
<winstrom version="1.0">
<success>false</success>
<message>Opravované přiznání musí být ve stejném období (202301) jako opravné přiznání (202401).</message>
</winstrom>

3. Missing required parameter

GET https://demo.flexibee.eu/c/demo/priznani-dph.xml?koeficient=100&rok=2024&mesic=1&druh=dodatecne

The response is 400 Bad Request with the code missing_param_exception:

<winstrom version="1.0">
<success>false</success>
<message>K provedení operace je vyžadován parametr 'dodatecneOproti'</message>
</winstrom>

A missing rok or mesic returns 400 with the code parametrPovinny and the message Parametr rok je povinný., or respectively Parametr mesic je povinný.


Saved VAT return

Generated returns are saved to the ulozene-priznani-dph record. You can get a list of saved returns using filtering:

GET https://demo.flexibee.eu/c/demo/ulozene-priznani-dph/(rok eq 2024 and mesic eq 1).xml

Alternatively, using a /query query with parameters in the request body:

POST https://demo.flexibee.eu/c/demo/ulozene-priznani-dph/query

Request body:

{"rok":"2024","mesic":"1"}


FAQ

How is a VAT return created in the application?

The procedure is described in the article VAT Return; Slovak specifics are covered in SLOVAKIA - VAT Return.

How do I export the lines of saved returns?

This is done using the record described in the article VAT Return Lines - API.

Where can I find the code list for individual VAT lines?

The legislatively defined code list containing individual VAT lines is described in the article VAT Return Lines.


Related

Did this answer your question?