Skip to main content

Automatic Payment Matching via REST API

How to run automatic matching, restrict it with a filter, and what parameters it has

Written by Petr Pech

Automatic payment matching, which you trigger in the app with a button, can also be invoked via REST API — for both bank and cash register.


Running it

PUT /c/{firma}/banka/automaticke-parovani

The response is <success>true</success>. The call can be repeated — documents that are already matched won't be matched again.


Limiting with a filter

For larger companies, it's worth running matching on only a subset of payments — the filter is inserted into the address before the action name:

PUT /c/{firma}/banka/{filtr}/automaticke-parovani

PUT /c/{firma}/banka/(datVyst%3E='2020-03-01')/automaticke-parovani

PUT /c/{firma}/banka/(datVyst = NOW())/automaticke-parovani

💡 The filter significantly reduces run time — without it, Flexi goes through all payments in the records. Characters in the filter must be encoded, otherwise the request will fail.


Matching parameters

Behavior is controlled by the following parameters:

Parameter

Values

mod

varCas — by variable symbol and amount (default)
varCasUcet — by variable symbol, amount, and account
jenVar — by variable symbol only
jenCastka — amount matches, variable symbol doesn't

obdobi

vsechna (default), aktualni, aktualni-predchozi — which accounting periods to search for documents to be paid

ignorovat-rozdil-castka

How large a difference between the payment and the document should be ignored. Default is 0.0; in jenVar mode, this setting doesn't apply.

zauctovat-rozdil

true (default) — an internal document is created for the difference between the documents, and the documents will be fully matched.

Example with all parameters:

PUT /c/{firma}/banka/automaticke-parovani?mod=jenVar&obdobi=aktualni&ignorovat-rozdil-castka=1.5&zauctovat-rozdil=true

⚠️ An invalid value for the mod or obdobi parameter results in the 400 error. This differs from a parameter that ABRA Flexi doesn't recognize at all — such a parameter is silently ignored and matching proceeds with the default settings.


Related

Did this answer your question?