Reference

Introduction to the Open Ledger API.

The Open Ledger API provides a comprehensive set of endpoints for managing your financial data. Our REST API allows you to seamlessly integrate with our platform and build custom solutions that meet your specific needs.

API Structure

Our API is organized around the following core resources:

Authentication

Generate API tokens for secure access

Entities

Create and manage financial entities

Transactions

Record and categorize financial transactions

Reports

Generate financial reports and statements

Banks

Connect and manage bank accounts

Integrations

Connect third-party services

AI Analysis

Access AI-powered financial insights

Sandbox

Test and develop with sample data

Base URL

All API requests should be made to the following base URL:

https://api.openledger.com/v1

For development and testing, you can use our sandbox environment:

https://api-staging.openledger.com/v1

Core API Resources

Authentication

Authenticate with the Open Ledger API to receive a JWT token for API access.

1POST /v1/auth/tokens # Generate authentication token (unified endpoint)

Backward Compatibility Endpoints:

1POST /v1/developers/auth/generate-token # Legacy developer token endpoint
2POST /v1/entities/auth/generate-token # Legacy entity token endpoint

Entities (Financial Entities)

Entities represent financial entities like companies or organizations.

1GET /v1/entities?entityId={id} # Get entity details with entityId parameter
2POST /v1/entities # Create an entity
3PUT /v1/entities?entityId={id} # Update an entity with entityId parameter
4DELETE /v1/entities?entityId={id} # Delete an entity with entityId parameter
5GET /v1/entities/developer-entities # Get entities by developer ID

Transactions

Transactions record financial activities between accounts.

1GET /v1/transactions?entityId={id} # List transactions with optional filters
2POST /v1/transactions?entityId={id} # Create a transaction
3POST /v1/transactions/edit # Edit a transaction
4DELETE /v1/transactions?entityId={id} # Delete a transaction with transactionId
5PUT /v1/transactions/approve?entityId={id} # Approve transactions
6GET /v1/transactions/by-month?entityId={id} # Get transactions by month
7POST /v1/transactions/categorize?entityId={id} # Categorize a transaction
8POST /v1/transactions/search?entityId={id} # Search transactions
9GET /v1/transactions/chat?entityId={id} # Interactive transaction prompting

Reports

Generate financial reports and statements.

1GET /v1/reports/generate?entityId={id} # Generate financial statements
2GET /v1/reports/general-ledger?entityId={id} # Get general ledger report
3GET /v1/reports/overview?entityId={id} # Get financial overview

Banks

Manage bank connections and accounts.

1POST /v1/banks/create-link?entityId={id} # Create a Plaid link token
2PUT /v1/banks/accounts?entityId={id} # Add bank accounts using a public token

Integrations

Connect and manage third-party integrations.

1GET /v1/integrations/status?entityId={id} # Get integration status
2POST /v1/integrations/connect # Connect a third-party integration
3POST /v1/integrations/disconnect # Disconnect a third-party integration
4GET /v1/integrations/{entityId}/callback # Handle integration callback

AI Features

AI-powered analysis and tools.

1POST /v1/ai/{entityId}/detect-tool-call # Detect which tool to use
2POST /v1/ai/{entityId}/detect-query-filter # Detect query filters
3POST /v1/ai/{entityId}/prompt-transaction-vector # Vector-enhanced transaction prompting
4POST /v1/ai/{entityId}/suggest-categories-vector # Vector-enhanced category suggestions

Developers

Manage developer accounts and API keys.

1GET /v1/developers?developerId={id} # Get developer details
2POST /v1/developers # Create a developer
3PUT /v1/developers?developerId={id} # Update developer details
4DELETE /v1/developers?developerId={id} # Delete a developer
5POST /v1/developers/sandbox # Create a sandbox environment

Authentication

Open Ledger uses bearer token authentication. Include your JWT token in the Authorization header:

1Authorization: Bearer YOUR_JWT_TOKEN

Common Parameters

Most endpoints require an entityId to specify which financial entity’s data you’re working with. This can be provided as a query parameter:

1?entityId=entity_12345

Pagination

List endpoints in the Open Ledger API support cursor-based pagination. You can control pagination using the following query parameters:

  • cursor: Pagination cursor for retrieving the next set of results
  • pageSize: Number of items per page (default: 25-50, max: 100)

Paginated responses include metadata about pagination:

1{
2 "data": [...],
3 "nextCursor": "cursor_abc123",
4 "hasMore": true
5}

API Documentation

For complete API documentation, you can refer to our: