Skip to main content

Export Print Reports (PDF / XLSX)

How do I 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.

A specific report can be selected using the report-name parameter. If needed, you can also select the language of the report using the report-lang parameter. Supported languages are cs, sk, en, and de.

It is also possible to generate a digitally signed PDF. This feature has several limitations: it only works with certificates stored in ABRA Flexi, and exactly one certificate must be stored. The report-sign=true parameter must be included in the URL. In the future, it will be possible to choose which stored certificate 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.

An overview of the reports supported for a given record type can be found at /c/<identifikátor firmy>/<evidence>/reports (e.g., for invoices). The output can also be exported in XML or JSON format.

The output includes the following information:

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

  • reportName: the user-facing name. It is displayed 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 can have the value 1 or N.

  • rozsiritelna: does an extended version of the print report exist?

  • sumovana: does the print report support summation?


ISDOC PDF Format

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

    • All invoice PDF outputs that are not of the list type implicitly include an embedded ISDOC

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

Did this answer your question?