LedgerBee Developer
  • Getting started
  • Conventions
  • Products
  • API Reference
Information
Accounts
    List accountsget
API Key
    Get current API keyget
Company
    Get company detailsget
Customers
    List customersgetCreate a customerpostGet a single customergetUpdate a customerpatchList a customer's contactsgetList a customer's departmentsgetList customer groupsget
Dimensions
    List all dimensionsgetCreate a new dimension categorypostGet a single dimension by IDgetUpdate a dimension categoryputDelete a dimension categorydeleteCreate a new dimension valuepostUpdate a dimension valueputDelete a dimension valuedelete
Document Templates
    List document templatesget
Journal Categories
    List journal categoriesget
Journal Entries
    Create multiple journal entries in batch (DEPRECATED — migrate to v2)postList journal entriesgetCreate a single journal entry (DEPRECATED — use POST /api/v2/journal-entries)postGet a single journal entrygetUpdate a journal entry — correct the reference and/or set your external system idpatchGet attachments for a journal entrygetReverse posted journal entries in batchpostReverse a posted journal entrypost
MCP
    LedgerBee Developer MCP Serverpost
Meters
    List meter subscriptions by IDgetReport usagepostList meter subscriptions by nameget
Product Groups
    List product groupsgetCreate a product grouppostGet a product groupgetDelete a product groupdeleteUpdate a product grouppatch
Product Prices
    Create a product pricepostGet a product pricegetDelete a product pricedeleteUpdate a product pricepatchActivate a product pricepostArchive a product pricepostDisable a product pricepostSet a price as the product defaultpost
Products
    List productsgetCreate a productpostGet a productgetDelete a productdeleteUpdate a productpatch
Projects
    List all projectsgetIdempotent project upsertputCreate a projectpostGet a projectgetUpdate a projectputGet project profitgetAdd a subprojectpostUpdate a subprojectputDelete a subprojectdelete
Subscriptions
    List customer subscriptionsgetAssign a subscription to a customerpostGet a customer subscription by its stable idgetUpdate a customer subscriptionpatchList a subscription’s pending scheduled changesgetCancel a single pending scheduled changedeleteCancel a customer subscriptionpostList subscription plansgetArchive a subscription planpost
VAT Codes
    List VAT codesget
Webhook Endpoints
    List webhook endpointsgetCreate a webhook endpointpostRetrieve a webhook endpointgetUpdate a webhook endpointputDelete a webhook endpointdeleteRoll the signing secretpostSend a test eventpost
Portal SSO
    Published RP signing keys (JWKS) for a tenant's private_key_jwt SSOgetMint a customer-portal SSO handoff referencepostProvision a customer + grant portal access (partner JIT provisioning)postRevoke (force-refresh) a user's customer-portal sessionspost
Credit Notes
    List credit notesgetCreate a credit notepostGet a credit note by IDgetGet the delivery status of a credit notegetDownload the credit note PDFgetSend a credit note to the customerpost
Payment Methods
    List saved payment methods for a customergetApply a payment method to all active subscriptions for a customerpostCancel a saved card on the payment providerdeleteUnassign a payment method from a customerdeleteGenerate a link for the customer to save a card for future paymentspostSet a saved payment method as the customer defaultput
Draft Journal Entries
    Create multiple draft journal entries in batchpostList draft journal entriesgetCreate a draft journal entrypostGet a single draft journal entrygetDelete a draft journal entrydeleteBook a draft journal entrypost
Invoices
    List invoicesgetCreate a draft invoicepostGet an invoice by IDgetGet the delivery status of an invoicegetDownload the invoice PDFgetSend an invoice to the customerpost
Order Confirmations
    List order confirmationsgetCreate a draft order confirmationpostGet an order confirmation by idgetUpdate a draft order confirmationpatchConvert an order confirmation into an invoicepostDownload an order confirmation as PDFgetSend an order confirmationpost
Portal Plans
    List the full plan cataloguegetGet one plan by idgetResolve the gated pricing catalogue for an identified buyer (partner display)post
Quotes
    List quotesgetCreate a draft quotepostGet a quote by idgetUpdate a draft quotepatchConvert a quotepostDownload a quote as PDFgetSend a quotepost
Vendors
    List vendorsgetCreate a vendorpostList vendor contactsgetList vendor departmentsgetList vendor groupsget
Draft Journal Entries (v2)
    Create draft journal entries in batch (v2)postList draft journal entries (v2)getCreate a draft journal entry (v2)postGet a single draft journal entry (v2)getDelete a draft journal entry (v2)deleteUpdate a draft journal entry (v2)patchBook a draft journal entry (v2)post
Journal Entries (v2)
    Create a journal entry (v2)postCreate journal entries in batch (v2)post
Schemas
LedgerBee Public API
LedgerBee Public API

Journal Entries (v2)

Download schema

Create a journal entry (v2)

POST
https://api.ledgerbee.com/api
/v2/journal-entries
x-api-key (header)
or
OAuth 2.0

