Skip to main content

HTTP API reference

Extraction, invoices, aggregates, BI, and insights accept Authorization: Bearer with a bf_live_ API key or session JWT. Create and revoke bf_live_ keys only from the signed-in dashboard (not documented here). Billing and subscription webhooks are handled in the product UI, not in this catalog.

How the pieces connect

Arrows show a typical path; each box links to a topic page with every method and path listed.

Complete endpoint index

MethodPathTopicSummaryDetails
POST/api/extract-invoiceExtractionExtract from a public URL (http or https); JSON body with file_url.View
POST/api/extract-invoice-fileExtractionMultipart upload: file + optional invoice_kind.View
GET/api/invoicesInvoices & chart dataPaginated list of stored invoices for the authenticated user.View
GET/api/invoices/[id]Invoices & chart dataFetch one invoice by id (path param).View
PATCH/api/invoices/[id]Invoices & chart dataUpdate invoice_kind and/or parsed_data fields.View
DELETE/api/invoices/[id]Invoices & chart dataDelete a stored invoice.View
GET/api/invoices/aggregatesInvoices & chart dataMonthly revenue/expense series or top counterparties (groupBy=month|counterparty). Respects reporting currency like GET /api/bi/summary; response includes `caveats`.View
GET/api/bi/summaryBusiness metrics (BI)Period totals: revenue, expenses, profit, margin. When `profiles.reporting_currency` is set, amounts are converted with published daily reference rates; `caveats` lists `reportingCurrency`, `fxAsOf`, `excludedMissingCurrency`, and optional `fxError`.View
GET/api/bi/trendsBusiness metrics (BI)Month buckets with revenue, expenses, optional profit when single-currency.View
GET/api/bi/distributionBusiness metrics (BI)Top clients (revenue) and top vendors (expenses) for a date range.View
GET/api/insightsInsightsExecutive-style payload: data quality, insights, actions, summary text inputs.View
GET/api/actionsInsightsSame JSON as GET /api/insights (including optional narrative=1). Prefer /api/insights; kept for backwards compatibility.View
API reference · BillflowAI