REST APIOpenAPI 3.163 endpoints

API Reference

Every operation in the Ledger Layer engine is REST-accessible: lease and revenue ingest, engine runs (initial, modification, remeasurement, termination, catch-up), batch monthly close, full journal lifecycle (approve / batch-approve / reverse / void / posting-reference), period locks, SSP matrix management, policy snapshots, unified disclosure packs (single-standard or COMBINED IFRS 15 + ASC 606), and auditor narrative overrides. Bearer-token auth, role-gated, idempotent POST, HMAC-signed webhooks. Same engine, same audit trail, same approval gates as the UI.

Base URL
https://api.ledgerlayer.app/v1
Authentication
Bearer <token>
Spec format
OpenAPI 3.1 — full schema on signup

Quick start: Sign up, generate an API token in the dashboard, and make your first request. The sandbox environment mirrors production — test with real lease data in a safe, isolated tenant. API keys, the full OpenAPI 3.1 schema, and Postman collections are available immediately after signup.

New · v5.1Revenue Recognition — Advanced
  • POST /revenue/contracts/confirmauto-runs INITIAL_RECOGNITION per standard, with retry capture on failure
  • POST /revenue/contracts/:id/recalculateopt-in re-run after policy or input changes
  • POST /revenue/engine/monthly-closebatch revenue close per entity × standard, idempotent
  • GET /revenue/disclosures?format=packunified pack; scope=COMBINED merges IFRS 15 + ASC 606
  • GET + PUT /revenue/disclosures/narrative-overrideauditor narrative override on revenue packs (APPROVER+)
  • GET /revenue/journals/summary · /exportrollup + XLSX/CSV/JSON export to feed any ERP
  • GET + PUT /lease/period-locksfirst-class lease period locks; engine enforces at entry
  • GET + PUT /lease/disclosures/narrative-overrideauditor narrative override on lease packs
  • PUT /revenue/ssp-matrix · /period-lockSSP matrix + period-lock controls for IFRS 15 close
  • POST + GET /revenue/policy-snapshotsbind revenue policy elections to an entity

Endpoint catalog

