Just as in the application, it is possible to retrieve the VAT Control Statement in XML (PDF) format via the Flexi API as well.
Calling Method
You can use the HTTP method: GET.
The service is available at: /c/{firma}/kontrolni-hlaseni.{pripona}, where {firma} is the database company identifier.
The following output formats are supported: XML or PDF.
Parameters
For successful generation of the VAT Control Statement, the following details must be filled in under company settings:
Details > Regional Tax Office
Company > VAT Number
One of the following values:
Company > Registered Address/Permanent Residence > Email
Company > Registered Address/Permanent Residence > Data Mailbox
Details - Representative - Name of Legal Entity
Details - Representative - Registration Number of Legal Entity
The service has 5 parameters; the order of parameters does not matter:
obdobi- optional, the period for which the VAT Control Statement should be generated. The period can be specified as a particular month of the year in the formatyyyyMM(e.g.202310= October 2023) or as a specific quarter of the yearyyyy'Q'M(e.g.2023Q2= second quarter of 2023). If not specified, the current year and month will be used.druh- optional, the type of VAT Control Statement submission. Possible values:B- regular,O- corrective,N- supplementary,E- supplementary/corrective.If not specified, the default value is
B- regular.
dodatecneOproti- required if a Slovak supplementary return is being submitted.Integer: ID of the return being correctedThe return being corrected must be for the same period as the new return.
A list of saved returns can be retrieved at
GET https://demo.flexibee.eu/c/demo/ulozene-priznani-kon-vyk-dph/(rok={rok} AND mesic={mesic} AND ctvrtleti={ctvrtleti}).xml
vyzvaOdpoved- optional, response to a notice. Possible values:B- I have no obligation to submit a VAT Control Statement (zero VAT Control Statement),O- I confirm the correctness of the last submitted VAT Control Statement.If not specified, the default value is empty, i.e. no response.
cisloJednaciVyzvy- required if the parametervyzvaOdpovedis filled in or if this is a supplementary or corrective submission: The notice reference number must match the pattern: 12345678/12/1234-12345-123456datumZjisteni- required if this is a supplementary or corrective submission:The date on which the reasons for submitting the supplementary VAT Control Statement were identified. The date can be entered in the format
dd.MM.yyyyoryyyy-MM-dd.
stat- optional: Possible values CZ, SK. If not specified, the country of legislation will be used.ulozit- optional: Whether the return should be saved. If not specified, the return will not be saved.
Available Submission Types
Available submission types for the VAT Control Statement in XML format:
The result is general form-data in the following format:
<?xml version="1.0" ?>
<form-data>
<statyDph>
<statDph>
<kod>CZ</kod>
<nazev>Česká republika</nazev>
<nazevA>Czech republic</nazevA>
<nazevB></nazevB>
<nazevC></nazevC>
<dostupneDruhy>
<druh>
<kod>B</kod>
<nazev>řádné</nazev>
<povinneParametry></povinneParametry>
</druh>
<druh>
<kod>O</kod>
<nazev>opravné</nazev>
<povinneParametry>
<povinnyParametr>datumZjisteni</povinnyParametr>
</povinneParametry>
</druh>
<druh>
<kod>N</kod>
<nazev>následné</nazev>
<povinneParametry>
<povinnyParametr>datumZjisteni</povinnyParametr>
</povinneParametry>
</druh>
<druh>
<kod>E</kod>
<nazev>následné/opravné</nazev>
<povinneParametry></povinneParametry>
</druh>
</dostupneDruhy>
</statDph>
</statyDph>
</form-data>
Example Call
A complete minimal call looks as follows:
Or for PDF:
Call Result
The result is the VAT Control Statement in XML structure for the tax portal:
<Pisemnost>
<DPHKH1>
<VetaD ctvrt="2" d_poddp="21.12.2023" dokument="KH1" k_uladis="DPH" khdph_forma="B" rok="2023"/>
<VetaP c_orient="1180" c_pop="18" c_ufo="460" dic="25719122" email="podporaflexi@abra.eu" naz_obce="Plzeň" psc="30100" sest_jmeno="Tomáš" sest_prijmeni="Nový" sest_telef="+420724444999" stat="ČESKÁ REPUBLIKA" typ_ds="P" ulice="Lochotínská" zkrobchjm="ABRA Software a.s."/>
<VetaA5 dan1="0.00" dan2="0.00" dan3="0.00" zakl_dane1="0.00" zakl_dane2="0.00" zakl_dane3="0.00"/>
<VetaB3 dan1="0.00" dan2="0.00" dan3="0.00" zakl_dane1="0.00" zakl_dane2="0.00" zakl_dane3="0.00"/>
<VetaC celk_zd_a2="0.00" obrat23="0.00" obrat5="0.00" pln23="0.00" pln5="0.00" pln_rez_pren="0.00" rez_pren23="0.00" rez_pren5="0.00"/>
</DPHKH1>
</Pisemnost>
Or the complete PDF file when called with the extension .pdf
Examples of Invalid Calls
If the service executes successfully, HTTP status 200 is returned along with the response body in the requested XML or PDF format.
In the case of invalid calls, the response body contains a description of the error.
1. Invalid company settings
The error result is an HTTP Status 400 Bad Request response with an error description:
<?xml version="1.0" ?>
<winstrom version="1.0">
<success>false</success>
<message>V nastavení firmy chybí tyto údaje:
Upřesnění - Krajský finanční úřad
Jedna z hodnot:
- Firma - Sídlo/Trv. bydliště - E-mail
- Firma - Sídlo/Trv. bydliště - Datová schránka
Upřesnění - Zástupce - Název právnické osoby
Upřesnění - Zástupce - IČO právnické osoby</message>
</winstrom>
2. Invalid parameter input
The error result is an HTTP Status 400 Bad Request response with an error description:
<winstrom version="1.0">
<success>false</success>
<message>K provedení operace je vyžadován parametr 'cisloJednaciVyzvy'</message>
</winstrom>
<winstrom version="1.0">
<success>false</success>
<message>Parametr 'vyzvaOdpoved' má nepodporovanou hodnotu! Zvolte jednu z následujících možností: [B, P]</message>
</winstrom>
3. Invalid period (invalid optional parameter)
The error result is an HTTP Status 200 OK response with the following result:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Pisemnost>
<DPHKH1>
<VetaD d_poddp="21.12.2023" dokument="KH1" k_uladis="DPH" khdph_forma="B" mesic="12" rok="2023"/>
<VetaP c_orient="1180" c_pop="18" c_ufo="460" dic="25719122" email="podporaflexi@abra.eu" naz_obce="Plzeň" psc="30100" sest_jmeno="Tomáš" sest_prijmeni="Nový" sest_telef="+420724444999" stat="ČESKÁ REPUBLIKA" typ_ds="P" ulice="Lochotínská" zkrobchjm="ABRA Software a.s."/>
<VetaA5 dan1="0.00" dan2="0.00" dan3="0.00" zakl_dane1="0.00" zakl_dane2="0.00" zakl_dane3="0.00"/>
<VetaB3 dan1="0.00" dan2="0.00" dan3="0.00" zakl_dane1="0.00" zakl_dane2="0.00" zakl_dane3="0.00"/>
<VetaC celk_zd_a2="0.00" obrat23="0.00" obrat5="0.00" pln23="0.00" pln5="0.00" pln_rez_pren="0.00" rez_pren23="0.00" rez_pren5="0.00"/>
</DPHKH1>
</Pisemnost>
¨
Note: since the parameter is optional, year = 2123 and the 5th quarter, the call will still succeed and the current year and month will be returned.
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.
