depth and parent_code fields on each line item to render the Capital IQ-style statement hierarchy.curl --location --request GET 'https://api.financialreports.eu/companies//financials/?fiscal_period&fiscal_year&fiscal_year_from&fiscal_year_to&line_items&statement_type' \
--header 'x-api-key;'{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"results": [
[
{
"fiscal_year": 2024,
"fiscal_period": "FY",
"period_start_date": "2024-01-01",
"period_end_date": "2024-12-31",
"statement_type": "IS",
"statement_type_display": "Income Statement",
"currency": {
"code": "EUR",
"name": "Euro",
"symbol": "€"
},
"source_filing_id": 32537845,
"source_filing_release_date": "2025-03-15T10:00:00Z",
"line_items": [
{
"code": "revenue",
"name": "Total Revenue",
"statement_type": "IS",
"depth": 0,
"parent_code": null,
"sort_order": 10,
"value": "699767000.00",
"raw_value": "699767.000000",
"scale": "thousands"
},
{
"code": "cost_of_goods_sold",
"name": "Cost of Goods Sold",
"statement_type": "IS",
"depth": 1,
"parent_code": "gross_profit",
"sort_order": 30,
"value": "128174000.00",
"raw_value": "128174.000000",
"scale": "thousands"
},
{
"code": "gross_profit",
"name": "Gross Profit",
"statement_type": "IS",
"depth": 0,
"parent_code": null,
"sort_order": 40,
"value": "571593000.00",
"raw_value": "571593.000000",
"scale": "thousands"
}
]
}
]
]
}