Just like in the desktop or web application, you can use the Document Allocation function. The document allocation function can only be used on a document that does not contain any line items. This function allows you to allocate a document into individual document line items.
This function is available for selected ABRA Flexi registers:
faktura-prijatafaktura-vydanabankapokladni-pohybpohledavkazavazek
Calling method
You can use the HTTP method: PUT.
The endpoint for submitting an allocation is governed by the register; you then provide the document identifier, for example:
URL parameters
The input data in Flexi API consists of individual allocation lines with the accounting details required for correct posting. Each line has the following parameters. All parameters are case-sensitive:
typUcOp- Posting template (identifier of a record from thepredpis-zauctovaniregister)sazbaDph- VAT rate (identifier of a record from thesazba-dphregister)sumZkl- Base amount (decimal number)zklMdUcet- Debit of base (identifier of a record from theucetregister)zklDalUcet- Credit of base (identifier of a record from theucetregister)sumDph- VAT amount (decimal number)dphMdUcet- Debit of VAT (identifier of a record from theucetregister)dphDalUcet- Credit of VAT (identifier of a record from theucetregister)clenDph- VAT line (identifier of a record from thecleneni-dphregister)clenKonVykDph- VAT control statement line (identifier of a record from thecleneni-kontrolni-hlaseniregister)stredisko- Cost centre (identifier of a record from thestrediskoregister)cinnost- Activity (identifier of a record from thecinnostregister)zakazka- Project (identifier of a record from thezakazkaregister)
A description of the individual registers can be found here.
Usage examples
Allocating a received invoice across two lines
<winstrom version="1.0">
<faktura-prijata>
<rozuctujDoklad>
<radkyRozuctovani>
<radek>
<typUcOp>code:NÁKUP ZBOŽÍ A</typUcOp>
<sumZkl>75.0</sumZkl>
<sazbaDph>1</sazbaDph>
<zklMdUcet>code:131001</zklMdUcet>
<zklDalUcet>code:321001</zklDalUcet>
<clenDph>code:000P</clenDph>
</radek>
<radek>
<typUcOp>code:NÁKUP ZBOŽÍ B</typUcOp>
<sumZkl>25.0</sumZkl>
<sazbaDph>1</sazbaDph>
<zklMdUcet>code:131001</zklMdUcet>
<zklDalUcet>code:321001</zklDalUcet>
<clenDph>code:000P</clenDph>
</radek>
</radkyRozuctovani>
</rozuctujDoklad>
</faktura-prijata>
</winstrom>
2. Allocating a liability across two lines in JSON:
{
"winstrom": {
"zavazek": {
"rozuctujDoklad": {
"radkyRozuctovani": [
{
"typUcOp": "code:CESTOVNÉ",
"sumZkl": "750.0",
"sazbaDph": "1",
"zklMdUcet": "code:512001",
"zklDalUcet": "code:314001",
"clenDph": "code:40-41"
},
{
"typUcOp": "code:CESTOVNÉ",
"sumZkl": "250.0",
"sazbaDph": "1",
"zklMdUcet": "code:512001",
"zklDalUcet": "code:314001",
"clenDph": "code:40-41"
}
]
}
}}}
Failed requests
The sum of line amounts does not match the total document amount; Flexi API responds as follows:
"message": "Suma položek nesouhlasí se sumou dokladu."
A parameter value that does not exist in the data was entered
"message": "Záznam pro parametr (zklMdUcet) nebyl v datovém zdroji nalezen: cz.winstrom.vo.ucto.Ucet#code:521002 [ZAV0005/2223]",
"code": "NOT-FOUND(cz.winstrom.vo.ucto.Ucet)(code:521002)"A syntax error — an incorrectly formatted entry, for example:
"winstrom": {
"zavazek": {
"rozuctujDoklad": {
"radkyRoyuctovani": [
Výseldek Chyba 500: "message": "Interní chyba aplikace."
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.
