Classify a postal address
classify_addressClassify a postal address as structured, hybrid, or unstructured to determine SWIFT 2026 compliance.
Instructions
Classify a postal address as structured, hybrid, or unstructured.
Use this to see where an address stands against the 14 November 2026 SWIFT
cliff: ``structured`` (town + country + structured detail, no free-form
lines), ``hybrid`` (town + country + 1-2 free-form ``adr_line`` lines, the
minimum CBPR+ UG2026 bar), or ``unstructured`` (free-form only — rejected
from the cliff date). To check acceptability under a policy use
``validate_address``; to upgrade legacy lines use ``repair_address``.
Returns ``{"classification": str, "is_structured": bool, "is_hybrid":
bool, "is_unstructured": bool, "has_structured_fields": bool}`` or an
``{"error": ...}`` payload.
Args:
address: The postal address as a dict of snake_case fields.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. |