Generate acmt XML from records
generate_messageGenerate a validated ISO 20022 acmt XML message from in-memory account records. Provide message type and records to receive an XSD-validated XML document.
Instructions
Generate a validated ISO 20022 acmt XML message from in-memory records.
This is the primary generation tool: pass account records you already
hold in memory and receive an XSD-validated XML document; no file is
written. Run ``validate_records`` first to surface record-level errors,
and ``list_message_types`` to confirm the ``message_type`` string.
Returns the validated XML document as a string, or an ``{"error": ...}``
payload (serialized) if generation fails.
Args:
message_type: A supported ISO 20022 acmt message type.
records: One or more flat account records.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| records | Yes | One or more flat account records, each a dict of field name -> value, from which the acmt XML is generated; run validate_records first to surface record-level errors. | |
| message_type | Yes | A supported ISO 20022 acmt message type, e.g. 'acmt.001.001.08' Account Opening Instruction. Must be exactly one of: 'acmt.001.001.08', 'acmt.002.001.08', 'acmt.003.001.08', 'acmt.005.001.06', 'acmt.006.001.07', 'acmt.007.001.05', 'acmt.008.001.05', 'acmt.009.001.04', 'acmt.010.001.04', 'acmt.011.001.04', 'acmt.012.001.04', 'acmt.013.001.04', 'acmt.014.001.05', 'acmt.015.001.05', 'acmt.016.001.05', 'acmt.017.001.05', 'acmt.018.001.05', 'acmt.019.001.04', 'acmt.020.001.04', 'acmt.021.001.04', 'acmt.022.001.04', 'acmt.023.001.04', 'acmt.024.001.04', 'acmt.027.001.06', 'acmt.028.001.06', 'acmt.029.001.06', 'acmt.030.001.04', 'acmt.031.001.06', 'acmt.032.001.06', 'acmt.033.001.02', 'acmt.034.001.06', 'acmt.035.001.02', 'acmt.036.001.01', 'acmt.037.001.02' (see list_message_types). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |