Skip to main content

Balance - REST API

How to generate an accounting balance output in the REST API?

Written by Petr Pech

Like most accounting outputs, the balance can also be generated via the REST API.

The balance is used to determine the balance-reconciliation status of documents. ABRA Flexi groups all sources and payments for the given balance account by the source document number — source documents carry their variable symbol into the matching symbol, and payments, using a linking table, take over the source's variable symbol into the matching symbol.

If you're interested in the documentation for the desktop application, continue to this link.


How to call it

The balance is available using the HTTP method GET at the address /c/{firma}/saldo, where {firma} is the database company identifier.

GET https://demo.flexibee.eu/c/demo/saldo.xml

The output can be further customized using the parameters below. None of them are mandatory, and the URL can also carry general parameters such as pagination or detail level.


Parameters

Parameter

Meaning

stavUhrady

Payment status of balance records — uhrazeno or neuhrazeno. If the parameter is not specified, the balance returns all records regardless of payment status.

filtrUcty

Filtering by accounts. You can specify accounts, account prefixes, or a range thereof, separated by commas — e.g. 311000, 32, 3-4.

filtrProtiucty

Filtering by counter-accounts, using the same notation — e.g. 211001, 21, 1-2.

datumUctovaniOd
datumUctovaniDo

Posting date range in the format yyyy-MM-dd. Limits the listing to records within the given range.

datumVystaveniOd
datumVystaveniDo

Document issue date range in the format yyyy-MM-dd.

modul

Filtering by accounting document modules; the parameter can be repeated. Allowed values: modulUcetni.FAP, modulUcetni.FAV, modulUcetni.BAN, modulUcetni.POK, modulUcetni.SKL, modulUcetni.INT, modulUcetni.PHL, modulUcetni.ZAV, modulUcetni.MAJ, modulUcetni.LEA, modulUcetni.TXP and modulUcetni.TXZ.

castkaMDOd, castkaMDDo
castkaMDMenOd, castkaMDMenDo

Range of the debit amount in the domestic currency and in the foreign currency, respectively.

castkaDalOd, castkaDalDo
castkaDalMenOd, castkaDalMenDo

Range of the credit amount in the domestic currency and in the foreign currency, respectively.

stredisko, zakazka, firma

Filtering by center, order, or company. The parameters can be repeated; the value uses the import identifier — e.g. code:CENTRALA.

stavZauctovani

Posting status of documents — zauctovano, nezauctovano or vse.

popis

Full-text filtering by description.

cisloDokladu, varSymbol, parSymbol

Filtering by the document's internal number, variable symbol, or matching symbol. Multiple comma-separated values can be specified.

⚠️ For parameters with an enumerated set of values (stavUhrady, stavZauctovani, modul), an invalid value results in a 400 unsupported_param_value_exception error, and the server will list the allowed options in the response. Conversely, an unknown parameter name is ignored without an error, so a typo in the name has no visible effect — the filter simply won't be applied.

ℹ️ The parameter modul is written here with the prefix modulUcetni., while for payment status as of a date, only FAV, PHL, FAP and ZAV are used.


Sample calls

GET https://demo.flexibee.eu/c/demo/saldo.xml
GET https://demo.flexibee.eu/c/demo/saldo.xml?stavUhrady=neuhrazeno
GET https://demo.flexibee.eu/c/demo/saldo.xml?stavUhrady=neuhrazeno&filtrUcty=311001,311002
GET https://demo.flexibee.eu/c/demo/saldo.xml?stavUhrady=uhrazeno&filtrUcty=311001&filtrProtiucty=1-2
GET https://demo.flexibee.eu/c/demo/saldo.xml?stavUhrady=neuhrazeno&datumUctovaniOd=2025-01-01&datumUctovaniDo=2025-01-31
GET https://demo.flexibee.eu/c/demo/saldo.xml?stavUhrady=neuhrazeno&datumVystaveniOd=2025-01-01&datumVystaveniDo=2025-01-31
GET https://demo.flexibee.eu/c/demo/saldo.xml?modul=modulUcetni.FAV&modul=modulUcetni.FAP&stredisko=code:CENTRALA&stavZauctovani=zauctovano
GET https://demo.flexibee.eu/c/demo/saldo.xml?castkaMDOd=1000&castkaMDDo=5000&varSymbol=2026001,2026002


Sample output

XML:

<winstrom version="1.0">
<saldo>
<stavUhrK></stavUhrK>
<datVyst>2018-01-08</datVyst>
<datSplat>2018-01-22</datSplat>
<mena evidencePath="mena" showAs="CZK: Česká koruna"
ref="/c/demo/mena/31.xml">code:CZK</mena>
<firma evidencePath="adresar" showAs="4219: Odběratel č. 55"
ref="/c/demo/adresar/654.xml">code:4219</firma>
</saldo>
</winstrom>

JSON:

{
"winstrom": {
"@version": "1.0",
"saldo": [
{
"stavUhrK": "",
"datVyst": "2018-01-08",
"datSplat": "2018-01-22",
"mena": "code:CZK",
"mena@evidencePath": "mena",
"mena@showAs": "CZK: Česká koruna",
"mena@ref": "/c/demo/mena/31.json",
"firma": "code:4219",
"firma@evidencePath": "adresar",
"firma@showAs": "4219: Odběratel č. 55",
"firma@ref": "/c/demo/adresar/654.json"
}
]
}
}


Related

Did this answer your question?