Validate a postal address
validate_addressValidate a postal address against policy to determine if it meets SWIFT CBPR+ or other rail requirements, ensuring acceptance for payment processing.
Instructions
Validate one postal address against an address policy.
Use this to decide whether an address will clear a rail. The default
``hybrid_or_structured`` policy is the November 14, 2026 cliff rule
(SWIFT CBPR+, HVPS+, T2 RTGS, CHAPS, Fedwire, Lynx): it rejects fully
unstructured addresses. Findings mirror the library's pipeline severity
(a policy rejection is a blocking finding).
Returns ``{"policy": str, "classification": str, "is_acceptable": bool,
"findings": [{"severity": str, "message": str}, ...]}`` or an
``{"error": ...}`` payload.
Args:
address: The postal address as a dict of snake_case fields.
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 |
| address | Yes | An ISO 20022 PostalAddress27 as a dict of snake_case fields, e.g. {'strt_nm': 'High St', 'bldg_nb': '1', 'pst_cd': 'AB1 2CD', 'twn_nm': 'London', 'ctry': 'GB'} and optional 'adr_line' (list of free-form lines). 'ctry' must be ISO 3166-1 alpha-2. |