Skip to main content

Linked Documents via API

How to work with the vazebni-doklady relation in URL?

Written by Petr Pech

Documents that are linked to each other in Flexi — order, invoice, warehouse document — can be retrieved via the vazebni-doklady relation.


Query

GET /c/{firma}/objednavka-prijata.json
?limit=0
&relations=vazebni-doklady
&detail=custom:vazebni-doklady(idDokl,kod,modul)

For each document, a list of linked documents is returned:

<vazebni-doklady>
<vazebni-doklad>
<idDokl evidencePath="faktura-vydana">1</idDokl>
<kod>DEVADESATDEVET</kod>
<modul>FAV</modul>
</vazebni-doklad>
</vazebni-doklady>

Meaning of the individual fields:

Field

Meaning

idDokl

Internal number of the linked document. The evidencePath attribute indicates which register to look for it in.

kod

Code (number) of the linked document.

modul

Abbreviation of the module the document comes from (for example FAV for issued invoices).

ℹ️ The vazebni-doklady relation shows documents that were created one from another. Links created by payment or offsetting are located elsewhere — in the vazby relation, which is described in the article Using detail=custom to determine the matching method.


Related

Did this answer your question?