Recommended Best Practices for XML Import
What should I follow when importing XML?
When importing XML, it is recommended to follow a few guidelines:
1. Always include <id>. When it is not provided, the system always creates a new record, which can be confusing. As an ID, it is ideal to use the code for documents if you are generating it manually (<id>code:CODE</id>), or an external ID if this is an integration with another system (<id>ext:SHOP:111</id>, which is the convention for indicating that a document has been assigned ID 111 in the SHOP system — what SHOP means is entirely up to you). Avoid using numeric IDs or IDs in the format ws:xxxxxx:111, as these are internal and only visible during export (although in some situations they can also be used during import).
2. For line-item documents, either assign IDs to all items as well (you cannot use a code here since codes are not unique at the item level — an external ID is therefore best), or use the <polozkyObchDokladu removeAll="true"> attribute. Again, the goal is to prevent duplicates — an item without an ID will be created again by the system. If removeAll="true" is specified, the system will keep only the items that were included in the XML (i.e., if no IDs are provided, it will keep the newly created items and delete the original ones).
3. If you include an element in the XML, it is assumed that you want to set it to the given value. If it is empty (e.g., <popis/> or <popis></popis>), it means you want to set the corresponding property (in this case popis) to an empty value. If you only want to change certain properties of a document, include only those properties and omit any that you want to leave unchanged.
4. Only include the properties you "know" and actually need when importing. For a minimal document import, typically three or four properties are sufficient — the same ones you would enter in the application (document type, issue date, amounts, line items, etc.). You can add more properties gradually as you need them.
5. The list of properties you can import for each register is available on the website; for a received order it is http://demo.flexibee.eu/c/demo/objednavka-prijata/properties (for an issued invoice it would be …/faktura-vydana/properties, etc.), and the list of all registers is at http://demo.flexibee.eu/c/demo/evidence-list. If your license supports the REST API, the complete documentation is also available on your server, typically at http://localhost:5434/c//evidence-list. The reference documentation is available at http://localhost:5434/devdoc.
Company Identifier
When I create a company, what is the machine identifier for a company named "Nikdo Neví s.r.o."?
The general rule is that the string is stripped of diacritics, converted to lowercase, and all characters that are not a-z and 0-9 are replaced with an underscore. Therefore, for example, for the company "Nikdo Neví s.r.o." the identifier would be "nikdo_nevi_s_r_o_". However, the resulting string must be unique. If it is not, numbers are appended at the end — or in the case of a cloud solution, the mechanism may be slightly more complex (for scalability reasons).
It is therefore not possible to rely on the name; instead, you should create the company first and then use the resulting identifier.
If you restore a company from a backup, it is treated as a newly created company and will have a different identifier than the original.
Selecting a Report for PDF Output
How do I specify which report should be used when printing to PDF? The application prompts me to make a selection. How can I do the same via the REST API?
This is of course possible via the REST API as well. In general, the best approach is to use the web interface, select what you need there, and then look at the URL that was generated.
A complete overview of all supported parameters is available.
It also includes ?report-name=faktura. The resulting URL then looks like this: https://..../faktura-vydana/.pdf?report-name=faktura.
If you want to see an overview of supported reports, you can find it https://..../faktura-vydana/reports (e.g., for invoices). The output can also be exported in XML or JSON format.
