Stage a bank statement for review

Stages a PDF bank statement of one payment account (payment_account_id) for the statement review page, as the Import page's PDF upload does: inline (file_name ending in .pdf, without folders, content_base64, at most 700 KiB decoded) or by attachment_id, a PDF the person attached in Cybooks AI (needs access_ask_cybooks; at most 20 MB), with an optional sha256 checked against the file either way. The file name is only the run's label: the file is stored under a key of its own. The file is kept in the company's own storage and the run answers 202 with its id, status extracting, source_format pdf, payment_account_id, original_filename and the review page (route_name, path). The statement is read in the background and the run moves to pending, or to extraction_failed when it cannot be read or its read cannot be queued (the review page shows it; stage it again); no bank transaction is created. The person imports it on the review page, which checks the currency, the account identity, overlapping periods and the opening and closing balances first. 404 payment_account_not_found, 404 attachment_not_found (another person's attachment, or none), 409 feed_sent_nothing for a connected account whose feed has sent nothing yet, 403 bank_statement_pdf_import_unavailable while PDF import is off, 403 cybooks_ai_access_required for an attachment without Cybooks AI access, 422 statement_not_pdf (no PDF header within the first 1024 bytes), 422 statement_base64_invalid, 422 statement_checksum_mismatch, 422 statement_too_large, 503 import_manager_unavailable while the import tables are upgraded. Requires an Idempotency-Key: the same key and request replays the first run. Requires the imports:write OAuth scope with manage_imports and view_bank_accounts.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Fields accepted to stage a bank statement for review. The schema identifies required and optional values.

A PDF bank statement of one payment account, staged for the statement
review page: inline (content_base64 with file_name) or a PDF the person
attached in Cybooks AI (attachment_id).

uuid
required

The payment account the statement belongs to, as listed by GET /v1/payment-accounts

uuid

A PDF the person attached in Cybooks AI (its id). Send this or content_base64, not both

string
length ≤ 255
\.pdf$

The statement's file name, ending in .pdf, without folders (no / or \). Required with content_base64

string
length ≤ 955736

The PDF, standard base64, no data: prefix; at most 700 KiB decoded, line breaks not counted

string
^[A-Fa-f0-9]{64}$

Hex SHA-256 of the PDF; refused when it does not match

Headers
string
required
length ≤ 191

Required unique key whose request hash and terminal response are stored durably for 24 hours.

Responses

Language
Credentials
OAuth2
Missing 1 required scope
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*