PHP · Track 7 · Tutorial 5 of 5
Read the consolidation entries, exchange rates and KPIs
Read what's behind the group's figures: the entries consolidation posted, the exchange rates it used, and the KPIs your group tracks.
1What the consolidation posted
Behind the group's figures are the entries consolidation makes: currency translation (cta), minority interests (nci), journal vouchers, adjustments, and intercompany. Each can be read for a month, and each answers for the group your company belongs to.
2Read one
Create consolidation-entries.php. It reads one dataset and prints what came back:
consolidation-entries.php
<?php
// consolidation-entries.php - reads what the consolidation posted for September, one dataset at a time.
// php consolidation-entries.php cta
require __DIR__ . '/brizo.php';
$dataset = $argv[1] ?? 'cta'; // cta, nci, journal-vouchers, adjustments or intercompany
$answer = call('GET', "/organisations/$companyId/consolidation/$dataset?period=2026-09");
if ($answer['status'] !== 200) {
exit("Refused ({$answer['status']}): {$answer['body']['message']}\n");
}
echo "$dataset for {$answer['body']['group']['name']}:\n";
echo json_encode($answer['body'], JSON_PRETTY_PRINT) . "\n";php consolidation-entries.php ctaCheck
The dataset's name and your group, then the entries for September. What each holds depends on your group: a group with no foreign subsidiaries has no translation to show.
3Read exchange rates and KPIs
Create rates-kpis.php. It reads September's closing USD to SGD rate, lists the KPIs your group defines, and reads the first:
rates-kpis.php
<?php
// rates-kpis.php - reads September's USD to SGD rate and one KPI.
require __DIR__ . '/brizo.php';
$rate = call('GET', "/organisations/$companyId/exchange-rates?from=USD&to=SGD&period=2026-09&rate_type=closing");
if ($rate['status'] === 200) {
echo "1 USD = {$rate['body']['rate']} SGD ({$rate['body']['rate_type']}, {$rate['body']['period']})\n";
} else {
echo "No rate: {$rate['body']['message']}\n";
}
$kpis = call('GET', '/kpis')['body']['data'];
echo 'KPIs the group defines: ' . implode(', ', array_column($kpis, 'name')) . "\n";
$first = $kpis[0]['name'] ?? null;
if ($first !== null) {
$value = call('GET', "/organisations/$companyId/kpi-values?metric=" . rawurlencode($first) . '&period=2026-09')['body'];
echo "$first, {$value['period']}: {$value['this_month']} this month, {$value['this_month_ytd']} year to date\n";
}4Run it
php rates-kpis.phpCheck
The rate, with its type and month - or the reason there isn't one, if the group holds no rate for that pair and month. Then your group's KPI names, and the first one's figure for September.
5Good to know
rate_typeisaverage(the default) orclosing.- A KPI is read by the name
/kpisgives it. A name the group doesn't define answers404. - Each of these needs its own box on the credential: Consolidation (read), Exchange rates (read), KPIs (read).
Want more detail? See the documentation