Direct Transactions
Directly import and manage transactions in Open Ledger.
Open Ledger offers a comprehensive Transaction API that allows for direct manipulation of transaction data within your application. This provides you with full control over how transactions are created, categorized, and managed in your financial ledger.
Transaction API Endpoints
The following endpoints are available for managing transactions:
Creating Transactions
To create a new transaction, send a POST request with the transaction details:
Response:
Getting Transactions
Retrieve transactions with optional filtering:
Response:
Approving Transactions
To approve a transaction (change status from PENDING
to POSTED
):
Response:
Getting Transactions by Month
Retrieve transactions for a specific month:
Categorizing Transactions
Assign categories to transactions:
Searching Transactions
Search for transactions with advanced filtering:
AI Transaction Categorization
Open Ledger provides AI-powered transaction categorization that can automatically suggest ledger accounts for each transaction:
Response:
Natural Language Interaction
Interact with your transactions using natural language:
Transaction Status Values
Open Ledger supports the following transaction status values:
Best Practices
-
Provide Clear Descriptions: Include detailed, searchable descriptions for each transaction to make reporting more useful.
-
Use Double-Entry Accounting: Always specify both debit and credit accounts for proper ledger balance.
-
Handle Status Properly: Use the appropriate transaction status values and follow proper approval workflows.
-
Leverage AI Categorization: Use the AI categorization capabilities to reduce manual work and improve accuracy.
-
Group Related Transactions: Use metadata to link related transactions for better tracking and reporting.
-
Validate Input Data: Ensure amounts, account IDs, and other data are valid before submitting to the API.
-
Implement Error Handling: Be prepared to handle and retry API failures gracefully.
-
Regular Reconciliation: Periodically approve and reconcile pending transactions to maintain up-to-date entities.
Error Responses
When an error occurs, the API will return an appropriate HTTP status code and a JSON response:
Common HTTP status codes:
400 Bad Request
: Missing or invalid parameters401 Unauthorized
: Authentication failure403 Forbidden
: Permission denied404 Not Found
: Resource not found500 Internal Server Error
: Server-side error