Import bank-statement CSV rows for a customer
Changed onAccepts rows parsed from a bank-statement CSV in the accountant portal and posts them to the selected "deposit to" account. accountId is polymorphic — an integration_account id (Mercury/Ramp/Plaid), a bank_account id (legacy/manual), or a gl_account id (direct Chart-of-Accounts selection) — and is resolved to a concrete GL account before any rows are written. Rows are deduped by a stable (company, account/entity, date, amount, normalized description) identity stored in transactions.external_id, so re-uploading the same file produces zero duplicates. The command carries the concrete legal entity; it is mandatory for a direct GL-account import and must match any connected account owner. The categorization engine runs on the newly imported set. When the async job service is configured (the production default) the request returns 202 with a pending job to poll via the import-jobs endpoint; account resolution and row processing happen in the worker, and failures surface on the job record. Servers without the job service process synchronously and return 200 with the final summary.
Request
- Base URLhttps://api.medianfi.com/api/v1
- Auth
- HTTP bearer
- or API key in header X-API-Key
Path parameters
Request body
The "deposit to" account rows will post against. May be an integration_account id (Mercury/Ramp/Plaid), a bank_account id (legacy/manual), or a gl_account id (direct Chart-of-Accounts selection, e.g. Undeposited Funds); resolved server-side to a concrete GL account.
Concrete legal entity that owns the import. Required for direct GL-account imports; when the selected account is connected, this value must match its immutable entity owner.
Optional client-generated hash of the raw CSV content. Kept for tracing in raw payloads only; it does not scope row-level dedup.
Response
Import processed synchronously (job service not configured)
Final result of one CSV import run (ImportSummary in the API source)
Example response
{
"data": {
"resolvedAccount": {
"label": "1015 Personal Checking"
}
}
}Changes
- info
added the optional property
data/results/items/discrepancyto the response with the status - info
added the optional property
data/results/items/suspectedDuplicateOfto the response with the status - info
added the optional property
data/summary/oneOf[#/components/schemas/TransactionImportSummary]/results/items/discrepancyto the response with the status
1 more change in this revision
- info