LedgerRocket API Documentation
Welcome to the LedgerRocket API - a comprehensive financial ledger platform built for modern fintech applications. Our API provides enterprise-grade double-entry accounting, event-driven transaction processing, and real-time balance queries.
What is LedgerRocket?
LedgerRocket is a distributed ledger system that helps you:
-
Track financial transactions with double-entry accounting precision
-
Process events through customizable templates that generate journal entries
-
Query balances in real-time across accounts, entities, and ledgers
-
Manage multi-tenant environments with site-level isolation
-
Maintain audit trails with immutable event and transfer records
API Architecture
The LedgerRocket API is composed of three core services, each handling specific aspects of the ledger system:
🏦 Ledger Service (/v2/ledger/*)
Manages the foundational ledger structures:
-
Sites - Multi-tenant environments for platform isolation
-
Entities - Legal entities (companies, individuals, custodians)
-
Ledgers - Entity-currency ledgers containing financial accounts
-
Accounts - Financial accounts with chart of accounts codes
-
Metadata - Countries, currencies, event types, products, categories
⚡ Event Service (/v2/event-service/*)
Handles transaction processing and event ingestion:
-
Events - Ingest business events that trigger financial transactions
-
Templates - Define how events map to journal entries
-
Transfers - Query transfer history by account
-
Validation - Dry-run validation for events and templates
📊 Balance Service (/v2/balances/*)
Provides real-time financial data queries:
-
Account Balances - Current and historical balance queries
-
Balance History - Point-in-time balance snapshots
-
Transfers - Transfer lookups across the ledger
-
Events - Balance impact of specific events
Development Status
⚠️ This is a Development Environment
The API documented here is actively being developed and improved. Expect:
-
New features and endpoints to be added regularly
-
Occasional breaking changes as we refine the design
-
Response schemas to evolve based on real-world usage
-
Performance optimizations as we scale
Production API - Once available, production documentation will be published separately with stability guarantees and versioning commitments.
Quick Start
1. Get Credentials
Contact your LedgerRocket representative to receive:
-
API Key for machine-to-machine access
-
OAuth credentials for user authentication (if applicable)
2. Choose Your Service
Explore the three API services in the navigation:
-
Unified API - All services combined (recommended for exploration)
-
Ledger Service - Ledger management only
-
Event Service - Event processing only
-
Balance Service - Balance queries only
3. Authentication
Include your API key in all requests:
curl -H "X-API-Key: your-api-key-here" \
https://dev.ledgerrocket.com/v2/ledger/api/v1/sites
For user sessions (dashboard/UI), include a JWT token:
curl -H "Authorization: Bearer <your-jwt-token>" \
https://dev.ledgerrocket.com/v2/balances/api/v1/accounts
4. Try the API
Use the "Try It" feature in the API reference to test endpoints directly from your browser. No code required!
Common Workflows
Creating a Ledger System
-
Create a Site - Establish your multi-tenant environment
-
Create Entities - Add legal entities (companies, users)
-
Create Ledgers - Set up entity-currency ledgers
-
Create Accounts - Add financial accounts to ledgers
-
Set up Templates - Define event-to-transaction mappings
Processing Transactions
-
Send Events - POST events to
/v2/event-service/api/v1/events -
Validate First - Use validation endpoints to dry-run events
-
Query Transfers - Check resulting transfers via Event or Balance service
-
Monitor Balances - Track account balances in real-time
Querying Financial Data
-
List Accounts - Get all accounts for a site
-
Get Account Balance - Fetch current balance for specific account
-
Balance History - Query historical balances at specific dates
-
Transfer Lookups - Search transfers by various criteria
API Conventions
Multi-Tenancy
Most resources are scoped to a Site ID. Include the site_id in the path:
/api/v1/sites/{site_id}/accounts
/api/v1/sites/{site_id}/templates
Resource IDs
-
UUIDs are used for all resource identifiers
-
IDs are immutable once created
-
External IDs can be provided for integration with your systems
Pagination
List endpoints support pagination:
-
limit- Number of results per page (default: 50, max: 100) -
offset- Number of results to skip -
Response includes
total_countfor total available records
Error Handling
API errors follow standard HTTP status codes:
-
400- Bad Request (invalid parameters) -
401- Unauthorized (missing/invalid credentials) -
404- Not Found (resource doesn't exist) -
422- Unprocessable Entity (validation failed) -
500- Internal Server Error (something went wrong on our end)
Error responses include a message explaining what went wrong.
Need Help?
-
Email: support@ledgerrocket.com
-
Documentation: https://docs.ledgerrocket.com
-
Status Page: Monitor service health at
/v2/{service}/healthendpoints
Next Steps
-
Browse the API Reference - Explore endpoints in the left sidebar
-
Review Schemas - Understand request/response structures
-
Test Endpoints - Use "Try It" to make real API calls
-
Build Integration - Start integrating LedgerRocket into your application
Happy building! 🚀