Skip to main content

How to Get Started with the Flexi 3/6 API - Building the URL Address

How to Build a URL for the ABRA Flexi REST API: Address Structure, Properties, Filtering, Detail Levels, Pagination, and PDF Export

Written by Petr Pech

The URL is at the heart of every REST API call. It determines which company and record type you're accessing, which record you're interested in, and in what format you want to receive it. In this installment, we'll walk through how to build a URL and how to add parameters for filtering, pagination, and level of detail.

ℹ️ The sample addresses in this article point to our public demo instance. If your browser asks you to log in, use the username winstrom and password winstrom. In your own addresses, replace demo.flexibee.eu with your server's address and demo with your company identifier.


URL Structure

The basic form of the address looks like this:

/c/<identifikátor firmy>/<evidence>/<ID záznamu>.<výstupní formát>
  • company identifier uniquely identifies the company you're accessing. You'll find it in the web interface address after logging in; for more, see the article on company identifier.

  • record type is the type of agenda, for example address book, order, or invoice. You can list the complete list of record types; use the value of the evidencePath element in the address.

  • record ID is the identifier of a specific record. In addition to the internal number, you can also use a code, external ID, or EAN — see record identifiers.

  • output format determines the shape of the response, for example xml or json. If you don't specify it, the server follows the Accept header.

Example

  • demo.flexibee.eu is the server address, in this case our demo instance

  • demo is the company identifier

  • faktura-vydana is the record type for issued invoices

  • 15 is the record identifier; you'll find it in the output in the id element or in the application after adding the ID column

  • xml is the data format

This address therefore displays, in XML format, the issued invoice with ID 15 in the company demo.

Address for Your Own Server and Local Installation

For a self-hosted installation, only the server address and port change — the rest of the address remains the same. The default port for the ABRA Flexi server is 5434.

https://localhost:5434/c/testovaci/faktura-vydana/15.xml

If you're accessing the server over a network, use its address or hostname. The specific port and its external accessibility are handled by your network administrator.

https://vas-server.cz:5434/c/testovaci/faktura-vydana/15.xml

💡 You'll find a complete overview of all supported address parts and parameters in the reference documentation on building URLs.


Overview of Record Type Attributes

For each record type, you can list all the attributes it contains. This overview also takes into account your access rights and license.

/c/<identifikátor firmy>/<evidence>/properties

The attribute names from this overview are then used as elements in your XML or JSON request. For example, the kod attribute holds the code, i.e., the record's abbreviation.

Legend for the columns in the properties overview:

Symbol

Meaning

*

Required field. Internal dependencies may mean you don't have to fill in a required field.

rw

The field is writable.

ro

The field is read-only.

1

The field is part of the id detail level.

2

The field is part of the summary detail level.

3

The field is part of the full detail level.

S

The field can be used for sorting and filtering.


Filtering Records

If you don't specify a record identifier, the server returns a listing of the entire record type. This listing can be narrowed down with a filter, written in parentheses:

/c/<identifikátor firmy>/<evidence>/(<filtr>)

The example below filters all issued invoices whose code starts with VF:

/c/demo/faktura-vydana/(kod begins 'VF')

Conditions can be combined using the logical operators and, or, and not.

Example 1 returns invoices whose code starts with VF and ends with 2018:

/c/demo/faktura-vydana/(kod begins 'VF' and kod ends '2018')

Example 2 returns invoices whose code starts with FV or VF:

/c/demo/faktura-vydana/(kod begins 'FV' or kod begins 'VF')

⚠️ Filters must be properly encoded in the URL. Browsers don't allow spaces, parentheses, and apostrophes to be entered directly, which is why you'll see characters like %20 in the address. The easiest approach is to write the filter unencoded in your browser and then copy the address — the browser will encode it for you automatically.

Besides comparisons, you can also filter by tags, nested relations, or placement within a tree structure. For a complete overview of operators and placeholder values such as now(), see the article on filtering records. The listing can also be sorted using the order parameter.


Level of Detail

For performance reasons, not all recorded data for a record is displayed by default. You can control the scope of data using the detail parameter:

💡 For integrations, it's worth using detail=custom and listing only the fields you actually need. A smaller response means faster response times and lower server load. Read more in the article on levels of detail.


Pagination

For performance reasons, the list of records is returned in pages. This behavior is controlled by the following parameters:

Parameter

Meaning

limit

Maximum number of records per page. If not specified, 20 records are returned. A value of 0 returns all records with no limit.

start

How many records to skip. It's independent of the limit parameter.

add-row-count

Adds the total number of records in the record type to the output, taking filters into account.

Example: faktura-vydana.xml?limit=25&start=10 skips the first 10 records and returns the next 25, i.e., records 11 through 35.

For more details, see the article on pagination.


Sums and Sub-records

If you're not interested in individual records but in their sum, use summation:

/c/<identifikátor firmy>/<evidence>/$sum

Summation can also be combined with a filter:

/c/<identifikátor firmy>/<evidence>/(<filtr>)/$sum

Each record type can have sub-records, i.e., relations. Examples include invoice line items or address book contacts. You can retrieve their overview as follows:

/c/<identifikátor firmy>/<evidence>/relations

If you want to list relation data directly with the record, add the relations parameter. The following address lists all relations to the invoice with ID 15:


Exporting Print Reports to PDF

For each record type, you can list the supported print reports:

/c/<identifikátor firmy>/<evidence>/reports

You can then export a specific report to PDF using the report-name parameter. The following address prints the delivery note for the invoice with ID 1:

/c/firma/faktura-vydana/1.pdf?report-name=dodaciList

You can export custom user reports the same way — just specify their code. The following address prints the customized report with the code stitky for the price list item with ID 15:

/c/firma/cenik/15.pdf?report-name=stitky

For more on export options, including choosing the report language and electronic signatures, see the article exporting print reports.


Other Parts of This Series

Did this answer your question?