Skip to content

Enrich transactions from a detailed bank export

POST/api/v1/transactions/enrich-from-export

Match the rows of a bank "account activity" export to transactions already in a ledger (same amount, date within date_tolerance_days, count-aware, exact description preferred) and add what the export knows: wire originators, mobile-deposit payers and other detail columns are appended to the description and set as the counterparty.

Columns are auto-detected (originator, payer, beneficiary, additional details, memo, ...) and echoed back as column_mapping; override them with column_mapping. dry_run (default true) returns the proposals without writing. A description or counterparty a person set by hand is left alone unless overwrite_user_edits is true; a counterparty derived from invoices/bills is never replaced.

Operation ID: statement_ingest_enrich_from_export·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

s3_keystringrequired

S3 key of the bank activity export (CSV or Excel).

ledger_idstringrequired

Bank ledger whose existing transactions are enriched.

dry_runboolean

Preview the proposed changes without writing (default true).

overwrite_user_editsboolean

Also change descriptions and counterparties a person set by hand. A counterparty derived from invoices/bills is never replaced.

column_mappingobject

Optional {role: header} overrides: date, amount, debit, credit, description, party (name used as counterparty), detail (text appended to the description). Detected columns are echoed back.

date_tolerance_daysinteger

Max days between export row and transaction.

set_counterpartyboolean

Set the counterparty to the extracted payer/originator.

append_descriptionboolean

Append the extracted detail to the description.

Responses

201Successful Response

successboolean
messagestring
codestring
dataEnrichFromExportResponse

400Bad Request - Invalid input

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

401Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

403Forbidden - Insufficient permissions

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

404Not Found - Resource does not exist

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

422Validation Error

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.