The document item takes over part of the data from the header — accounts, VAT lines, cost center, contract, or tags. This is controlled by a set of logical fields starting with kop.
Fields for copying
Field | What is copied from the header |
| Base accounts (debit and credit). |
| VAT accounts (debit and credit). |
| Posting template. |
| VAT line. |
| VAT control statement line. |
| Cost center, activity, contract. |
| Tags, posting date, Ekokom report. |
All fields are writable and are set directly on the document item:
{
"winstrom": {
"faktura-vydana": {
"id": "123",
"polozkyDokladu": [{
"id": "456",
"kopClenDph": "false"
}]
}
}
}
💡 If the item has a posting template filled in, a simple change of these fields may not take effect — the values are tied to the calculation from the template. In that case, add the previous value, which triggers the change response: "kopClenKonVykDph@previousValue": "true". The principle is described in the article Updating amounts when the exchange rate changes.
