Get a bank statement

View as Markdown

Poll this after uploading a PDF with extraction enabled — the terminal states are completed and failed, and extraction_error explains the latter.

Authentication

AuthorizationBearer

JWT issued via POST /api/v1/auth/sign_in. Used by mobile and SPA clients. Revoked tokens are rejected.

OR
AuthorizationBearer
Lucanto API key. Two prefixes: - `lct_pat_<random><checksum>` — personal access token (owner: User) - `lct_live_<random><checksum>` — workspace token, live data Issue keys at `/settings/api_keys` (personal) or `/:workspace_id/settings/api_keys` (workspace). Plaintext token is shown once and never again.

Path parameters

workspace_idlongRequired>=1
Workspace ID. The numeric ID shown in your URLs.
idlongRequired>=1
Bank statement ID

Response

OK
idlong
bank_account_idlong
file_typeenum
sourceenum

psd2 — downloaded by a bank connection. manual — uploaded, whether through the app or this API.

extraction_statusenum

AI extraction state, PDF only. manual means no extraction was ever requested — the normal terminal state for an archived PDF and for every XML statement, whose transactions come from parsing, not AI.

created_atdatetime
updated_atdatetime
bank_accountobject

Slim embed of the owning account — identity only, no balances.

period_fromdate or null
First day covered by the statement. Read from the camt.053 header for XML, supplied by the caller for PDF, null when neither applies.
period_todate or null

Last day covered by the statement. Same semantics as period_from.

original_filenamestring or null
extraction_errorstring or null
Why extraction failed
extraction_completed_atdatetime or null
transactions_createdinteger or null

Transactions this statement produced. Populated on import; 0 for an archived PDF until extraction completes.

transactions_skippedinteger or null
Rows recognised as already present and therefore not duplicated.
entry_countsmap from strings to integers

Rows in the AI-extraction staging area, grouped by status, e.g. {"imported": 42, "pending": 3}.

Only PDF statements that went through extraction have these — an extracted PDF stages its rows for review before they become transactions. XML statements are always {}: camt.053 parsing creates transactions directly, with no staging step, so transactions_created / transactions_skipped is where an XML import reports itself.

Errors

401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error