To access data via the Flexi REST API, you need to know the company identifier. It is usually derived from the company name, but this is not a requirement. The identifier must be unique for the company on a given server.
Allowed characters in the identifier are lowercase letters, digits, and underscore — any other characters in the company name are replaced with an underscore. If a company with the same name already exists, a sequence number is appended to the identifier.
When the identifier changes
The identifier remains unchanged if you rename the company.
If you back up and restore the company within the same data source, it will receive a different identifier.
If you delete the company and create it again, a different company may end up with the same identifier.
⚠️ Therefore, do not use the identifier as a permanent company key in your integration. If you store it, verify it again after restoring the company from a backup.
How to find the identifier
There are two options:
1) From the web interface
Log in to the web interface via a web browser, and you can find the company identifier right away in the address bar. In this case, the identifier is demo_neziskova:
https://demo.flexibee.eu/c/demo_neziskova
2) Via the REST API
Using the GET method on the URL server:port/c.xml, or alternatively /c.json:
GET https://demo.flexibee.eu:5434/c.xml?limit=0
This query returns a complete list of companies in XML/JSON. In the field dbNazev you will find the identifier, and in the field nazev the user-friendly company name as displayed in the application. Sample output:
<companies>
<company>
<createDt>2020-03-05T12:51:18.757+01:00</createDt>
<dbNazev>demo</dbNazev>
<id>-2</id>
<licenseGroup>39fa897328d1e6a55ab199f1410015d2</licenseGroup>
<nazev>Demo firma</nazev>
<show>true</show>
<stavEnum>ESTABLISHED</stavEnum>
<watchingChanges>true</watchingChanges>
</company>
<company>
<createDt>2012-09-10T13:24:49.765+02:00</createDt>
<dbNazev>demo_de</dbNazev>
<id>-2</id>
<licenseGroup>39fa897328d1e6a55ab199f1410015d2</licenseGroup>
<nazev>Já Živnostník</nazev>
<show>true</show>
<stavEnum>ESTABLISHED</stavEnum>
<watchingChanges>true</watchingChanges>
</company>
</companies>
Fields in the output
| Company identifier — the value you use in the URL after |
| User-friendly company name as displayed in the application |
| Date the company was created |
| Whether the company is accessible |
| Company status: |
| Whether change tracking is enabled |
| Identifier of the license group the company belongs to |
ℹ️ Without the parameter limit, the output is paginated like with other records. The value ?limit=0 returns all companies at once.
