Render Inline XBRL (iXBRL) with CellStore, Part 3: Querying Facts for iXBRL Rendering

This page is a placeholder, its contents are being worked on.

Estimated reading time: 3 minutes

How to Query Facts for iXBRL Rendering

In part 2 we have seen how an iXBRL template can be created which is the first ingredient for rendering iXBRL. The second ingredient necessary to render iXBRL is to determine a collection of facts as input. In the rendering process the collection of facts will be combined with the iXBRL template to become the final iXBRL output file or set of iXBRL output files.

The Rest API endpoint (which is the third ingredient) allows to add an arbitrary number of query parameters to filter for the facts that should be used for rendering. As for all of the CellStore API endpoints this ensures the highest grade of flexibility. Consequently, the parameters for querying behave the same as with the cellstore/v1/facts endpoint. In order to test if the right bag of facts is selected you can apply the parameters to this endpoint and you will get the facts that would also be selected for rendering.

For example:

Description Method Body URL Output
Select a collection of facts GET none cellstore/v1/facts?xbrl:instance=1234567 Plain Facts
Select a collection of facts for rendering POST iXBRL template cellstore/v1/facts/render/ixbrl?xbrl:instance=1234567 Rendered iXBRL
Select a collection of facts for rendering POST iXBRL templates (zip) cellstore/v1/facts/render/ixbrl?xbrl:instance=1234567 Rendered iXBRLs (zip)

No matter if you query the /facts endpoint or the /facts/render/ixbrl endpoint the exact same set of facts is selected if the same aspect filtering parameters are passed for querying. For the /facts endpoint the facts are returned as plain data objects, and in the rendering case, these same facts are rendered into iXBRL. If a fact from the set of selected facts is not referenced in the iXBRL template by a ixtp:factMatch attributed, the fact will automatically be rendered in the hidden section of the iXBRL. So, all facts selected by the filtering go into the output document.

The same applies to the footnotes: All footnotes in the filtered result will be found in the output rendered iXBRL. In case a footnote is not referenced by an ixtp:footnote attribute it will be rendered into the hidden section.

In most cases it makes sense to render an iXBRL output file for all facts from a certain instance. In this case you will want to query by the xbrl:instance aspect. Also it is very common to render a set of iXBRL documents at once for all facts from a set of instances. In this case you will want to query by the xbrl:archive aspect. Both cases are supported and most commonly used. Howevery you could apply any filter for determining the set of facts. For example, querying by xbrl:entity and xbrl:period would also work.

On to Part 4 »

cellstore, Inline XBRL, XBRL, guide, tutorial, template, rendering