Skip to main content

VAT Summary Report - REST API

How to create a summary report using the Flexi REST API

Written by Petr Pech

The EU Sales List (VAT recapitulative statement) can be obtained in both XML and PDF not only in the application, but also via the ABRA Flexi REST API.


Method of calling

The service is available via the method GET at the address /c/{firma}/souhrnne-hlaseni.{přípona}, where {firma} is the database company identifier. The supported output formats are xml and pdf.

ℹ️ A call with the pdf extension will be redirected by the server (HTTP 307) to the address /c/{firma}/souhrnne-hlaseni-dph.pdf. If the client does not follow redirects automatically, you must follow it manually, otherwise you will not get the PDF.


Parameters

The order of parameters does not matter.

Parameter

Required

Meaning

rok

required

The year for which the EU Sales List should be generated, in the form ?rok=2024.

mesic

required, if ctvrtleti is not specified

The month number in the form ?mesic=1. Possible values are 1 to 12.

ctvrtleti

required, if mesic is not specified

The quarter number in the form ?ctvrtleti=1. Possible values are 1 to 4.

stat

optional

The country for which the EU Sales List should be processed, in the form ?stat=CZ. Possible values are CZ and SK. If not specified, the company's legislation country is used.


Sample calls

The simplest complete call looks as follows:

GET https://demo.flexibee.eu/c/demo/souhrnne-hlaseni.xml?mesic=1&rok=2024

Or for PDF:

GET https://demo.flexibee.eu/c/demo/souhrnne-hlaseni.pdf?mesic=1&rok=2024


Result of the call

If the service is executed successfully, an HTTP status 200 is returned along with a body in the requested format. For Czech legislation, this is an XML structure for the tax portal (values are illustrative):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Pisemnost nazevSW="ABRA Flexi" verzeSW="2026.5.2">
<DPHSHV verzePis="01.01">
<VetaD d_poddp="15.02.2024" dokument="SHV" k_uladis="DPH" mesic="1" rok="2024" shvies_forma="R"/>
<VetaP c_pop="1" c_pracufo="2301" c_ufo="454" 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."/>
<VetaR c_rad="1" c_vat="SK1234567890" k_pln_eu="0" k_stat="SK" pln_hodnota="25620" pln_pocet="1" por_c_stran="1"/>
</DPHSHV>
</Pisemnost>

For Slovak legislation, the output has a different structure:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dokument>
<hlavicka>
<identifikacneCislo>
<kodStatu>SK</kodStatu>
<dic>12345678</dic>
</identifikacneCislo>
<danovyUrad/>
<druhSV>
<riadny>1</riadny>
<opravny>0</opravny>
<dodatocny>0</dodatocny>
</druhSV>
<obdobie>
<mesiac>1</mesiac>
<stvrtrok/>
<rok>2024</rok>
</obdobie>
<obchodneMeno>
<riadok>Vzorová firma s.r.o.</riadok>
</obchodneMeno>
<celkovaHodnota>0</celkovaHodnota>
</hlavicka>
<telo>
<strana>
<zaznam>
<kodStatu/>
<idCislo/>
<hodnota/>
<kod/>
</zaznam>
</strana>
</telo>
</dokument>

When calling with the .pdf extension, the result is the complete PDF file of the EU Sales List.


Data of the generated statement

The actual data of the generated EU Sales List — i.e., the individual rows, not the document — is available at the address /c/{firma}/souhrnne-hlaseni-dph.{přípona} in the formats json and xml. The same period parameters are required, i.e., rok and mesic or ctvrtleti; stat can also optionally be specified. Filtering can also be used.

GET https://demo.flexibee.eu/c/demo/souhrnne-hlaseni-dph.json?rok=2024&ctvrtleti=2


Examples of invalid calls

For invalid calls, the status returned is 4xx or 5xx, and the response body contains a description of the error.

1. Invalid period specification

GET https://demo.flexibee.eu/c/demo/souhrnne-hlaseni.xml?ctvrtleti=5&rok=2024

The result is an HTTP status 400 Bad Request response with an 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 specification

GET https://demo.flexibee.eu/c/demo/souhrnne-hlaseni.xml?ctvrtleti=1&rok=2024&stat=CS

The result is an HTTP status 400 Bad Request response with the code unsupported_param_value_exception:

<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>

3. Not all required parameters specified

GET https://demo.flexibee.eu/c/demo/souhrnne-hlaseni.pdf?rok=2024

The result is an HTTP status 400 Bad Request response with an error description:

<winstrom version="1.0">
<success>false</success>
<message>Není zadáno období pro zpracování souhrnného hlášení.</message>
</winstrom>


FAQ

How do I create an EU Sales List in the application?

You can find the procedure in the article EU Sales List.

How do I enter an invoice so it is reflected in the EU Sales List?

The conditions are described in the article Reporting in the EU Sales List, and for Slovak legislation in Conditions for Reporting an Invoice in the EU Sales List in Slovakia.

Why do the values in the statement and in the tax return differ?

Why isn't the customer's VAT ID and country included in the XML?

Why does the PDF show fewer rows?


Related

Did this answer your question?