The shared dictionary of canonical field paths that import profiles, APIs, and adapters map into.
The canonical field registry β defined in packages/core-model/src/canonical/field-registry.ts
and exposed at GET /v1/canonical-fields β is the
single source of truth for βwhat fields exist on each canonical model, and which evidence sources
can populate them.βExternal files, webhooks, and APIs should map into these known fields. Unknown or long-tail data
should stay in RawRecord.payload, metadata, or FlowLegReference β never invent ad-hoc
canonical columns at runtime.
Filter to fields whose sourceTypes includes this value.
importTargetsOnly
boolean (default false)
When trueandsourceType is set, returns only fields valid as import mapping targets for that source type (see below). When true without a sourceType, returns an empty list.
Each item in the response (CanonicalFieldDefinitionResponse):
api_expectation represents direct API intake (POST /v1/payment-intents,
POST /v1/evidence/provider, POST /v1/evidence/onchain) β it is excluded from
ReconciliationRule.sourceType (a rule canβt be scoped to βthe API itselfβ as an evidence source)
but is a valid sourceTypes entry for PaymentIntent fields.
Populated for every ingested record before normalization, from any evidence source type
(client_transfer_report, client_internal_ledger, bank_statement, onchain_report,
psp_report, manual).
Field path
Requirement
Storage
Description
Examples / Notes
RawRecord.source
required
first_class
Ingestion channel
file, api, webhook, manual
RawRecord.sourceType
optional
first_class
Business category of the source
e.g. bank_statement, psp_report, onchain_report
RawRecord.provider
optional
first_class
Vendor or provider label
bridge, bvnk, icici, alchemy. Not valid for client_transfer_report/client_internal_ledger
RawRecord.integrationKey
optional
first_class
Technical connector identity
bridge:webhook, icici:daily-xlsx. Same source-type restriction as provider
RawRecord.sourceRef
required
first_class
Stable source-side identifier
provider id, tx hash, file row id
RawRecord.payload
required
json
Untouched source payload
Never edited; not an import mapping target
RawRecord.rowNumber
optional
first_class
Source row number for files
Used for row-level import feedback. Not valid for manual
Populated when the source represents actual money movement: bank statement row, PSP/provider
transfer event, on-chain transfer event, or payout confirmation.
Import profiles can target FlowLegReference.<referenceType> (e.g.
FlowLegReference.bank_reference, FlowLegReference.uetr) directly. This is a synthetic mapping
target β getSupportedImportMappingTargetsForSourceType() adds it for every source type that
supports FlowLegReference.
Legacy normalization: mapping targets of the form references.<type> (e.g.
references.bank_reference) are automatically normalized to FlowLegReference.<type> by
normalizeImportMappingTargetPath(). New mappings should use the FlowLegReference.<type> form
directly.
ReconciliationCase fields β system-written, not import targets
These fields are written by the matcher/evaluator (apps/api/src/services/matcher.ts), never by
import mappings. All have requirement: 'system' and are excluded from
getSupportedImportMappingTargetsForSourceType().
Field path
Description
Written from
ReconciliationCase.expectedAmount
Expected case amount, usually copied from PaymentIntent.sourceAmount
Set when the case is created
ReconciliationCase.actualAmount
Observed reconciled amount
The selected legβs amount (selectCaseEvaluationLeg)
ReconciliationCase.providerFee
Provider fee component for delta breakdown
payload.event_object.receipt.developer_fee, or prior value
ReconciliationCase.networkFee
Network/chain fee component for delta breakdown
payload.event_object.receipt.gas_fee, or prior value
ReconciliationCase.developerFee
Platform/developer fee component for delta breakdown
Prior value (not refreshed by the matcher today)
ReconciliationCase.fxSpread
FX variance/spread component for delta breakdown
payload.event_object.receipt.exchange_fee, or prior value
ReconciliationCase.roundingDelta
Rounding component for delta breakdown
Prior value (not refreshed by the matcher today)
ReconciliationCase.unexplainedDelta
Remaining unexplained amount after known deltas
reconcile() output β the key ops review field
sourceTypes for these fields reflects which evidence kinds can plausibly produce the underlying
fee data: providerFee/developerFee β psp_report/manual; networkFee β onchain_report/manual;
fxSpread/roundingDelta β client_transfer_report/psp_report/manual;
expectedAmount β client_internal_ledger/api_expectation; actualAmount/unexplainedDelta β
any evidence source type.
isSupportedImportMappingTarget(sourceType, path) decides whether a path is a valid value in
ImportProfile.fieldMappings for a given sourceType. A path is valid if:
Itβs a canonical field whose sourceTypes includes the requested sourceType, and it is
not in the import-mapping-excluded set (PaymentIntent.references, PaymentIntent.metadata,
RawRecord.source, RawRecord.payload, RawRecord.rowNumber, FlowLeg.metadata,
FlowLegReference.type, FlowLegReference.value, and every ReconciliationCase.* field), or
It normalizes (via normalizeImportMappingTargetPath) to FlowLegReference.<referenceType>
with a non-empty referenceType, and that source type supports FlowLegReference as a
mapping target.