PAR-15
Expose the government/business account information for a transaction in the transaction endpoint
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.
Comments
tesks · Jun 4, 2026, 9:57 AM
Code context — treasury-rest-api LedgerMapper.findTransactionsByAccount selects only the queried account's own posting (WHERE lp.account_id = #{accountId}), and TransactionItem has 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_postings where account_id != #{accountId}) + accounts for the counterparty's display_name / account_type / owner_uuid_bin, and add those fields to TransactionItem and TransactionService.toItem. Alternative to / complements PAR-14.
Activity
- paradaux description: Description updated
- paradaux changed status to Status → Planned
- tesks description: Description updated
- tesks commented
- tesks assigned Assigned to rian