Project pain.001 into a face
project_faceConvert a pain.001 document into UK Open Banking, Berlin Group, or ISO 20022 JSON and list any source elements the target omits.
Instructions
Project a pain.001 document into another standard's JSON shape.
Use this to turn a payment file into the request body a UK Open
Banking or Berlin Group API expects, or into ISO 20022 element names,
and to see exactly what the target cannot carry: the loss report
lists every source element left out, by indexed path. A face never
invents a value: when the target requires an element the document
lacks, the answer is an ``{"error": ...}`` naming it. To check the
document itself first, use ``validate_xml_against_schema``.
Delegates to :func:`pain001.faces.project_face_text`.
Args:
xml_content: The pain.001 document as XML text.
face: The target face.
version: The edition, or ``None`` to detect it.
bindings: Side inputs the face accepts, or ``None``.
Returns:
``{"face", "version", "payload", "loss_report"}``, or
``{"error": ...}`` when the face refuses the document or a
binding, or the installed pain001 has no faces.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| face | Yes | The target face: one of 'berlin_group', 'iso_2018', 'uk_open_banking'. | |
| version | No | The pain.001 edition, e.g. 'pain.001.001.09'; omit to detect it from the document's namespace. | |
| bindings | No | Values the message does not carry, keyed as list_faces names them (e.g. {'ConsentId': '...'} for uk_open_banking); used for this call only. | |
| xml_content | Yes | The full pain.001 document as XML text (not a file path), at most 10 MiB. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| face | No | ||
| error | No | ||
| payload | No | ||
| version | No | ||
| loss_report | No |