While entrepreneurs praise ABRA Flexi for its cloud availability and simplicity, it is particularly valued among IT professionals for its REST API interface. Through its well-documented API, the accounting system opens the door to third-party applications and integration with other data sources.
Vítězslav Dvořák from Vitex Software introduced us to his own PHP library FlexiPeeHP, which he created for the company Spoje.net. He wrote the library as a custom application for migrating data from a legacy accounting system to ABRA Flexi. As a Linux and open-source enthusiast, he published it — with the investor's agreement — under the GNU license on GitHub.
Dvořák himself describes FlexiPeeHP as "a PHP library for easy work with the Czech accounting system Flexi". He continues to actively develop the library, making it available to anyone looking for a tool to transfer data into Flexi.
The origins of the library
Spoje.net provides internet connectivity and other hosting services in the Prague 6 district. A growing client base brought large volumes of accounting data, which in turn required changes in their accounting software. A software upgrade was inevitable, so Spoje.net approached independent consultant and developer Vítězslav Dvořák with a request for a data migration solution to a modern accounting system. "When a customer wants an accounting system, I don't hesitate — I recommend ABRA Flexi," says V. Dvořák. "The primary reason is its open REST API interface." Spoje.net took the recommendation and agreed to have a data bridge built for migrating data from their legacy accounting system to ABRA Flexi.
Spoje.net and FlexiPeeHP
24,000 invoices migrated in 6 hours.
Over 4,000 inventory records migrated.
Spoje.net agreed to release the library as open source.
Using the library
FlexiPeeHP has universal applicability. It is a tool that provides objects ready to work with accounting system agendas. It is easy to install on Debian, Ubuntu, and derivative operating systems. For other systems, it is available as a PHP library for Composer or as a Docker container.
Basic usage requires only 2–3 lines of code — the developer does not need to modify anything within the library and simply calls the relevant library functions.
FlexiPeeHP is available to developers along with a simple example showing how to configure a connection and request data from the server. The core component of the entire library is the FlexiRO class, which is capable of communicating with the Flexi REST API using PHP's curl extension. From it, classes for individual registers are derived, containing methods for frequently used operations — such as "Match" in the case of issued invoices.
Library currency guaranteed directly by V. Dvořák
The FlexiPeeHP library also includes a continuously growing set of unit tests. With each new version of ABRA Flexi, a new version of the library is released — ensuring maximum compatibility with the accounting system. Every new version is automatically tested and reviewed by multiple code quality improvement tools.
The developer tool Flexplorer
From the same author, built using the FlexiPeeHP library, there is also a specialized open-source developer tool called Flexplorer, which enables you to:
display information about Flexi and its license,
work with JSON, XML, and CSV formats,
browse the contents of all available registers across all companies,
display the structure of a register,
send direct requests to the server and view the results,
configure the Changes API and add webhooks,
test responses from a webhook script processing changes from Flexi,
bulk create and delete accounting periods,
distinguish registers that are unavailable due to licensing,
display the corresponding Flexi page alongside the JSON response,
edit external IDs of records.
What it's like for an independent developer to work with ABRA Flexi
"I appreciate Flexi both as a product and as a company that has always supported me as an independent developer. From my perspective, what makes Flexi exceptional is the ability to run it on Linux, its REST API capabilities and integration options in general, and its powerful query language. I had to get familiar with the system's terminology, and after that there were no major issues," says Vítězslav Dvořák. "I also appreciate the concept and system of external IDs, of which multiple can be stored from external systems. And the support from the Flexi development team is very accommodating — they have the patience of saints with my not-always-sharp questions and bug reports."
Vítězslav Dvořák from Vitex Software presenting FlexiPeeHP.
