ABRA Flexi allows partial updates of records (changing values). When updating records, specify only the attributes you want to change. If you specify an empty attribute, the attribute's value will be deleted.
<?xml version="1.0"?>
<winstrom version="1.0">
<cenik id="123">
<nazevA>Nový název</nazevA> <!-- změněná hodnota -->
<ean/> <!-- smazaná hodnota -->
</cenik>
</winstrom>
Deleting items
Most records can contain items (e.g., an invoice). These items can be added and deleted. If an item does not have an identifier specified, its order determines it.
⚠️ We recommend specifying an external identifier for items as well, since additional information may be linked to an item (e.g., which warehouse the goods were issued from). If items are managed only by order and a record is inserted at the beginning, the values will be overwritten, but the linked information will remain with the original records. This approach is therefore not suitable for updates.
Updating all items
If an identifier is not specified when updating items, records will always be added. If you want to replace the list of records and thus delete all items that are not included in the update, use the removeAll="true" attribute:
<?xml version="1.0"?>
<winstrom version="1.0">
<faktura-vydana id="123">
<polozkyFaktury removeAll="true">
<faktura-vydana-polozka>
<id>14</id>
⋮
</faktura-vydana-polozka>
</polozkyFaktury>
</faktura-vydana>
</winstrom>
In this case, all items that are not included in the list will be deleted. Items that are included will be updated/created.
The same request rewritten in JSON format would look like this:
{
"winstrom": {
"@version": "1.0",
"faktura-vydana": [
{
"id": "123",
"polozkyFaktury@removeAll": "true",
"polozkyFaktury": [{
"id": "14"
}]
}
]
}
}💡 removeAll="true" is destructive — it will also delete items you may not be aware of. Try the request first with a test save (?dry-run=true) and check the resulting state of the document in the <content /> tag.
What to watch out for
To directly delete selected items, you can use the
action="delete"attribute — see Performing actions.There may be internal dependencies between items, so an update may change an item that is not explicitly modified.
Updating labels works on a similar principle to updating items.
