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
| HTTP | Code | Meaning |
|---|---|---|
| 400 | INVALID_PDF / VALIDATION_ERROR | Malformed PDF header, missing payload, or unsupported output format. |
| 401 | MISSING_API_KEY / INVALID_API_KEY | API key missing or unrecognized. |
| 402 | PAGE_LIMIT_EXCEEDED / INSUFFICIENT_CREDITS | Free trial > 5 pages or insufficient remaining page credits. |
| 403 | KEY_REVOKED / PRODUCT_MISMATCH | Key revoked after refund/chargeback, or order belongs to another product. |
| 413 | PAYLOAD_TOO_LARGE | Uploaded PDF exceeds the 10 MiB limit. |
| 422 | SCANNED_PDF_UNSUPPORTED | Image-only scanned PDF (< 40 selectable text chars). Zero credits deducted. |
| 429 | RATE_LIMITED | IP or API key rate limit exceeded; inspect Retry-After. |