Skip to main content
This guide covers how to import transaction data from external sources into Matcher for reconciliation.

Supported formats


Matcher accepts transaction files in three general-purpose formats:
  • CSV: Comma-separated values with headers. Most common for bank exports.
  • JSON: Array of transaction objects. Best for API integrations.
  • XML: Structured elements. Common for enterprise systems.
Beyond these, the upload endpoint also accepts specialized banking formats such as camt053 and the namespaced descriptor keys from the format catalog (CNAB, acquirer layouts). See Import formats for the full catalog.

File structure requirements


Each file must contain transaction records with fields you can map to Matcher’s internal schema.

Required fields

Every transaction must have these fields (or mappable equivalents):

Optional fields

Matcher keeps unmapped columns as transaction metadata.

Debit and credit column

Some files mark each row as debit or credit in a separate column. To read the sign from that column, map the optional direction key to an object {column, debit, credit}:
A debit row imports with a negative amount, and a credit row imports with a positive amount. With direction mapped, the amount column must be unsigned. A signed amount, an empty direction cell, or an unknown direction value rejects the row. Matcher reads direction in CSV, JSON, and XML files only.

Format examples


CSV

CSV Requirements:
  • First row must be column headers
  • UTF-8 encoding and comma delimiter by default (configurable)
  • Quote fields containing commas or newlines
Code example

JSON

JSON Requirements:
  • An array of objects, or a single object
  • Consistent field names across objects
  • UTF-8 encoding by default (configurable)
Code example

XML

XML Requirements:
  • Well-formed XML
  • Record elements named transaction, row, record, item, or entry
  • UTF-8 encoding by default (configurable)
Code example

Upload via API


Use the import endpoint to upload transaction files.

Preview before uploading

Before committing a file for ingestion, you can preview it to verify column detection and sample data. This helps catch field mapping issues early.
cURL

Response

API Reference: Preview file

Single file upload

cURL
Send the format field before the file part. If file arrives first, Matcher infers the format from the filename extension for .csv and .json only. Matcher never infers .xml, because it is a format family that covers plain XML and camt.053. Send the explicit format field for XML. Matcher rejects the upload without it.
Matcher parses and stores the whole file inside the upload request. Upload returns 202 Accepted with the finished job. When the import fails, Matcher answers with an error instead of the job. Matcher reads an idempotency key only from the X-Idempotency header, and only when you send one. A request that carries a key only in X-Idempotency-Key or Idempotency-Key is refused with 400 (MTCH-0015), and nothing is processed. A replayed answer carries the X-Idempotency-Replayed header.
The upload limit is 1 GiB. It counts the whole request body of the upload, including every part, part header, and boundary, not only the file.
Matcher refuses an upload larger than the upload limit with 413 (MTCH-0010). It refuses an upload that stops sending data for too long with 408 (MTCH-0311).
API Reference: Upload file

Response

Check import status

cURL
API Reference: Get import status

Response (Processing)

Response (Completed)

Per-row parse/normalization errors are not embedded in the job. When completedWithErrors is true (or the job FAILED), fetch the details from GET /v1/imports/contexts/{contextId}/jobs/{jobId}/errors (capped at 100 stored rows, with totalErrors/truncated accounting). For a wholesale FAILED job, diagnosis carries a safe one-line reason.
reviewRows counts rows with a blank external_id that Matcher imports with status PENDING_REVIEW. This happens when the source sets blank_external_id to NEEDS_REVIEW in its config. With the default, REJECT, a blank external_id fails the row.

Import job status values

Validation and error handling


Matcher validates uploaded files at multiple stages.

Validation stages

1

Format Validation

Verifies the file is valid CSV, JSON, or XML with correct structure.
2

Schema Validation

Checks that required fields are present and match the configured field map.
3

Data Type Validation

Validates amounts are valid decimals, dates are parseable, currencies are valid ISO codes.

Common validation errors

Each row error carries the row number, the field when one applies, and a message. Common messages:

Handling errors

By default, Matcher imports valid rows even if some rows have errors. To fail the job when failed rows exceed a percentage, set fail_on_error_rate_percent (1 to 99) in the source config.

Duplicate detection


Matcher automatically detects and handles duplicate transactions to prevent double-counting.

How duplicates are detected

By default, a row is a duplicate when it repeats the external_id of a row from the same source, within the same upload or against already-persisted data. To detect duplicates on other fields, set duplicate_key in the source config. Its value is an ordered list of field-map names, such as ["external_id", "amount"].

Duplicate handling options

Set the duplicate_policy key in the source config to control handling: When duplicate_policy is absent, FLAG_AS_EXCEPTION applies.

Viewing duplicate details

The import summary shows the number of duplicates:

Batch uploads


For large reconciliation jobs, you can upload multiple files in sequence.

Upload multiple files

Wait for all imports

Before running matching, make sure all imports are complete.

Search uploaded transactions


After importing files, you can search across all transactions in a context to verify data quality or investigate specific records.
cURL

Response

API Reference: Search transactions
Supported filters include amount_min, amount_max, date_from, date_to, currency, source_id, status, exact external_id match via the reference parameter, and free-text search via the q parameter.

Best practices


Check file format and encoding locally before uploading. This catches obvious errors faster.
Standardize on ISO 8601 format (YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ) across all sources to avoid parsing issues.
Always include unique transaction IDs from the source system. This enables proper duplicate detection and audit trails.
Decide on a convention (negative for debits, positive for credits) and apply it consistently. When a file marks debits and credits in a separate column, map that column with the direction key instead.
For files larger than 50 MB, consider splitting them into smaller chunks by date range. This is a reliability recommendation, not the upload limit, and allows partial retries.
For recurring reconciliation, automate file uploads using scheduled jobs.

Next steps


Reviewing Matches

Learn how to interpret match results and confidence scores.

Field Mapping

Configure how source fields map to Matcher’s schema.