Transaction Categories
The transaction categories endpoints allow you to create and retrieve categories for your entities’ chart of accounts. Categories represent the different account classifications used to categorize financial transactions in double-entry bookkeeping.
Category Objects
A category in Open Ledger represents a specific account in your chart of accounts. Based on the actual database schema, each category has the following properties:
Category Types
Open Ledger supports the following category types:
- ASSET: Resources owned by the entity (cash, accounts receivable, inventory)
- LIABILITY: Obligations owed by the entity (accounts payable, loans)
- EQUITY: Owners’ interests in the entity (capital, retained earnings)
- REVENUE: Income earned from business activities (sales, service fees)
- EXPENSE: Costs incurred in business operations (rent, salaries, utilities)
Financial types provide more specific categorization within these broader types, such as:
- CASH, ACCOUNTS_RECEIVABLE, INVENTORY (Asset subtypes)
- ACCOUNTS_PAYABLE, SHORT_TERM_DEBT (Liability subtypes)
- RETAINED_EARNINGS, OWNER_EQUITY (Equity subtypes)
- SALES, SERVICE_REVENUES (Revenue subtypes)
- PAYROLL_EXPENSES, RENT_EXPENSES (Expense subtypes)
Create a Category
Create a new transaction category in the entity’s chart of accounts.
Query Parameters
Request Body
Response
List Categories
Retrieve a list of transaction categories for an entity.
Query Parameters
Response
Default Categories
When you create a new entity, Open Ledger automatically creates a set of default categories to get you started:
Asset Categories
- Cash (1001) - Cash and bank accounts
- Accounts Receivable (1002) - Money owed by customers
- Prepaid Expenses (1003) - Expenses paid in advance
- Inventory (1004) - Goods for sale
Liability Categories
- Accounts Payable (2001) - Money owed to vendors
- Credit Cards (2002) - Credit card liabilities
- Loans Payable (2003) - Outstanding loans
Equity Categories
- Owner’s Equity (3001) - Owner investment in the business
- Retained Earnings (3002) - Accumulated profits
Revenue Categories
- Sales Revenue (4001) - Income from product sales
- Service Revenue (4002) - Income from services
- Interest Income (4003) - Income from investments
Expense Categories
- Rent Expense (5001) - Office and facility rent
- Utilities Expense (5002) - Electricity, water, internet
- Salaries Expense (5003) - Employee compensation
- Marketing Expense (5004) - Advertising and promotion
- Office Supplies (5005) - General office materials
Category Integration
Categories in Open Ledger serve multiple purposes:
Transaction Categorization
Categories are used to classify transactions for proper accounting:
- Each transaction must specify a debit category and credit category
- Categories determine which financial statements the transaction appears on
- Proper categorization ensures accurate financial reporting
Chart of Accounts
Categories form your entity’s chart of accounts:
- Hierarchical structure with parent-child relationships
- Numeric codes for easy reference and sorting
- Financial types for detailed classification
TigerBeetle Integration
Categories are backed by TigerBeetle accounts for high-performance processing:
- Each category can have an associated
tbAccountId
- Real-time balance calculations
- Audit trail and transaction history
Error Handling
Example error response: