In parts one, two and three of this series, we’ve introduced a number of things you can do with the TNDP APIs from your own code. We’re now going to cover how you might quickly integrate some results from the platform into your own web pages.

Embedding platform results

The first question to solve is authentication. As we’ve seen, the TNDP uses OAuth2 and OpenID Connect for authentication and authorization, and you need to be authenticated to make API calls.

This is all very well if you’re building a fully-fledged web application – you can send users through a browser-based login flow to authenticate them against the TNDP. But what if you just want to embed some platform results in a public page, such as this blog post?

The answer is to use a static API key (service account) and do the data fetching on the back end of your web app. In this case, we’ve authored a trivial WordPress plugin which allows us to display a rendering of a table of XBRL data provided by the TNDP – like this:

S.01.01.08.01 Content of the submission

[cfl_tndp_table]

The above is one of the first tables in a Solvency II (QRB) filing. You can see the source code for this plugin on Github.

If you have any feedback on this series or would like to request an API key to try the samples, contact [email protected]