The ABRA Flexi REST API can export and import data in a wide range of formats. In this article, we'll go through how the format is determined and which one suits which purpose.
How the format is determined
You can choose the format in two ways: by the extension in the address, or by the HTTP request header. Which one takes precedence depends on the direction of the transfer.
For output, the address extension (
.xml,.json, …) takes precedence over theAcceptheader. If you don't specify an extension, the server follows the header.For input, the format is determined primarily by the
Content-Typeheader.
⚠️ Always make sure the address extension and the format of the data being sent match. Sending XML to an address ending in .json will result in an error.
Overview of supported formats
Format | Purpose | Extension | Content-Type | Import |
XML | Machine-readable structure, the most common format for integrations |
|
| yes |
JSON | Machine-readable structure, suitable for web applications and scripts |
|
| yes |
CSV | Tabular output for further processing |
|
| yes |
XLS | Tabular output for Excel |
|
| yes, from the Business plan |
DBF | Database output in dBase format |
|
| yes |
ISDOC | Czech standard for electronic invoicing |
|
| yes |
EDI | Electronic data interchange in INHOUSE format |
|
| yes |
Print report, same as in the application |
|
| no | |
HTML | Displaying data directly in the browser |
|
| no |
vCard | Exporting an address book as an electronic business card |
|
| no |
iCalendar | Exporting events or invoice due dates to a calendar |
|
| no |
⚠️ Importing in XLS format is available from the Business license plan. This format cannot be used for import with the Basic plan.
Importing invoices in ISDOC format
ISDOC is the most commonly used format among customers besides XML and JSON, as it's the Czech standard for electronic invoicing. When importing, you need to fill in two parameters:
typDoklis the invoice type and is requiredtypUcOpis the accounting template and is optional
Both parameters are written as record identifiers, most commonly in the form code:.
POST /c/firma/faktura-prijata.isdoc?typDokl=code:FAKTURA&typUcOp=code:NÁKUP SLUŽBY
Encoding and separator for text formats
For CSV and DBF formats, you can control the encoding and column separator using parameters in the address. This is useful when the file is processed by an older system that doesn't support UTF-8.
?encoding=iso-8859-2sets the file encoding?delimeter=;sets the column separator
💡 You can find a complete overview of formats, including additional supported variants, in the article on supported formats. For printing to PDF, check out exporting print reports.
