After booking one transaction, find the other pending transactions from the same counterparty in the same cash direction (money out vs money in), so the same correction can be applied to all of them. Returns up to 500 transaction ids, newest first, plus total_count, which counts every match and can exceed the ids returned. Book them in one call with transaction_batch_categorize_transactions_by_account. A row leaves Pending only once the person accepts your proposal and the ledger posts it, so calling again can return ids you already booked; booking one to the same account again just replaces its proposal. When total_count exceeds the ids returned, tell the person the rest come back after they accept, then call again. Read-only.