Skip to main content

Transactions

A transaction is a single financial event β€” an expense, a purchase, or an income entry. ozzie-openapi uses AI to extract structured transaction data from natural language, images, PDFs, and spreadsheets via the stateless POST /v1/transactions/parse endpoint. Your application receives the parsed records and stores them.

What a parsed transaction contains​

FieldTypeDescription
amount_centsintegerAmount in cents (always positive)
currencystringISO 4217 code (e.g. USD, BRL, EUR)
categoryenumSpending category (see below)
envelopestringOne of the six budget envelope keys
descriptionstringShort label extracted by AI (max 60 chars)
transaction_datedateYYYY-MM-DD β€” extracted from input or defaults to today
ai_confidencefloatAI confidence score from 0.0 to 1.0

Categories​

Ozzie classifies every transaction into one of 10 categories:

CategoryExamples
foodGroceries, restaurants, coffee, delivery
transportGas, Uber, bus, parking, car maintenance
housingRent, mortgage, home repairs
utilitiesElectricity, internet, water, phone bill
healthDoctor, pharmacy, gym, dental
entertainmentStreaming, movies, games, concerts
educationCourses, books, tuition, school supplies
clothingClothes, shoes, accessories
incomeSalary, freelance, dividends, refunds
otherAnything that doesn't fit the above

Envelope mapping​

Each transaction is automatically mapped to one of the six budget envelopes:

CategoryEnvelope
housing, utilitiesbills
food, transportdaily_living
healthhealth_wellness
entertainment, education, clothinglifestyle
gifts, family, socialpeople

Your application uses the envelope field to compute spending against the user's plan allocations.

Input sources​

The POST /v1/transactions/parse endpoint accepts four input types:

TypeFormat
textNatural language string
imageBase64-encoded image (receipt or bank statement screenshot)
pdfExtracted text from a PDF
spreadsheetCSV rows as plain text

AI parsing​

When you submit "Spent $45 on groceries at Whole Foods and $5 on coffee", the endpoint returns two transactions β€” not one. The AI extracts every financial event mentioned.

The ai_confidence score tells you how sure the AI was:

ScoreMeaning
0.9 – 1.0High confidence β€” clear amount, category, and date
0.7 – 0.89Good β€” some inference was needed (e.g. currency from context)
0.5 – 0.69Moderate β€” ambiguous input, may want to confirm with user
< 0.5Low β€” could not extract reliably; consider re-prompting

How transactions fuel insights​

Parse results that your application stores can feed into:

  • Chat context β€” pass recent transactions in history or as system context in POST /chat/completion
  • Plan tracking β€” compute actual spend vs. budgeted allocations using envelope and amount_cents
  • Goal progress β€” track savings and debt payments over time
  • Spending trends β€” aggregate by category or envelope across any date range

β†’ See Transactions API Reference