Skip to main content

Saldo - REST API

How to generate a balance accounting output via the REST API interface?

Written by Petr Pech

Like most accounting outputs, balance (saldo) can also be generated in the REST API.

The balance is used to determine the open-item accounting status of documents. ABRA Flexi groups all sources and payments for a given balance account by the source document number. Source documents therefore carry their variable symbol into the matching symbol, and payments inherit the variable symbol of the source into the matching symbol via a linking table.

If you are looking for documentation for the desktop application, please proceed to this link.

Now, let's take a look at how to generate a balance in the REST API interface.

HTTP Method

The balance is available via the HTTP method GET.

Endpoint

The service is available at: /c/{firma}/saldo, where {firma} is the database company identifier.

Parameters

The balance output can be influenced by the following parameters:

  • stavUhrady - Payment status of balance records (possible values: uhrazeno, neuhrazeno). If the parameter is not specified, the balance returns all records regardless of payment status.

  • filtrUcty - Filtering balance records by accounts. You can enter accounts, account prefixes, or their ranges, separated by commas (e.g. 311000, 32, 3-4).

  • filtrProtiucty - Filtering balance records by contra accounts. You can enter accounts, account prefixes, or their ranges, separated by commas (e.g. 211001, 21, 1-2).

The parameters described above are optional; the call can be made without them.

The URL may also support general parameters, such as pagination or detail level.

Example Calls

In all cases, the response is HTTP 200 along with the requested balance records.

Example Results

XML

<winstrom>
<saldo>
<stavUhrK></stavUhrK>
<datVyst>2018-01-08</datVyst>
<datSplat>2018-01-22</datSplat>
<mena evidencePath="mena" showAs="CZK: Česká koruna" ref="/v2/c/testovaci_2/mena/31.xml">code:CZK</mena>
<firma evidencePath="adresar" showAs="4219: Odběratel č. 55" ref="/v2/c/testovaci_2/adresar/654.xml">code:4219</firma>
</saldo>
<saldo>
<stavUhrK></stavUhrK>
<datVyst>2018-01-08</datVyst>
<datSplat>2018-01-22</datSplat>
<mena evidencePath="mena" showAs="CZK: Česká koruna" ref="/v2/c/testovaci_2/mena/31.xml">code:CZK</mena>
<firma evidencePath="adresar" showAs="4219: Odběratel č. 55" ref="/v2/c/testovaci_2/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":"/v2/c/testovaci_2/mena/31.json",
"firma":"code:4219",
"firma@evidencePath":"adresar",
"firma@showAs":"4219: Odběratel č. 55",
"firma@ref":"/v2/c/testovaci_2/adresar/654.json"
},
{
"stavUhrK":"",
"datVyst":"2018-01-08",
"datSplat":"2018-01-22",
"mena":"code:CZK",
"mena@evidencePath":"mena",
"mena@showAs":"CZK: Česká koruna",
"mena@ref":"/v2/c/testovaci_2/mena/31.json",
"firma":"code:4219",
"firma@evidencePath":"adresar",
"firma@showAs":"4219: Odběratel č. 55",
"firma@ref":"/v2/c/testovaci_2/adresar/654.json"
}
]
}
}

FAQ

Is there documentation for other accounting outputs?

Yes, you can find it on our website.

How do I generate the status of unpaid invoices via the API?

The procedure is described in our documentation.

Did this answer your question?