POST
/v1/leases/extract
AI extraction of lease terms from pasted text or contract JSON
POST
/v1/leases/extract-file
Upload a PDF / DOCX / XLSX lease file for AI extraction
POST
/v1/ingest/csv/extract
Extract a bulk lease upload from CSV (rows → candidates)
POST
/v1/ingest/xlsx/extract
Extract a bulk lease upload from Excel with sheet-layout auto-detection
POST
/v1/ingest/smart/extract
Smart routed extraction — classifier picks lease vs revenue and delegates
POST
/v1/ingest/confirm
Confirm a bulk ingest batch — triggers engine per candidate
POST
/v1/ingest/smart/confirm
Confirm a smart-ingested batch after review
POST
/v1/leases/confirm
Confirm extracted lease data and auto-chain INITIAL_RECOGNITION
POST
/v1/leases/:id/engine/run
Run a specific engine scenario (initial, modification, termination, remeasurement) for one lease
POST
/v1/leases/:id/recalculate
Re-run the lease engine with the latest inputs (post-policy change or correction)
POST
/v1/engine/monthly-close
Batch monthly close per entity + reporting standard (idempotent)
GET
/v1/portfolio
Paged portfolio listing (legacy — prefer /portfolio/search)
GET
/v1/portfolio/summary
Portfolio-level ROU assets, liabilities, and cash flows
GET
/v1/portfolio/search
Search leases by entity, currency, standard, or status
GET
/v1/analytics/portfolio
Maturity buckets, IBR distribution, upcoming renewals
GET
/v1/leases/:id/detail
Full lease record — terms, status, policy snapshot, engine lineage
GET
/v1/leases/:id/schedule
Full amortisation schedule for a lease
GET
/v1/journal-entries/search
List lease journal entries with filters (entity, period, account, status)
GET
/v1/journal-entries/:id/detail
Full lease journal entry with line items and audit metadata
GET
/v1/journal-entries/summary
Aggregate lease journal data by period, account, or entity
GET
/v1/journal-entries/export
Export approved lease JEs in CSV, XLSX, or JSON
PATCH
/v1/journal-entries/:id/approve
Approve a draft lease journal entry (APPROVER+)
POST
/v1/journal-entries/approve-batch
Approve multiple lease journal entries in one operation
POST
/v1/journal-entries/:id/reverse
Create a reversal JE for an approved lease entry
PATCH
/v1/journal-entries/:id/void
Void a pending lease journal entry before approval
PATCH
/v1/journal-entries/:id/posting-reference
Stamp an external ERP posting reference on an approved lease JE
GET
/v1/lease/period-locks
Read lease period-lock state per (entity, reporting standard)
PUT
/v1/lease/period-locks
Upsert a lease period lock (APPROVER+, confirm=true required)
GET
/v1/disclosures
Lease disclosure pack per entity / period / standard
GET
/v1/fs-impact
Lease financial-statement impact report for entity/period
GET
/v1/lease/disclosures/narrative-override
Read auditor narrative override on a lease disclosure pack
PUT
/v1/lease/disclosures/narrative-override
Upsert auditor narrative override on a lease disclosure pack (APPROVER+)
POST
/v1/revenue/contracts/extract
AI extraction of IFRS 15 / ASC 606 contract terms from text
POST
/v1/revenue/contracts/extract/file
Extract revenue contract terms from an uploaded PDF / DOCX / XLSX
POST
/v1/revenue/contracts/confirm
Confirm revenue contracts — auto-chains INITIAL_RECOGNITION per configured standard; failed runs land in DLQ
GET
/v1/revenue/contracts/search
Search revenue contracts by entity, standard, status, or customer
GET
/v1/revenue/contracts/:id
Full revenue contract with obligations, TPCs, and policy snapshot
PATCH
/v1/revenue/contracts/:id
Patch core revenue contract fields post-confirm
GET
/v1/revenue/contracts/:id/schedule
Revenue recognition schedule for a contract
POST
/v1/revenue/contracts/:id/engine/run
Run a specific revenue scenario (initial, modification, variable-consideration remeasurement, termination, catch-up)
POST
/v1/revenue/contracts/:id/recalculate
Re-run the revenue engine after policy / input changes
POST
/v1/revenue/engine/monthly-close
Batch revenue monthly close across entity contracts (scenario-tagged MONTHLY_CLOSE)
GET
/v1/revenue/journals/search
Search revenue journal entries with filters
GET
/v1/revenue/journals/:id
Full revenue journal entry with line items
GET
/v1/revenue/journals/summary
Revenue journal summary rollup by period, account, or entity
GET
/v1/revenue/journals/export
Export approved revenue JEs in CSV, XLSX, or JSON
GET
/v1/revenue/period-lock
Read revenue period-lock state per (entity, reporting standard)
PUT
/v1/revenue/period-lock
Upsert a revenue period lock (APPROVER+)
GET
/v1/revenue/ssp-matrix
Read the stand-alone selling price matrix for IFRS 15 allocation
PUT
/v1/revenue/ssp-matrix
Upload / update the SSP matrix (APPROVER+)
GET
/v1/revenue/policy-snapshots
List revenue policy snapshots for an entity
POST
/v1/revenue/policy-snapshots
Create a revenue policy snapshot (binds elections to an entity)
GET
/v1/revenue/disclosures
Revenue disclosures — supports ?format=pack for unified packs and ?scope=COMBINED for IFRS 15 + ASC 606 side-by-side
GET
/v1/revenue/disclosures/obligation-mix
Obligation-mix breakdown (revenue by obligation type / pattern)
GET
/v1/revenue/disclosures/export
Export revenue disclosure pack to XLSX or PDF
GET
/v1/revenue/disclosures/narrative-override
Read auditor narrative override on a revenue disclosure pack
PUT
/v1/revenue/disclosures/narrative-override
Upsert auditor narrative override on a revenue disclosure pack (APPROVER+)
GET
/v1/revenue/fs-impact
Revenue financial-statement impact report
GET
/v1/revenue/dashboard/period-comparison
Period-over-period revenue comparison for the dashboard
POST
/v1/ibr-rates
Upsert the IBR rate matrix (currency × term × effective date)
POST
/v1/fx-rates
Upsert the FX rate table for multi-currency portfolios
GET
/v1/system/health
API and engine health status
GET
/v1/system/metadata
Entity metadata, configuration, and policy settings

Authentication and authorisation

All API requests require a Bearer token in the Authorization header. Tokens are scoped to a tenant and carry the role of the authenticating user (OWNER, ADMIN, APPROVER, PREPARER, REVIEWER). AI agents authenticate with the same token format — role-gated access applies equally to humans and agents. Token generation and revocation are managed in the dashboard.

Tokens are long-lived but revocable. Each token is tied to a specific user and tenant. When an API request is made, the token is validated, the role is checked against the endpoint's permission requirements, and the request is logged in the audit trail with the actor identity, timestamp, and request ID. Failed authorisation attempts are logged but not retried.

Pagination and filtering

All list endpoints return cursor-based pagination. Pass cursor=<value> from the previous response to fetch the next page. Default page size is 50; max is 200. Most list endpoints support filtering by entity, period, standard, status, and date range.

Cursor-based pagination is stable — new records added during pagination do not cause duplicates or missed records. Filters are applied server-side before pagination. Sort order is configurable on most endpoints (e.g., sort=created_at:desc). The response includes total_count, has_more, and next_cursor fields.

Webhooks and event subscriptions

Subscribe to engine events via webhooks: lease.confirmed, lease.modified, journal.created, journal.approved, journal.reversed, close.completed, disclosure.generated, and more. Each webhook payload is signed with HMAC-SHA256 using your webhook secret — verify the signature before processing.

Webhooks are configured in the dashboard per tenant. Each event type can be routed to a different URL. Failed deliveries are retried with exponential backoff (up to 5 attempts over 24 hours). Event payloads include the full resource representation at the time of the event, plus metadata (event_id, event_type, timestamp, actor, request_id).

