What is packaging in ABRA Flexi?
From a technical perspective, packaging refers to multiple units of measure for a given item at once. Flexi is no different. In Flexi, packaging means a multiple of the unit of measure.
Since packaging is always tied to a specific price list item, the price list item is where packaging is configured. Each item can have up to 5 packaging types defined.
We will now show you how to create packaging using the REST API, and then how to use packaging on basic documents.
Creating via REST API
Let's consider a scenario where we want to sell screws in packs of 100 pieces. We already have the item ŠROUBUNI4X50 in ABRA Flexi.
We now need to create packaging using the REST API. To create a record, we use the POST method. The endpoint for creating packaging is /cenik.xml (.json). , where you can also find the description of the required fields for creating packaging (analogously for the 2nd–5th packaging):
baleniNazev1- name/label of the packagingbaleniMj1- number of units of measure per packagebaleniEan1- EAN of the packaging (identifier of the packaging)
Let's walk through an example:
Request body in XML:
<?xml version="1.0"?>
<winstrom version="1.0">
<cenik>
<id>code:ŠROUBUNI4X50</id>
<baleniNazev1>ŠROUBUNI4X50BAL100</baleniNazev1>
<baleniMj1>100</baleniMj1>
<baleniEan1>8591230432100</baleniEan1>
</cenik>
</winstrom>
Upon successful creation of the packaging, the API response is an update of the price list item code:ŠROUBUNI4X50. We have created the 1st packaging with the name ŠROUBUNI4X50BAL100, containing 100 pieces of item ŠROUBUNI4X50. The packaging price is calculated automatically by multiplying the item's selling price, i.e. CZK 0.90.
We can now use the packaging on documents.
Using packaging via REST API
To add packaging to a document, the packaging must be identified. Identification is possible using the assigned EAN or by its sequence number on the price list item. The packaging in our example has ID = 1, EAN = 8591230432100. Packaging cannot be identified using the "Code or name" field.
Note: The EAN must be unique. If your EANs in ABRA Flexi are not unique, the system will find the first match when looking up the packaging and treat it as the correct one. It is not possible to guarantee a different outcome if EANs are not unique.
Let's consider an example where a customer orders 3 packs of our screws. To create the order, we again use the POST method. The endpoint for creation is /objednavka-prijata.xml (.json). The fields required to specify packaging on an order line item are listed in the received order line item record description:
baleniId- packaging identification using ID (sequence number in the price list item definition) or EANmnozBaleni- quantity of ordered packages
Example:
Request body:
<winstrom version="1.0">
<objednavka-prijata>
<typDokl>code:OBP</typDokl>
<firma>code:WINSTROM</firma>
<polozkyDokladu>
<objednavka-prijata-polozka>
<cenik>code:ŠROUBUNI4X50</cenik>
<sklad>code:SKLAD</sklad>
<typPolozkyK>typPolozky.katalog</typPolozkyK>
<baleniId>1</baleniId>
<!--analogicky dle EAN
<baleniId>ean:8591230432100<baleniId>
-->
<mnozBaleni>3</mnozBaleni>
</objednavka-prijata-polozka>
</polozkyDokladu>
</objednavka-prijata>
</winstrom>
This request creates an order for 3 packages of 100 pieces of item ŠROUBUNI4X50. The total price and quantity of the order line item are calculated automatically: 300 pieces of screws for CZK 270 (300 pcs × CZK 0.90).
Packaging works the same way in other commercial and warehouse documents as it does in received orders, using the same two fields — baleniID and mnozBaleni. If you use order fulfillment, you do not need to manage packaging manually — the fulfillment process handles packaging automatically. This will result in the invoicing of 3 packages and the dispatch of 300 pieces of screws.
In the example of fulfilling an order with a warehouse document, we will demonstrate the dispatch of screws.
Request body:
<?xml version="1.0"?>
<winstrom version="1.0">
<objednavka-prijata>
<id>code:OBP0004/2021</id>
<realizaceObj type="skladovy-pohyb">
<polozkyObchDokladu>
<polozka>
<cisRad>1</cisRad>
<mj>300</mj>
</polozka>
</polozkyObchDokladu>
</realizaceObj>
</objednavka-prijata>
</winstrom>
The example above creates a goods issue document for 300 pieces of item ŠROUBUNI4X50. The system automatically recognizes that the items were part of a package. Therefore, when fulfilling an order, you must enter the total quantity of the source item.
FAQ
Packaging is not a product bundle; for that purpose, use the Bundles and kits feature.
Need help?
If you have any questions about the application, please contact us at podporaflexi@abra.eu or via the chat window in the bottom right corner.




