Validate addresses in payment rows
validate_addressesBatch-validate party addresses across payment rows to identify rejections before generating the pacs.008 message.
Instructions
Batch-validate every party address across a list of payment rows.
Use this before ``generate_message`` to catch addresses that will be
rejected at the rail. The default ``hybrid_or_structured`` policy enforces
the November 14, 2026 cliff. Each finding is reported per offending
``(row, party)`` pair.
Returns ``{"policy": str, "is_valid": bool, "total": int, "errors":
[{"row": int, "party": str, "severity": str, "message": str,
"classification": str}, ...]}`` or an ``{"error": ...}`` payload.
Args:
addresses: One or more payment-row dicts (see the field description).
policy: The validation policy to enforce (see the enum values).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| policy | No | Postal-address validation policy. 'unstructured_ok' permits any form (pre-cliff / generic); 'hybrid_or_structured' rejects fully unstructured addresses (the SWIFT CBPR+ UG2026 default in force from 14 November 2026); 'structured_only' requires full structured form. Must be one of: 'unstructured_ok', 'hybrid_or_structured', 'structured_only'. | hybrid_or_structured |
| addresses | Yes | Payment-row dicts. The pipeline scans each row for columns of the form '{party}_address_{field}' (party in debtor, creditor, debtor_agent, creditor_agent, ultimate_debtor, ultimate_creditor; field a snake_case PostalAddress field such as twn_nm/ctry/strt_nm or adr_line_0..adr_line_6) and validates each party's address. |