FineFlow Backend API

Personal finance tracking with AI-powered insights and multi-currency support

Transactions API
Full CRUD operations for tracking income and expenses

GET /api/transactions - List transactions with filters

POST /api/transactions - Create new transaction

GET /api/transactions/[id] - Get single transaction

PATCH /api/transactions/[id] - Update transaction

DELETE /api/transactions/[id] - Delete transaction

Wallets API
Manage multiple wallets with different currencies

GET /api/wallets - List all wallets

POST /api/wallets - Create new wallet

GET /api/wallets/[id] - Get wallet with stats

PATCH /api/wallets/[id] - Update wallet

DELETE /api/wallets/[id] - Delete wallet

Categories API
System and custom categories for organizing transactions

GET /api/categories - List all categories

POST /api/categories - Create custom category

Filter by type: ?type=ingreso|gasto

Analytics API
Spending analytics and trend data for charts

GET /api/analytics - Get financial analytics

Periods: ?period=7d|30d|90d|1y

Returns: summary, charts data, top categories

AI Chat API
RAG-powered financial assistant with real data access

POST /api/ai/chat - Chat with AI assistant

Tools: transaction summary, spending analysis, trends

GET /api/ai/insights - Auto-generated insights

Currency API
Multi-currency conversion with VES/P2P support

POST /api/currency/convert - Convert amounts

GET /api/currency/rates - Get exchange rates

Includes P2P and BCV official rates for Venezuela

Assets/Portfolio API
Track investments: crypto, stocks, commodities

GET /api/assets - List assets with P/L

POST /api/assets - Add new asset

POST /api/assets/[id]/transactions - Record buy/sell

GET /api/portfolio/summary - Portfolio overview

Debts/Lending API
Track money lent and borrowed with payments

GET /api/debts - List all debts

POST /api/debts - Create lend/borrow record

POST /api/debts/[id]/payments - Record payment

GET /api/debts/summary - Net position

Budgets API
Set spending limits by category with alerts

GET /api/budgets - List budgets with status

POST /api/budgets - Create budget

PATCH /api/budgets/[id] - Update budget

Periods: weekly, monthly, quarterly, yearly

Dashboard API
Complete financial overview in one call

GET /api/dashboard/summary

Returns: balances, budgets, debts, rates

Includes VES P2P vs BCV gap percentage

Reports API
Detailed monthly financial reports

GET /api/reports/monthly

Query: ?year=2026&month=2

Returns: by category, by wallet, daily breakdown

Recurring API
Manage recurring transactions

GET /api/recurring - List recurring

POST /api/recurring - Create recurring

DELETE /api/recurring/[id]?stop_only=true

Patterns: daily, weekly, monthly, yearly

Enums API
Dynamic enum values from the database

GET /api/enums - All enum values

GET /api/enums?name=wallet_type

Types: wallet_type, transaction_type, payment_method

Getting Started
All endpoints require authentication. Sign up or log in to start using the API.