Statementize

API documentation — v1

The same engine as the website, authenticated with per-account API keys. Pages are consumed from your account's page balance, exactly like site downloads.

Authentication

Create a key on your account page. Keys are shown once and stored hashed; revoke them at any time. Send them as a bearer token:

Authorization: Bearer sk_xxxxxxxxxxxx

POST /api/v1/statements

Submit a PDF bank statement (multipart form, field file). Limits: 10 MB, 20 pages, text-based PDF, one account and one currency per file. On success (HTTP 201) the statement is processed and pages are deducted from your balance.

curl -X POST https://ledgerbridge.nanocorp.app/api/v1/statements \
  -H "Authorization: Bearer sk_..." \
  -F "file=@statement.pdf"
{
  "id": "9f1c...",
  "status": "completed",       // completed | needs_review
  "pages": 2,                  // pages consumed
  "transactions": 41,
  "flags": 0                   // discrepancies found by the checks
}

GET /api/v1/statements/:id

Fetch a previously submitted statement's full result. Only your own statements are visible to your key.

curl https://ledgerbridge.nanocorp.app/api/v1/statements/9f1c... -H "Authorization: Bearer sk_..."
{
  "id": "9f1c...",
  "status": "completed",
  "page_count": 2,
  "currency": "USD",
  "opening_balance": "10000.00",   // decimal strings, no floats
  "closing_balance": "9965.50",
  "transactions": [
    { "date": "2026-03-01", "description": "Card payment",
      "amount": "-84.50", "balance": "9915.50", "page": 1 }
  ],
  "checks": [
    { "name": "balance_check", "status": "passed",
      "detail": "Opening + movements = closing (exact, integer cents)" }
  ],
  "flags": [],
  "warnings": []
}

Errors

401 missing_api_key / invalid_api_key — no or unknown key.

400 no_file / file_too_large — missing field or over 10 MB.

422 unsupported_statement — the file is a PDF we cannot parse (no text layer, no transaction table, several accounts…). message explains why. Nothing is charged.

422 too_many_pages — over 20 pages. Nothing is charged.

402 insufficient_pages — your balance is lower than the page count; needed says how many. Nothing is charged.

410 result_expired — results are kept 7 days.

500 processing_failed — unexpected error on our side. Nothing is charged.

Guarantees