Create a journal entry. For CUSTOMER_INVOICE / CUSTOMER_PAYMENT / SUPPLIER_INVOICE / SUPPLIER_PAYMENT, submit only the counter-side lines (revenue, expense, bank, etc.). The server appends the AR/AP leg on the customer's or vendor's group default account, with side derived from the sign of originalAmount (positive = invoice/payment, negative = credit-note/refund). Including a line on the group default account explicitly will be rejected.

For all other journal types this endpoint behaves identically to v1: pass through whatever lines you supply.

Attachments: include up to 10 base64-encoded files in the optional attachments[] field — same shape and limits as v1. Each becomes a Document linked to the created entry and surfaces via GET /api/v1/journal-entries/:id/attachments. Invalid MIME type or malformed base64 rejects the request with 400 INVALID_ATTACHMENT_TYPE. Total request body must stay under 15MB.

Create a journal entry (v2) › Request Body

CreateJournalEntryV2Dto
entryType
​string · enum · required

Journal type. For CUSTOMER_INVOICE / CUSTOMER_PAYMENT / SUPPLIER_INVOICE / SUPPLIER_PAYMENT the AR/AP leg is appended automatically; do not include it in lines.

Enum values:
journal
invoice
payment
supplier_invoice
supplier_payment
customer_invoice
customer_payment
date
​string · required

Posting date (YYYY-MM-DD).

originalAmount
​number · required

Original amount of the invoice / payment. Sign carries direction: positive = invoice / payment, negative = credit-note / refund.

​SplitEntryLine[] · required

Counter-side lines (revenue / expense / bank / outlay). For locked types do NOT include the AR/AP leg.

customerId
​string

Customer reference. Required for CUSTOMER_* types.

vendorId
​string

Vendor reference. Required for SUPPLIER_* types.

description
​string

Optional human-readable description.

reference
​string

Invoice number / external reference.

currency
​string

ISO 4217 currency code. Defaults to company currency.

tagIds
​string[]

Tag IDs applied at the entry level.

journalCategoryId
​string

Journal category ID (UUID). Must belong to the API key's app company; cross-tenant or unknown IDs are rejected with 400 JOURNAL_CATEGORY_NOT_FOUND. When omitted the entry uses the company's default category.

​AttachmentRequest[] · maxItems: 10

Inline file attachments (base64-encoded). Same shape and limits as v1: maximum 10 attachments per entry, individual files should not exceed 10MB before encoding, and the total request body (JSON + base64 payload) must stay under 15MB. Each attachment becomes a Document linked to the created journal entry — equivalent to what GET /api/v1/journal-entries/:id/attachments returns. Invalid MIME types or malformed base64 reject the whole entry with 400 INVALID_ATTACHMENT_TYPE; in a batch the whole batch rolls back.

Create a journal entry (v2) › Responses

Journal entry created successfully

JournalEntryResponse
id
​string · required

Unique identifier of the created journal entry

Example: 550e8400-e29b-41d4-a716-446655440000
entryNumber
​string · required

Entry number assigned to the journal entry

Example: JE-00001
date
​string · required

Date of the journal entry

Example: 2026-01-15
amount
​number · required

Amount of the transaction

Example: 1000
currency
​string · required

Currency code

Example: DKK
journalType
​string · required

Journal type

Example: JOURNAL_ENTRY
type
​string · required

Transaction type

Example: debit
status
​string · required

Status of the journal entry

Example: POSTED
accountId
​string · required

Primary account ID

Example: 550e8400-e29b-41d4-a716-446655440000
createdAt
​string · required

Timestamp when the entry was created

Example: 2026-01-15T10:30:00.000Z
documentDate
​string

Document date (date on the invoice/voucher). Null for legacy entries.

Example: 2026-01-15
description
​string

Description of the journal entry

Example: Office supplies purchase
reference
​string

Reference number

Example: REF-2026-001
externalSystemId
​string

Your own system's id for this entry, when set. Not unique — several entries may share one id.

Example: erp-7f3a2c91
contraAccountId
​string

Contra account ID

Example: 550e8400-e29b-41d4-a716-446655440001
customerId
​string

Customer ID if applicable

Example: 550e8400-e29b-41d4-a716-446655440002
vendorId
​string

Vendor ID if applicable

Example: 550e8400-e29b-41d4-a716-446655440003
vatCodeId
​string

VAT/Tax code ID if applicable

Example: 550e8400-e29b-41d4-a716-446655440000
tagIds
​string[]

Tag IDs attached to the entry

documentRefs
​string[]

Document IDs attached to the entry

