Skip to main content

How to Get Started with the Flexi 5/6 API - Supported Formats

Overview of the formats in which the ABRA Flexi REST API exports and imports data, including ISDOC, and how the output format is determined.

Written by Petr Pech

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 the Accept header. If you don't specify an extension, the server follows the header.

  • For input, the format is determined primarily by the Content-Type header.

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

.xml

application/xml

yes

JSON

Machine-readable structure, suitable for web applications and scripts

.json, .js

application/json

yes

CSV

Tabular output for further processing

.csv

text/csv

yes

XLS

Tabular output for Excel

.xls

application/ms-excel

yes, from the Business plan

DBF

Database output in dBase format

.dbf

application/dbf

yes

ISDOC

Czech standard for electronic invoicing

.isdoc, .isdocx

application/x-isdoc

yes

EDI

Electronic data interchange in INHOUSE format

.edi

application/x-edi-inhouse

yes

PDF

Print report, same as in the application

.pdf

application/pdf

no

HTML

Displaying data directly in the browser

.html

text/html

no

vCard

Exporting an address book as an electronic business card

.vcf

text/vcard

no

iCalendar

Exporting events or invoice due dates to a calendar

.ical

text/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:

  • typDokl is the invoice type and is required

  • typUcOp is 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-2 sets 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.


Other parts of the series

Did this answer your question?