BankSheet logo BankSheet API v1
REST API REFERENCE · v1.0.0

BankSheet API Documentation

Base URL: https://banksheet.meluon.fun · All statements are processed strictly in RAM with exact BigInt integer-cent math and zero database/disk retention.

Authentication

Authenticated endpoints accept your bs_live_... API key via Authorization: Bearer bs_live_... or X-API-Key: bs_live_.... Purchase non-expiring page credit packs on the pricing page.

1. Health Check

GET /api/v1/health

Returns service status, version, math_engine: "bigint-cents-exact", and pdf_engine: "pdfjs-coordinate-table".

2. Sample Multi-Page Statement PDF

GET /api/v1/demo/sample-pdf

Returns a live-generated 2-page Chase Business Complete Checking sample PDF (application/pdf, 18 transactions with wrapped descriptions and exact reconciling balances).

3. Free Trial Conversion (Max 5 Pages)

POST /api/v1/demo/convert

Rate-limited (10/min, 30/day per IP; max 5 pages/PDF — statements over 5 pages return 402 PAGE_LIMIT_EXCEEDED). Accepts multipart/form-data (file), raw application/pdf, or JSON { "pdf_base64": "...", "output": "bundle" } or { "sample": true }.

4. Authenticated PDF Conversion

POST /api/v1/convert?output=json|bundle|qbo|xero_csv|csv|xlsx
Authorization: Bearer bs_live_...

Deducts page_count credits atomically after validating the PDF. Invalid or scanned image-only PDFs (422 SCANNED_PDF_UNSUPPORTED) never deduct credits. Response headers include X-BankSheet-Pages-Charged and X-BankSheet-Credits-Remaining.

Multipart Upload Example (Download .QBO)

curl -X POST "https://banksheet.meluon.fun/api/v1/convert?output=qbo" \
  -H "Authorization: Bearer bs_live_your_key" \
  -F "file=@chase-oct-2026.pdf" \
  -o chase-oct-2026.qbo

JSON Base64 Example (Structured JSON + Export Token)

curl -X POST "https://banksheet.meluon.fun/api/v1/convert" \
  -H "Authorization: Bearer bs_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"pdf_base64":"JVBERi0xLjQK...","filename":"statement.pdf","output":"json"}'

Zero-Credit Format Re-Export

GET /api/v1/convert/export/:export_token/:format
Authorization: Bearer bs_live_your_key

Download qbo, xero_csv, csv, or xlsx from a recent JSON conversion (valid 10 minutes in RAM) without spending additional page credits.

5. Check Credit Balance

GET /api/v1/credits
Authorization: Bearer bs_live_your_key

Returns plan, credits, credits_purchased, pages_converted, and rate_limit_rpm.

Error Codes

HTTPCodeMeaning
400INVALID_PDF / VALIDATION_ERRORMalformed PDF header, missing payload, or unsupported output format.
401MISSING_API_KEY / INVALID_API_KEYAPI key missing or unrecognized.
402PAGE_LIMIT_EXCEEDED / INSUFFICIENT_CREDITSFree trial > 5 pages or insufficient remaining page credits.
403KEY_REVOKED / PRODUCT_MISMATCHKey revoked after refund/chargeback, or order belongs to another product.
413PAYLOAD_TOO_LARGEUploaded PDF exceeds the 10 MiB limit.
422SCANNED_PDF_UNSUPPORTEDImage-only scanned PDF (< 40 selectable text chars). Zero credits deducted.
429RATE_LIMITEDIP or API key rate limit exceeded; inspect Retry-After.