Export statement to journal entries
export_journalReshape camt.053 bank statement booked entries into ready-to-POST Xero BankTransactions or QuickBooks Online JournalEntry payloads with placeholders for operator-specific values.
Instructions
Export a camt.053 statement as accounting-platform journal-entry payloads.
Use this to reshape a statement's booked entries into ready-to-POST Xero or
QuickBooks payloads (the tool builds the payloads only; it does not call any
external API or write files). To discover the valid ``target`` values first,
call ``list_export_journal_targets``.
Parses the supplied statement and re-shapes every booked entry
into a target-specific journal-entry payload ready for direct
POST to the accounting platform's REST API.
Supported targets (see ``camt053_mcp.export_journal.SUPPORTED_TARGETS``):
* ``"xero"`` - returns a list of Xero ``BankTransactions``
payloads. Each entry maps to ``{Type, Reference, Date,
BankAccount, Contact, LineAmountTypes, CurrencyCode,
LineItems}``; CRDT entries become ``Type=RECEIVE`` and DBIT
entries ``Type=SPEND``.
* ``"qbo"`` - returns a list of QuickBooks Online
``JournalEntry`` payloads. Each entry produces a balanced
two-line journal (one to the bank account, one to a clearing
account; sign flipped on debit entries).
Operator-specific values (account codes, contact identifiers,
realm IDs) appear as ``"OPERATOR_FILL"`` placeholders so the
operator knows exactly what still needs wiring. The response's
``placeholder_count`` field reports the total.
NetSuite + SAP S/4HANA targets are tracked as a follow-up in #17.
Args:
xml: The raw camt.053 statement XML as a string.
target: One of ``"xero"`` or ``"qbo"`` (default ``"xero"``).
Returns:
``{"target", "entries", "placeholder_count", "placeholder_field"}``
on success, or ``{"error": ...}`` on failure (unsupported
target / malformed XML / parse refusal).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | The raw camt.053 statement XML document as a string; its booked entries are reshaped into journal-entry payloads. | |
| target | No | The accounting platform to shape payloads for: 'xero' (BankTransactions) or 'qbo' (QuickBooks Online JournalEntry). Defaults to 'xero'; call list_export_journal_targets for the current valid values. | xero |