JavaScript · 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.mjs. It reads one dataset and prints what came back:
consolidation-entries.mjs
// consolidation-entries.mjs - reads what the consolidation posted for September, one dataset at a time.
// node consolidation-entries.mjs cta
import { call, companyId } from './brizo.mjs';
const dataset = process.argv[2] ?? 'cta'; // cta, nci, journal-vouchers, adjustments or intercompany
const answer = await call('GET', `/organisations/${companyId}/consolidation/${dataset}?period=2026-09`);
if (answer.status !== 200) {
console.log(`Refused (${answer.status}): ${answer.body.message}`);
process.exit(1);
}
console.log(`${dataset} for ${answer.body.group.name}:`);
console.log(JSON.stringify(answer.body, null, 4));node consolidation-entries.mjs 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.mjs. It reads September's closing USD to SGD rate, lists the KPIs your group defines, and reads the first:
rates-kpis.mjs
// rates-kpis.mjs - reads September's USD to SGD rate and one KPI.
import { call, companyId } from './brizo.mjs';
const rate = await call('GET', `/organisations/${companyId}/exchange-rates?from=USD&to=SGD&period=2026-09&rate_type=closing`);
if (rate.status === 200) {
console.log(`1 USD = ${rate.body.rate} SGD (${rate.body.rate_type}, ${rate.body.period})`);
} else {
console.log(`No rate: ${rate.body.message}`);
}
const kpis = (await call('GET', '/kpis')).body.data;
console.log(`KPIs the group defines: ${kpis.map((kpi) => kpi.name).join(', ')}`);
const first = kpis[0]?.name;
if (first !== undefined) {
const value = (await call('GET', `/organisations/${companyId}/kpi-values?metric=${encodeURIComponent(first)}&period=2026-09`)).body;
console.log(`${first}, ${value.period}: ${value.this_month} this month, ${value.this_month_ytd} year to date`);
}4Run it
node rates-kpis.mjsCheck
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