Skip to main content

Export Print Reports (PDF / XLSX)

How to export a print report to PDF / XLS in the REST API?

Written by Lenka Haringerová

Print reports available in the application can also be obtained via the REST API, usually both for a specific record and for the entire list.

Building the URL

PDF

/c/<identifikátor firmy>/<evidence>.pdf
/c/<identifikátor firmy>/<evidence>/<ID záznamu>.pdf

XLS / XLSX

/c/<identifikátor firmy>/<evidence>.xlsx
/c/<identifikátor firmy>/<evidence>/<ID záznamu>.xlsx

The .xlsx extension returns the Office Open XML format, while the .xls extension returns the older Excel format. Both are supported for print reports.

You can select a specific report using the report-name parameter. If needed, you can also select the report language using the report-lang parameter. The supported languages are cs, sk, en, and de.

It is also possible to generate an electronically signed PDF. This feature has several limitations: it only works with certificates stored in ABRA Flexi, and exactly one certificate may be stored. You need to include the report-sign=true parameter in the URL. In the future, it will be possible to choose which of the stored certificates to use.


Example URL

PDF

/c/firma/faktura-vydana/1.pdf?report-name=dodaciList
/c/firma/faktura-vydana/1.pdf?report-name=dodaciList&report-lang=en
/c/firma/faktura-vydana/1.pdf?report-name=dodaciList&report-sign=true

XLS / XLSX

/c/firma/faktura-vydana/1.xlsx?report-name=dodaciList
/c/firma/faktura-vydana/1.xlsx?report-name=dodaciList&report-lang=en
/c/firma/faktura-vydana/1.xls?report-name=dodaciList

ℹ️ The report-sign parameter is only relevant for PDF output. It is ignored for spreadsheet outputs.

You can find an overview of the reports supported for a given record type at /c/<identifikátor firmy>/<evidence>/reports (e.g. for an invoice). The output can likewise be exported in XML or JSON format.

The output includes the following information:

  • reportId: the report identifier. It is passed as the report-name parameter when calling the report

  • reportName: the display name. It is shown in the current language (based on the browser/agent).

  • isDefault: is this the default report? I.e., the one selected when the quick button is pressed.

  • predvybranyPocet: some reports are overview-type, while others print a specific record. It takes the values 1 and N.

  • rozsiritelna: does the print report have an extended version?

  • sumovana: does the print report support summarization?


ISDOC PDF format

  • ABRA Flexi supports electronic invoices in the ISDOC.PDF format (an ISDOC document embedded in a PDF file):

    • All PDF invoice outputs that are not of the list type contain an embedded ISDOC by default

    • A PDF file with an embedded ISDOC can be used to import invoices from ISDOC

Did this answer your question?