POST/v2/journal-entries
curl https://api.ledgerbee.com/api/v2/journal-entries \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "entryType": "journal", "date": "date", "originalAmount": 0, "customerId": "customerId", "vendorId": "vendorId", "description": "description", "reference": "reference", "currency": "currency", "lines": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "type": "debit", "amount": 500, "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "description": "Consulting hours — March", "tagIds": [ "550e8400-e29b-41d4-a716-446655440003" ] } ], "tagIds": [ "string" ], "journalCategoryId": "journalCategoryId", "attachments": [ { "filename": "invoice.pdf", "content": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC...", "mimeType": "application/pdf" } ] }'
Example Request Body
{ "entryType": "journal", "date": "date", "originalAmount": 0, "customerId": "customerId", "vendorId": "vendorId", "description": "description", "reference": "reference", "currency": "currency", "lines": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "type": "debit", "amount": 500, "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "description": "Consulting hours — March", "tagIds": [ "550e8400-e29b-41d4-a716-446655440003" ] } ], "tagIds": [ "string" ], "journalCategoryId": "journalCategoryId", "attachments": [ { "filename": "invoice.pdf", "content": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC...", "mimeType": "application/pdf" } ] }
json
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "entryNumber": "JE-00001", "date": "2026-01-15", "documentDate": "2026-01-15", "amount": 1000, "currency": "DKK", "description": "Office supplies purchase", "reference": "REF-2026-001", "externalSystemId": "erp-7f3a2c91", "journalType": "JOURNAL_ENTRY", "type": "debit", "status": "POSTED", "accountId": "550e8400-e29b-41d4-a716-446655440000", "contraAccountId": "550e8400-e29b-41d4-a716-446655440001", "customerId": "550e8400-e29b-41d4-a716-446655440002", "vendorId": "550e8400-e29b-41d4-a716-446655440003", "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "tagIds": [ "string" ], "documentRefs": [ "string" ], "createdAt": "2026-01-15T10:30:00.000Z" }
json
application/json

Create journal entries in batch (v2)

POST
https://api.ledgerbee.com/api
/v2/journal-entries/batch
x-api-key (header)
or
OAuth 2.0

Atomically creates 1–100 journal entries in a single transaction. Each entry follows the same restrictions as POST /api/v2/journal-entries: for CUSTOMER_/SUPPLIER_ types submit only the counter-side lines and the server auto-appends the AR/AP leg on the partner group default account.

If any entry fails validation or persistence the entire batch is rolled back. journalCategoryId is validated per entry against the API key's app company — cross-tenant or unknown IDs reject the whole batch with 400 JOURNAL_CATEGORY_NOT_FOUND.

Attachments: each entry may include up to 10 base64-encoded attachments[]. A failure on any entry rolls back the whole batch and deletes every already-uploaded blob — no orphan documents survive.

Create journal entries in batch (v2) › Request Body

CreateJournalEntryV2BatchRequest
​CreateJournalEntryV2Dto[] · minItems: 1 · maxItems: 100 · required

Array of 1–100 journal entries. Wrapped in a single transaction; one bad entry rolls back the whole batch.

Create journal entries in batch (v2) › Responses

Batch created successfully

CreateJournalEntryV2BatchResponse
totalCreated
​number · required

Number of journal entries created (= entries.length on success).

​JournalEntryResponse[] · required

Created journal entries, ordered to match the request entries[].

POST/v2/journal-entries/batch
curl https://api.ledgerbee.com/api/v2/journal-entries/batch \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "entries": [ { "entryType": "journal", "date": "date", "originalAmount": 0, "customerId": "customerId", "vendorId": "vendorId", "description": "description", "reference": "reference", "currency": "currency", "lines": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "type": "debit", "amount": 500, "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "description": "Consulting hours — March", "tagIds": [ "550e8400-e29b-41d4-a716-446655440003" ] } ], "tagIds": [ "string" ], "journalCategoryId": "journalCategoryId", "attachments": [ { "filename": "invoice.pdf", "content": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC...", "mimeType": "application/pdf" } ] } ] }'
Example Request Body
{ "entries": [ { "entryType": "journal", "date": "date", "originalAmount": 0, "customerId": "customerId", "vendorId": "vendorId", "description": "description", "reference": "reference", "currency": "currency", "lines": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "type": "debit", "amount": 500, "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "description": "Consulting hours — March", "tagIds": [ "550e8400-e29b-41d4-a716-446655440003" ] } ], "tagIds": [ "string" ], "journalCategoryId": "journalCategoryId", "attachments": [ { "filename": "invoice.pdf", "content": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC...", "mimeType": "application/pdf" } ] } ] }
json
Example Responses
{ "totalCreated": 0, "entries": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "entryNumber": "JE-00001", "date": "2026-01-15", "documentDate": "2026-01-15", "amount": 1000, "currency": "DKK", "description": "Office supplies purchase", "reference": "REF-2026-001", "externalSystemId": "erp-7f3a2c91", "journalType": "JOURNAL_ENTRY", "type": "debit", "status": "POSTED", "accountId": "550e8400-e29b-41d4-a716-446655440000", "contraAccountId": "550e8400-e29b-41d4-a716-446655440001", "customerId": "550e8400-e29b-41d4-a716-446655440002", "vendorId": "550e8400-e29b-41d4-a716-446655440003", "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "tagIds": [ "string" ], "documentRefs": [ "string" ], "createdAt": "2026-01-15T10:30:00.000Z" } ] }
json
application/json

Draft Journal Entries (v2)