Error handling

All errors return a structured JSON body with code (machine-readable), message (human-readable), request_id (for audit trail correlation), and optional details (field-level validation errors). Standard HTTP status codes: 400 validation, 401 authentication, 403 authorisation, 404 not found, 409 conflict, 422 engine rejection, 429 rate limit.

The request_id appears in the audit trail and in webhook payloads — use it for end-to-end tracing and support tickets. Engine rejection errors (422) include the specific engine rule that was violated, making it possible to diagnose and fix the input without contacting support. Validation errors (400) include per-field error details.

Rate limits

Starter: 100 req/min. Professional: 500 req/min. Enterprise: custom. Rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset) are included on every response. Engine run endpoints are asynchronous — POST /engine/run returns a job ID; poll GET /engine/jobs/:id for status or subscribe to the engine.completed webhook.

Rate limits are applied per token, not per IP. Burst allowance is 2x the per-minute limit for short spikes. When the limit is exceeded, the API returns 429 with a Retry-After header. Asynchronous engine runs do not count against the request rate limit after the initial POST.

Idempotency

All POST endpoints support idempotency keys via the Idempotency-Key header. Sending the same key within 24 hours returns the original response without re-executing the operation. This is critical for engine runs and journal approvals — retrying a failed network request will not create duplicate entries.

Idempotency keys are scoped to the tenant and endpoint. The stored response is returned with a 200 status and an X-Idempotent-Replayed: true header. Keys expire after 24 hours. GET requests are naturally idempotent and do not require the header.

Journal export and integration

The journal export endpoint emits approved journal entries in structured CSV, XLSX, and JSON formats — ready to feed into any ERP, iPaaS, or middleware (Alteryx, Anaplan, n8n, Workato, Zapier, Airflow, Dagster, or your own). Combined with the MCP tool surface and outbound webhooks, Ledger Layer plugs into SAP, Oracle, NetSuite, or any downstream system via the tool of your choice.

Export format is specified via the format query parameter (csv, xlsx, json). Account mapping is configured per entity in the dashboard — map Ledger Layer account codes to your chart of accounts once, and every export uses the mapping automatically. Exports are generated from immutable, approved journal entries only. For event-driven flows, subscribe to journal.approved and close.completed webhooks and drive downstream posting from any middleware that can receive an HTTP callback.

Sandbox environment

Every Ledger Layer account includes a sandbox tenant that mirrors the production API. Test with real lease data, run the engine, generate disclosures — all without affecting your production data. The sandbox uses the same endpoints, authentication, and rate limits as production.

Sandbox data is isolated from production. You can reset the sandbox at any time from the dashboard. The sandbox is ideal for integration testing, CI/CD pipelines, and onboarding new team members. API tokens are scoped to either sandbox or production — they cannot cross tenants.

Common integration patterns

Excel intake pipeline (lease)

POST /leases/extract-file with the workbook → review extracted terms → POST /leases/confirm → engine runs automatically → GET /journal-entries/export for the output. The entire flow is API-driven.

Revenue contract intake

POST /revenue/contracts/extract/file → PATCH /revenue/contracts/:id to correct any fields → POST /revenue/contracts/confirm → INITIAL_RECOGNITION auto-chains per configured standard. Failed runs land in the DLQ; retry with POST /revenue/contracts/:id/recalculate.

Lease monthly close

PUT /lease/period-locks to unlock the period → POST /engine/monthly-close → subscribe to close.completed webhook → PUT /lease/period-locks to re-lock → GET /journal-entries/export in your ERP format.

Revenue monthly close

POST /revenue/engine/monthly-close per entity × standard (idempotent) → GET /revenue/journals/summary for rollup → GET /revenue/journals/export to push to the ERP → PUT /revenue/period-lock to freeze the period.

COMBINED disclosure pack

GET /revenue/disclosures?format=pack&scope=COMBINED returns IFRS 15 + ASC 606 side-by-side. PUT /revenue/disclosures/narrative-override (per standard) lets auditors inject final narrative without re-running the engine.

AI agent orchestration

Connect your AI agent (Claude, GPT, n8n) via MCP or REST API. The agent queries the portfolio, surfaces leases / contracts needing attention, and drafts summaries — but cannot approve without human sign-off. All approval gates apply equally to agents and humans.

Audit trail integration

Every API response includes request_id. Every journal entry includes actor, timestamp, and source operation. Engine-run lineage (reversal_of_run_id, supersedes_run_id, base_run_id) ties modifications back to the original recognition. Feed these into your GRC platform for continuous audit monitoring.

Pre-confirm input validation

Before lease_confirm, call lease.validate_enhanced via MCP to surface business-rule issues (missing payment streams, IBR/FX gaps, short-term exemption hints). Block confirmation on errors; show warnings to the reviewer. Keeps bad data out of the engine.

Start building with the Ledger Layer API

API keys, sandbox environment, full OpenAPI 3.1 schema, and Postman collections — all available in the dashboard after signup.

Get API access
← ASC 606 GuideAI Agent Tools (MCP) →