Just as in the application, it is possible to retrieve the VAT summary report in XML (or PDF) via the Flexi API.
Calling method
You can use the HTTP method: GET.
The service is available at the following address: /c/{firma}/souhrnne-hlaseni, where {firma} is the database company identifier.
The following output formats are supported: XML or PDF.
Parameters
The service has 3 parameters; the order of parameters does not matter:
rok(required), in the format?stat=2023mesic(required, unless the parameterctvrtletiis provided), in the format?mesic=1possible values are 1 – 12
ctvrtleti(required, unless the parametermesicis provided), in the format?ctvrtleti=1possible values are 1 – 4
stat(optional), in the format ?stat=CZpossible values are CZ or SK; if not specified, the country of the legislation is used
Example call
A complete, minimal call looks as follows:
Or for PDF:
Call result
The result is the VAT summary report in XML structure for the tax portal for CZ legislation:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Pisemnost nazevSW="ABRA Flexi" verzeSW="2023.5.6">
<DPHSHV verzePis="01.01">
<VetaD ctvrt="4" d_poddp="29.11.2023" dokument="SHV" k_uladis="DPH" rok="2023" shvies_forma="R"/>
<VetaP c_pop="277" c_pracufo="3104" c_ufo="462" dic="12345678" naz_obce="Praha" opr_postaveni="jednatel" psc="10100" stat="ČESKÁ REPUBLIKA" typ_ds="P" ulice="Jeremiášova" zkrobchjm="ABRA Software a.s."/>
</DPHSHV>
</Pisemnost>
Or similarly in a different structure for SK legislation:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dokument>
<hlavicka>
<identifikacneCislo>
<kodStatu>SK</kodStatu>
<dic>141414114</dic>
</identifikacneCislo>
<danovyUrad/>
<druhSV>
<riadny>1</riadny>
<opravny>0</opravny>
<dodatocny>0</dodatocny>
</druhSV>
<obdobie>
<mesiac>1</mesiac>
<stvrtrok/>
<rok>2023</rok>
</obdobie>
<obchodneMeno>
<riadok>ABRA SK s.r.o.</riadok>
atd.
Or the complete PDF file when calling with the extension .pdf
Examples of invalid calls
When the service is executed successfully, HTTP status 200 is returned along with a response body in the requested format (XML or PDF).
In the case of invalid calls, the response body contains an error description.
1. Invalid period input
The error result is an HTTP Status 400 Bad Request response with the following error description:
<winstrom version="1.0">
<success>false</success>
<message>Zadaný parametr čtvrtletí není v rozmezí povolených hodnot (1 - 4).</message>
</winstrom>
2. Invalid country input
The error result is an HTTP Status 400 Bad Request response with the following error description:
<winstrom version="1.0">
<success>false</success>
<message>Parametr 'stat' má nepodporovanou hodnotu! Zvolte jednu z následujících možností: [CZ, SK]</message>
</winstrom>
4. Missing required parameters
The error result is an HTTP Status 400 Bad Request response with the following error description:
<winstrom version="1.0">
<success>false</success>
<message>Není zadáno období pro zpracování souhrnného hlášení.</message>
</winstrom>
FAQ
Need help?
If you have any questions about the application, please contact us at podporaflexi@abra.eu or via the chat window in the bottom-right corner.
