Skip to main content

Including Document Items When Using detail:custom

When using a custom detail and record ID directly in the URL, the response also includes document line items

Written by Petr Pech

When using detail=custom, document items sometimes appear in the response even though you didn't request them — and sometimes they don't. What determines this is whether you address the document by its identifier or search for it using a filter.


What's the difference

Address

What is returned

/faktura-vydana/2859.xml?detail=custom:sumCelkem

The header and items of the document.

/faktura-vydana/(id eq 2859).xml?detail=custom:sumCelkem

Only the header.

A filtered listing therefore returns only what you specified:

<winstrom version="1.0">
<faktura-vydana>
<id>2859</id>
<sumCelkem>3212321.33</sumCelkem>
</faktura-vydana>
</winstrom>

💡 If you need items even in a filtered listing, list the relation in detail=custom — for example ?detail=custom:sumCelkem,polozkyDokladu(nazev) — or add the relations=polozkyDokladu parameter. Both approaches are described in the article Getting document items.


Related

Did this answer your question?