In Flexi, a fee is actually two things: a separate record in the poplatek evidence, which links the fee to a specific price list item, and the price list item itself, which represents the fee. Removal therefore takes place in two steps.
1. Removing the fee from the item
First, find out the relation ID — it is listed by the price list item with the poplatky relation:
GET /c/{firma}/cenik/code:FEN.xml?relations=poplatky&detail=custom:kod,poplatky(id,cenik,cenikOtec)
You then use this ID to delete the record in the poplatek evidence:
<winstrom version="1.0">
<poplatek action="delete">
<id>7</id>
</poplatek>
</winstrom>
This removes the fee from the price list item; the item itself representing the fee remains in the price list.
2. Deleting the fee's price list item
If you are not using the fee anywhere else, you can also delete its price list item:
<winstrom version="1.0">
<cenik action="delete">
<id>code:RECYKLPOPL</id>
</cenik>
</winstrom>
⚠️ The item must not be linked anywhere else — as long as it is assigned to another price list item or used on a document, deletion will fail. So first remove all relations as described in the first step.
ℹ️ The price list item that is meant to represent the fee must have stock type Fee (<typZasobyK>typZasoby.poplatek</typZasobyK>). Otherwise, the assignment will fail with the error Vybraná položka z ceníku musí mít typ zásoby typu poplatek.
