Skip to main content

API Overview

Base URL: http://localhost:8000

Interactive docs: http://localhost:8000/docs (Swagger UI)

Authentication

All endpoints (except /auth/register and /auth/login) require a JWT token:

Authorization: Bearer <access_token>

API Endpoints

Auth

MethodEndpointDescription
POST/api/v1/auth/registerRegister user + company
POST/api/v1/auth/loginLogin, get tokens
POST/api/v1/auth/refreshRefresh access token
GET/api/v1/auth/meGet current user

Chart of Accounts

MethodEndpointDescription
GET/api/v1/accounts/List accounts
GET/api/v1/accounts/treeAccount hierarchy tree
GET/api/v1/accounts/{id}Get account
POST/api/v1/accounts/Create account
PUT/api/v1/accounts/{id}Update account
DELETE/api/v1/accounts/{id}Delete account

Journal Entries

MethodEndpointDescription
GET/api/v1/journals/List entries
GET/api/v1/journals/{id}Get entry
POST/api/v1/journals/Create entry
PUT/api/v1/journals/{id}Update draft
DELETE/api/v1/journals/{id}Delete draft
POST/api/v1/journals/{id}/submitSubmit for approval
POST/api/v1/journals/{id}/approveApprove entry
POST/api/v1/journals/{id}/postPost entry
POST/api/v1/journals/{id}/reverseReverse entry

Financial Reports

MethodEndpointDescription
GET/api/v1/reports/trial-balanceTrial Balance
GET/api/v1/reports/balance-sheetBalance Sheet
GET/api/v1/reports/income-statementIncome Statement
GET/api/v1/reports/statement-of-equityStatement of Equity
GET/api/v1/reports/cash-flowCash Flow Statement
GET/api/v1/reports/general-ledgerGeneral Ledger

Documents

MethodEndpointDescription
POST/api/v1/documents/uploadUpload document
GET/api/v1/documents/List documents
GET/api/v1/documents/{id}Get document
GET/api/v1/documents/{id}/downloadDownload URL
DELETE/api/v1/documents/{id}Delete document

AI Processing

MethodEndpointDescription
POST/api/v1/ai/process-document/{id}Process with AI
GET/api/v1/ai/proposalsList proposals
POST/api/v1/ai/proposals/{id}/acceptAccept proposal
POST/api/v1/ai/proposals/{id}/rejectReject proposal

Other

MethodEndpointDescription
GET/api/v1/fiscal-periods/Fiscal periods
GET/api/v1/currencies/Currencies
GET/api/v1/cost-centers/Cost centers
GET/api/v1/projects/Projects
GET/api/v1/audit-log/Audit trail