GET
/
datasets
/
companies
/
{companyId}
/
financial-reports
curl --request GET \
  --url https://api.tic.io/datasets/companies/{companyId}/financial-reports \
  --header 'x-api-key: <api-key>'
{
  "incomeStatement": [
    {
      "row": 123,
      "column": 123,
      "order": 123,
      "localizedFieldName": "<string>",
      "enFieldName": "<string>",
      "displayFormat": "<string>",
      "type": "<string>",
      "value": "<any>",
      "notes": "<string>",
      "highlight": "green"
    }
  ],
  "balanceSheets": [
    {
      "row": 123,
      "column": 123,
      "order": 123,
      "localizedFieldName": "<string>",
      "enFieldName": "<string>",
      "displayFormat": "<string>",
      "type": "<string>",
      "value": "<any>",
      "notes": "<string>",
      "highlight": "green"
    }
  ],
  "footnotes": [
    {
      "row": 123,
      "column": 123,
      "order": 123,
      "localizedFieldName": "<string>",
      "enFieldName": "<string>",
      "displayFormat": "<string>",
      "type": "<string>",
      "value": "<any>",
      "notes": "<string>",
      "highlight": "green"
    }
  ],
  "keyMetrics": [
    {
      "row": 123,
      "column": 123,
      "order": 123,
      "localizedFieldName": "<string>",
      "enFieldName": "<string>",
      "displayFormat": "<string>",
      "type": "<string>",
      "value": "<any>",
      "notes": "<string>",
      "highlight": "green"
    }
  ],
  "additionalInformation": [
    {
      "row": 123,
      "column": 123,
      "order": 123,
      "localizedFieldName": "<string>",
      "enFieldName": "<string>",
      "displayFormat": "<string>",
      "type": "<string>",
      "value": "<any>",
      "notes": "<string>",
      "highlight": "green"
    }
  ]
}

Details

This endpoint is suited for localized views where you intend to visualize the response in a table like format. It automatically organize the result into cells with rows and columns with the language you provide. It also returns formatting helpers to help automatically styling the result.

Please note that the order field is used to sort the correct order when outputting the grid for the income statement, balance sheet, key metrics, footnotes and other additional information.

Here is a simple javascript example you can use to visualize the response with the help of Handsontable.

index.html
<html>
  <head>
    <script
      type="text/javascript"
      src="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.js"
    ></script>
    <script
      type="text/javascript"
      src="https://cdn.jsdelivr.net/npm/lodash/lodash.min.js"
    ></script>
  </head>
  <body>
    <div id="grid" style="width: 100vw; height: 100vh"></div>
    <script type="text/javascript" src="index.js"
  </body>
</html>
index.js
  const sourceData = "add your response here from the API";
  const rows = _(sourceData).map('row').uniq().value();
  const columns = _(sourceData).map('column').uniq().value();
  const tableData = [];
  _.forEach(rows, (row) => {
    let rowData = [];
    let first = _.find(
      sourceData,
      (item) => item.column == columns[0] && item.row == row
    );
    rowData.push(first.localizedFieldName);
    _.forEach(columns, (column) => {
      let match = _.find(
        sourceData,
        (item) => item.column == column && item.row == row
      );
      rowData.push(match.value);
    });
    tableData.push(rowData);
  });
  document.addEventListener('DOMContentLoaded', () => {
   const grid = document.getElementById("grid");

  // Helps styling the cells with the cellProperties
  function customRenderer(hotInstance, td, row, column, prop, value, cellProperties) {
    Handsontable.renderers.BaseRenderer.apply(this, arguments);

    if (cellProperties.customData == 'undefined') {
      console.log(
        'Wierd emtpy custom data in row ' + row + ' and column ' + column
      );
    }
    switch (cellProperties.customData?.type) {
      case 'Int':
        if (value != null)
          return (td.innerHTML = value.toLocaleString('sv-SE', {
            maximumFractionDigits: 0,
          }));
        break;
      case 'String':
        break;
      case 'Decimal':
        if (value != null)
          return (td.innerHTML = value.toLocaleString('sv-SE', {
            style: 'decimal', // style: 'percent'
            minimumFractionDigits: 1,
            maximumFractionDigits: 1,
          }));
        break;
      case 'DateTime':
        return (td.innerHTML = new Date(value).toLocaleDateString());
        break;
      case 'Percentage':
        if (value != null)
          return (td.innerHTML = (value * 0.01).toLocaleString('sv-SE', {
            style: 'percent',
            minimumFractionDigits: 1,
            maximumFractionDigits: 1,
          }));
        break;
      default:
        break;
    }
    return (td.innerHTML = value);
  }

  const hotInstance = new Handsontable(grid, {
        data: tableData,
        licenseKey: 'non-commercial-and-evaluation',
        rowHeaders: false,
        colHeaders: false,
        fixedColumnsStart: 1,
        fixedRowsTop: 1,
        manualColumnResize: true,
        wordWrap: true,
        autoColumnSize: true,
        autoWrapRow: true,
        autoWrapCol: true,
        readOnly: true,
        comments: true,
        height: 'auto',
        contextMenu: ['copy'],
        className: 'htRight',
        fillHandle: false,
        stretchH: 'all',
        cells(row, col) {
          const cellProperties = {};
          cellProperties.className = 'htLeft';
          let match = _.find(
            sourceData,
            (item) => item.column == col - 1 && item.row == row
          );
          if (match?.notes != null) {
            cellProperties.comment = {
              value: match.notes,
              readOnly: true,
              style: { width: 200, height: 50 },
            };
          }
          cellProperties.customData = match;
          if (col == 0 || row == 0)
            cellProperties.className = 'htRight font-bold';
          if (col > 0 && row > 0)
            cellProperties.renderer = customRenderer;
          return cellProperties;
        },
      });
      });

Authorizations

x-api-key
string
header
required

Path Parameters

companyId
integer
required

The company id

Query Parameters

iso639_2_LanguageCode
string
default:sv

The language code of the annual report

annualReportPeriod
integer

Supply if you want to receive only a specific period as entered as YYYYMM

Response

200
application/json
OK
incomeStatement
object[] | null
balanceSheets
object[] | null
footnotes
object[] | null
keyMetrics
object[] | null
additionalInformation
object[] | null