Java · Track 5 · Tutorial 4 of 4
Read journal lines back
Read the postings back - all of a month's, or just those behind one account, journal or document.
You will needThe journals from Send journal lines.
By the endA script that traces any figure to the postings that make it.
1Read September's postings
Create ReadJournals.java:
ReadJournals.java
// ReadJournals.java - reads September's journal lines back.
import com.fasterxml.jackson.databind.JsonNode;
public class ReadJournals {
public static void main(String[] args) throws Exception {
Brizo.Answer answer = Brizo.call("GET", "/organisations/" + Brizo.COMPANY_ID + "/transactions?period=2026-09");
for (JsonNode line : answer.body().path("data")) {
System.out.println(line.path("date").asText() + " " + line.path("journal_external_id").asText() + "/"
+ line.path("line_external_id").asText() + " " + line.path("account_code").asText() + " "
+ String.format("%-7s", line.path("side").asText()) + Brizo.money(line.path("amount_base")));
}
}
}2Run it
gradle -q run -Pmain=ReadJournalsCheck
2026-09-05 J-0901/1 1000 debit 20,000.00
2026-09-05 J-0901/2 4000 credit 20,000.00
2026-09-08 J-0902/1 1200 debit 10,000.00
2026-09-08 J-0902/2 4000 credit 10,000.00
2026-09-20 J-0903/1 1000 debit 5,000.00
2026-09-20 J-0903/2 1200 credit 5,000.00
2026-09-03 J-0904/1 5000 debit 8,000.00
2026-09-03 J-0904/2 2000 credit 8,000.00
2026-09-01 J-0905/1 6000 debit 2,000.00
2026-09-01 J-0905/2 1000 credit 2,000.00
2026-09-25 J-0906/1 2000 debit 3,000.00
2026-09-25 J-0906/2 1000 credit 3,000.00Each line as you sent it. Unlike the trial balance, journal lines read back straight away: they're stored, not recalculated.
3Trace a figure
Add &account_code=4000 to see the postings behind one account's month, &journal_external_id=J-0902 for one journal, or &document_external_id=INV-1001 for the postings of one invoice.
Want more detail? See the documentation