Skip to main content

Recalculation of Account Balances - REST API

How to Trigger Account Balance Recalculation Using the API?

Written by Petr Pech

Calling Method

You can use the HTTP method: PUT or POST.

The service is available at: /c/{firma}/stav-uctu/prepocet, where {firma} is the database company identifier.

The following output formats are supported: XML or JSON.

Parameters

The service requires the mandatory parameter ucetniObdobi in order to identify the time period for which you want to recalculate the accounts. Provide the period code following the pattern code:2020.

Optionally, you can use the parameter dry-run. This parameter can be used to check whether the recalculation has been completed. If so, it returns HTTP status 200. If not, it returns HTTP status 409 with information about when and by whom the recalculation was initiated.

Result

To determine whether the service was executed successfully, you can check the HTTP response status or the success property in the returned document.

If the service is executed successfully, HTTP status 200 is returned along with a document in the standard format — see return values.

In case of failure, a 4xx/5xx status is returned along with a message describing the reason for the failure.

Call Examples

  • PUT /c/demo/stav-uctu/prepocet.xml?ucetniObdobi=code:2020

  • PUT /c/demo/stav-uctu/prepocet.json?ucetniObdobi=code:2020

  • PUT /c/demo/stav-uctu/prepocet?ucetniObdobi=code:2020
    (with header Accept: application/xml or Accept: application/json)

Did this answer your question?