The REST transactions endpoint only shows the accountId — expose the counterparty government/business account info for each transaction (either via PAR-14 or by adding the fields here).
Technical notes — treasury-rest-api LedgerMapper.findTransactionsByAccount selects only the queried account's own posting (WHERE lp.account_id = #{accountId}), and TransactionItem has no counterparty fields. Join the other posting of the same txn_id (ledger_postings where account_id != #{accountId}) + accounts for the counterparty's display_name / account_type / owner_uuid_bin, and add those to TransactionItem and TransactionService.toItem. Complements PAR-14.
Code context —
treasury-rest-api LedgerMapper.findTransactionsByAccountselects only the queried account's own posting (WHERE lp.account_id = #{accountId}), andTransactionItemhas no counterparty fields — so a transaction shows just an amount/memo with no indication of the other-side account.Approach: join the other posting of the same
txn_id(ledger_postingswhereaccount_id != #{accountId}) +accountsfor the counterparty'sdisplay_name/account_type/owner_uuid_bin, and add those fields toTransactionItemandTransactionService.toItem. Alternative to / complements PAR-14.