API v1

Data model

Core ledger types and relationships.

Markdown version · llms.txt

BennyBooks has three primitives: transactions, notes, and receipts. Categories use stable codes from the ontology — see Reference → Ontology.

Transaction

FieldTypeNotes
iduuidPrimary key
datedateYYYY-MM-DD
amountnumberNegative = outflow, positive = inflow
currencystringDefault EUR
descriptionstringVendor / memo
categorystring?Canonical chart name; null = uncategorized
statusenumSee Transactions API page
sourceenumnordea | stripe | manual_csv
externalIdstring?Connector dedup key
suggestedBystring?Set when agent proposes category
confidencenumber?0.0–1.0
reasonstring?Human-readable explanation

Note

FieldTypeNotes
iduuidPrimary key
transactionIduuidParent transaction
contentstringFree text
authorUserIdstring?User or mcp:token id

Receipt

FieldTypeNotes
iduuidPrimary key
transactionIduuid?null if unlinked
fileNamestringOriginal filename
mimeTypestringMIME type
sizeBytesintegerFile size
ocrTextstring?Extracted text when available

Proposal

FieldTypeNotes
iduuidPrimary key
typeenumcategorization | note | receipt_link
statusenumpending | approved | rejected
payloadobjectIncludes category, categoryCode, evidence when applicable
proposedBystringmcp:token_id
confidencenumber?Agent confidence
reasonstring?Explanation

Audit log

Human UI: /log. Agents have no read endpoint in v1. See Guides → Audit Log.

FieldTypeNotes
iduuidPrimary key
actorstringmcp:<tokenId> or user:<clerkUserId>
toolstringe.g. propose_categorization, approve_proposal
payloadobjectRequest / review context
proposalIduuid?Links propose → approve/reject
createdAttimestamptzWhen the action was recorded