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

API Versioning

The Open Ledger API uses URL versioning. The current version is v1. Always include the version in your API requests:

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

Core API Resources

Authentication

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

1POST /v1/developers/auth/generate-token # Generate authentication token

Entities (Financial Entities)

Entities represent financial entities like companies or organizations.

1GET /v1/entities # Get entity details with entityId parameter
2POST /v1/entities # Create an entity
3PUT /v1/entities # Update an entity with entityId parameter
4DELETE /v1/entities # Delete an entity with entityId parameter

Transactions

Transactions record financial activities between accounts.

1GET /v1/transactions # List transactions with optional filters
2POST /v1/transactions # Create a transaction
3PUT /v1/transactions # Approve a transaction
4DELETE /v1/transactions # Delete a transaction
5GET /v1/transactions/by-month # Get transactions by month
6POST /v1/transactions/categorize # Categorize a transaction
7POST /v1/transactions/search # Search transactions
8GET /v1/transactions/chat # Interactive transaction prompting

Reports

Generate financial reports and statements.

1GET /v1/reports/financial # Generate financial statements
2GET /v1/reports/general-ledger # Get general ledger report

Banks

Manage bank connections and accounts.

1GET /v1/banks/create-link # Create a Plaid link token
2PUT /v1/banks/accounts # Add bank accounts using a public token

Integrations

Connect and manage third-party integrations.

1GET /v1/integrations/status # Get integration status
2POST /v1/integrations/connect # Connect a third-party integration
3POST /v1/integrations/disconnect # Disconnect a third-party integration

AI Features

AI-powered analysis and tools.

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

Sandbox

Set up a testing environment with sample data.

1POST /v1/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 a 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 pagination. You can control pagination using the following query parameters:

  • page: Page number to retrieve (default: 1)
  • limit: Number of items per page (default: 25, max: 100)

Paginated responses include metadata about the total number of items and pagination information:

1{
2 "data": [...],
3 "meta": {
4 "total": 250,
5 "page": 1,
6 "limit": 25,
7 "pages": 10
8 }
9}

API Documentation

For complete API documentation, you can refer to our: