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

Download schema

Journal entry creation endpoints


deprecated

Create multiple journal entries in batch (DEPRECATED — migrate to v2)

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

DEPRECATED. Migrate to POST /api/v2/journal-entries and call it once per entry; v2 auto-appends the AR/AP leg on the customer/vendor group default and rejects drift with typed error codes. The batch behavior of this endpoint will be re-introduced on v2 once the gated app fully cuts over from v1.

Original behavior: creates multiple journal entries in a single transaction. All entries are committed together — if any entry fails, the entire batch is rolled back. Supports journal entries, invoices, and payments with optional customer and dimension references.

Create multiple journal entries in batch (DEPRECATED — migrate to v2) › Request Body

CreateJournalEntryBatchRequest
​CreateJournalEntryRequest[] · minItems: 1 · maxItems: 100 · required

Array of journal entries to create (1-100 entries per batch)

Create multiple journal entries in batch (DEPRECATED — migrate to v2) › Responses

Batch of journal entries created successfully

CreateJournalEntryBatchResponse
totalCreated
​number · required

Number of entries successfully created

Example: 5
​JournalEntryResponse[] · required

Details of all created journal entries

POST/v1/journal-batches
curl https://api.ledgerbee.com/api/v1/journal-batches \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "entries": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "contraAccountId": "550e8400-e29b-41d4-a716-446655440001", "date": "2026-01-15", "amount": 1000, "entryType": "journal", "type": "debit", "description": "Office supplies purchase", "reference": "REF-2026-001", "currency": "DKK", "customerId": "550e8400-e29b-41d4-a716-446655440002", "vendorId": "550e8400-e29b-41d4-a716-446655440003", "tagIds": [ "550e8400-e29b-41d4-a716-446655440003" ], "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "splitEntries": [ { "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" ] } ], "attachments": [ { "filename": "invoice.pdf", "content": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC...", "mimeType": "application/pdf" } ] } ] }'
Example Request Body
{ "entries": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "contraAccountId": "550e8400-e29b-41d4-a716-446655440001", "date": "2026-01-15", "amount": 1000, "entryType": "journal", "type": "debit", "description": "Office supplies purchase", "reference": "REF-2026-001", "currency": "DKK", "customerId": "550e8400-e29b-41d4-a716-446655440002", "vendorId": "550e8400-e29b-41d4-a716-446655440003", "tagIds": [ "550e8400-e29b-41d4-a716-446655440003" ], "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "splitEntries": [ { "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" ] } ], "attachments": [ { "filename": "invoice.pdf", "content": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC...", "mimeType": "application/pdf" } ] } ] }
json
Example Responses
{ "totalCreated": 5, "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

List journal entries

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

Retrieves a paginated list of journal entries with optional filtering by date, account, customer, external system id, and search text.

List journal entries › query Parameters

page
​number · min: 1

Page number (1-indexed)

Default: 1
limit
​number · min: 1 · max: 100

Maximum number of items per page

Default: 25
fromDate
​string

Only include entries with a posting date on or after this date (ISO 8601). Filters je.date (bogføringsdato).

Example: 2026-01-01
toDate
​string

Only include entries with a posting date on or before this date (ISO 8601). Filters je.date (bogføringsdato).

Example: 2026-01-31
documentDateFrom
​string

Only include entries with a document date on or after this date (ISO 8601). Filters je.documentDate.

Example: 2026-01-01
documentDateTo
​string

Only include entries with a document date on or before this date (ISO 8601). Filters je.documentDate.

Example: 2026-01-31
accountId
​string · uuid

Filter by account ID

customerId
​string · uuid

Filter by customer ID

vendorId
​string · uuid

Filter by vendor ID

journalType
​string · enum

Filter by journal type

Enum values:
JOURNAL_ENTRY
SUPPLIER_INVOICE
SUPPLIER_PAYMENT
CUSTOMER_INVOICE
CUSTOMER_PAYMENT
CUSTOMER_REMINDER
CURRENCY_REVALUATION
VAT_SETTLEMENT
externalSystemId
​string · maxLength: 255

Exact-match filter on your own system's id (set via PATCH /journal-entries/:id or carried on the entry). Not unique — several entries may share one id, so expect zero or more results.

Example: erp-7f3a2c91
minAmount
​number

Only include entries with an amount greater than or equal to this value (inclusive).

Example: 100
maxAmount
​number

Only include entries with an amount less than or equal to this value (inclusive).

Example: 10000
search
​string

Free-text search in description and reference fields

sortBy
​string · enum

Sort field

Enum values:
date
documentDate
amount
createdAt
Example: date
Default: date
sortOrder
​string · enum

Sort direction

Enum values:
ASC
DESC
Example: DESC
Default: DESC

List journal entries › Responses

Journal entries retrieved successfully

ListJournalEntriesResponse
​JournalEntryResponse[] · required

List of journal entries

total
​number · required

Total number of matching entries

Example: 150
page
​number · required

Current page number

Example: 1
limit
​number · required

Number of items per page

Example: 25
totalPages
​number · required

Total number of pages

Example: 6
GET/v1/journal-entries
curl https://api.ledgerbee.com/api/v1/journal-entries \ --header 'x-api-key: <api-key>'
Example Responses
{ "data": [ { "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" } ], "total": 150, "page": 1, "limit": 25, "totalPages": 6 }
json
application/json

deprecated

Create a single journal entry (DEPRECATED — use POST /api/v2/journal-entries)

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

DEPRECATED. Use POST /api/v2/journal-entries instead. The v2 endpoint auto-appends the AR/AP leg on the customer/vendor group default account, eliminating the most common booking error (drift between the posted account and the configured group default). v1 stays available for legacy integrators but skips the anchor-account guard, so any drift it accepts will need to be reconciled later.

Original behavior: creates a single journal entry with the specified accounts and amount. Supports journal entries, invoices, and payments with optional customer and dimension references.

Create a single journal entry (DEPRECATED — use POST /api/v2/journal-entries) › Request Body

CreateJournalEntryRequest
accountId
​string · required

Primary account ID (UUID). Cannot be a heading or total account. For typed entries (supplier_invoice, customer_invoice, etc.), must have appropriate account classification.

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

Date of the journal entry in YYYY-MM-DD format

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

Amount of the transaction (must be positive)

Example: 1000
contraAccountId
​string

Contra account ID (UUID). Required unless splitEntries is provided. Cannot be a heading or total account. For typed entries, must have appropriate account classification.

Example: 550e8400-e29b-41d4-a716-446655440001
entryType
​string · enum

Entry type determines the journal type and enforces account classification rules. Account classification requirements: supplier_invoice: account=EXPENSE|ASSET, contraAccount=LIABILITY; supplier_payment: account=LIABILITY, contraAccount=ASSET; customer_invoice: account=ASSET, contraAccount=REVENUE; customer_payment: account=ASSET, contraAccount=ASSET; journal: no restrictions. Legacy values "invoice" and "payment" map to supplier types.

Enum values:
journal
invoice
payment
supplier_invoice
supplier_payment
customer_invoice
customer_payment
Example: supplier_invoice
Default: journal
type
​string · enum

Transaction type (debit or credit)

Enum values:
debit
credit
Example: debit
Default: debit
description
​string

Description of the journal entry

Example: Office supplies purchase
reference
​string

Reference number or identifier

Example: REF-2026-001
currency
​string

Currency code (defaults to DKK)

Example: DKK
Default: DKK
customerId
​string

Customer ID (UUID) for customer-related entries

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

Vendor ID (UUID). Required for supplier_invoice / supplier_payment entry types, and for any posting that touches an accounts-payable control account.

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

Tag/Dimension IDs to attach to the journal entry

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

VAT/Tax code ID (UUID). Applied to the primary account unless split entries are used.

Example: 550e8400-e29b-41d4-a716-446655440000
​SplitEntryLine[] · minItems: 2 · maxItems: 50

Split entry lines for multi-account entries. When provided, contraAccountId is not required. Requirements: (1) Total debits must equal total credits; (2) Must have at least one debit AND one credit entry; (3) Minimum 2 lines required; (4) All accounts must be postable (not heading or total accounts). Account classification validation is not applied to split entries.

​AttachmentRequest[] · maxItems: 10

File attachments (base64-encoded). Maximum 10 attachments per entry. Total request size limit is 15MB.

Create a single journal entry (DEPRECATED — use POST /api/v2/journal-entries) › 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/v1/journal-entries
curl https://api.ledgerbee.com/api/v1/journal-entries \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "accountId": "550e8400-e29b-41d4-a716-446655440000", "contraAccountId": "550e8400-e29b-41d4-a716-446655440001", "date": "2026-01-15", "amount": 1000, "entryType": "journal", "type": "debit", "description": "Office supplies purchase", "reference": "REF-2026-001", "currency": "DKK", "customerId": "550e8400-e29b-41d4-a716-446655440002", "vendorId": "550e8400-e29b-41d4-a716-446655440003", "tagIds": [ "550e8400-e29b-41d4-a716-446655440003" ], "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "splitEntries": [ { "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" ] } ], "attachments": [ { "filename": "invoice.pdf", "content": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC...", "mimeType": "application/pdf" } ] }'
Example Request Body
{ "accountId": "550e8400-e29b-41d4-a716-446655440000", "contraAccountId": "550e8400-e29b-41d4-a716-446655440001", "date": "2026-01-15", "amount": 1000, "entryType": "journal", "type": "debit", "description": "Office supplies purchase", "reference": "REF-2026-001", "currency": "DKK", "customerId": "550e8400-e29b-41d4-a716-446655440002", "vendorId": "550e8400-e29b-41d4-a716-446655440003", "tagIds": [ "550e8400-e29b-41d4-a716-446655440003" ], "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "splitEntries": [ { "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" ] } ], "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

Get a single journal entry

GET
https://api.ledgerbee.com/api
/v1/journal-entries/{id}
x-api-key (header)
or
OAuth 2.0

Retrieves a journal entry by its ID.

Get a single journal entry › path Parameters

id
​string · required

Journal entry ID (UUID)

Example: 550e8400-e29b-41d4-a716-446655440000

Get a single journal entry › Responses

Journal entry retrieved 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

GET/v1/journal-entries/{id}
curl https://api.ledgerbee.com/api/v1/journal-entries/:id \ --header 'x-api-key: <api-key>'
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

Update a journal entry — correct the reference and/or set your external system id

PATCH
https://api.ledgerbee.com/api
/v1/journal-entries/{id}
x-api-key (header)
or
OAuth 2.0

Partial update of a posted journal entry. Provide at least one of reference, externalSystemId.

reference corrects the reference on a CUSTOMER_INVOICE / CUSTOMER_PAYMENT / SUPPLIER_INVOICE / SUPPLIER_PAYMENT entry and re-runs payment ↔ invoice matching. Use this when an entry was booked with a wrong reference and therefore never matched.

externalSystemId stores your own system's id for the entry. It is metadata: settable on any journal type regardless of match state, and never affects matching. It is not unique — several entries may share one id; filter GET /journal-entries?externalSystemId=... to list them.

Reference corrections apply to unmatched journal entries only. A payment that settles an invoice carries amounts derived against that invoice (currency and original exchange rate), and which invoice a payment settled is part of the books — neither can be edited in place. Documents with settlement activity are rejected with 409 JOURNAL_ENTRY_REFERENCE_UPDATE_ALREADY_MATCHED.

Matched to the wrong journal entry? Reverse the entry with POST /api/v1/journal-entries/reverse and re-book it with the correct reference via POST /api/v2/journal-entries. The reversal keeps the audit trail intact, and the re-booked entry derives its settlement amounts against the correct invoice.

Payments: the journal entry must be UNMATCHED (not linked to an invoice). After the update the corrected reference is looked up against the counterparty's invoices — on a hit the payment is linked and the invoice status recomputed (OPEN → PARTIALLY_PAID / PAID). On a miss the payment stays unmatched and can be corrected again.

Invoices: the invoice must have no settlement activity (no applied payments or linked credit notes). The invoice number is updated and any payments already waiting on the corrected number are matched in the same transaction. A 409 is returned when the invoice is already settled against, or when another invoice for the same counterparty already uses the new number.

Reference corrections on reversed entries and other journal types are rejected with 400.

Update a journal entry — correct the reference and/or set your external system id › path Parameters

id
​string · required

Journal entry ID

Update a journal entry — correct the reference and/or set your external system id › Request Body

UpdateJournalEntryRequest
reference
​string · maxLength: 255

Corrected reference. For invoices this is the invoice number (the anchor is renumbered with it); for payments it is the invoice number the payment settles. Only unmatched entries of the four entity document types accept a reference correction.

Example: INV-1042
externalSystemId
​string | null · maxLength: 255

Your own system's id for this journal entry. Settable on any journal type regardless of match state. Not unique — several entries may carry the same id (e.g. one partner document booked as several entries); filter GET /journal-entries by externalSystemId to find all of them. null clears the value; omitting the field keeps it. reference does not accept null — it is a matching key, not clearable metadata.

Example: erp-7f3a2c91

Update a journal entry — correct the reference and/or set your external system id › Responses

Journal entry updated.

UpdateJournalEntryResponse
id
​string · required

Journal entry ID.

Example: 550e8400-e29b-41d4-a716-446655440000
reference
​string | null · required

The reference after the update.

Example: INV-1042
externalSystemId
​string | null · required

The external system id after the update.

Example: erp-7f3a2c91
PATCH/v1/journal-entries/{id}
curl https://api.ledgerbee.com/api/v1/journal-entries/:id \ --request PATCH \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "reference": "INV-1042", "externalSystemId": "erp-7f3a2c91" }'
Example Request Body
{ "reference": "INV-1042", "externalSystemId": "erp-7f3a2c91" }
json
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "reference": "INV-1042", "externalSystemId": "erp-7f3a2c91" }
json
application/json

Get attachments for a journal entry

GET
https://api.ledgerbee.com/api
/v1/journal-entries/{id}/attachments
x-api-key (header)
or
OAuth 2.0

Retrieves all attachments/documents associated with a journal entry.

Get attachments for a journal entry › path Parameters

id
​string · required

Journal entry ID (UUID)

Example: 550e8400-e29b-41d4-a716-446655440000

Get attachments for a journal entry › Responses

Attachments retrieved successfully

JournalEntryAttachmentsListResponse
journalEntryId
​string · required

Journal entry ID the attachments belong to

Example: 550e8400-e29b-41d4-a716-446655440000
​JournalEntryAttachmentResponse[] · required

List of attachments

GET/v1/journal-entries/{id}/attachments
curl https://api.ledgerbee.com/api/v1/journal-entries/:id/attachments \ --header 'x-api-key: <api-key>'
Example Responses
{ "journalEntryId": "550e8400-e29b-41d4-a716-446655440000", "attachments": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "filename": "invoice.pdf", "contentType": "application/pdf", "fileSize": 102400, "content": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC...", "createdAt": "2026-01-15T10:30:00.000Z" } ] }
json
application/json

Reverse posted journal entries in batch

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

Atomically reverses 1–100 posted journal entries in a single transaction. The original entries are left untouched; both originals and reversals remain visible in ledger / aging / balance reports so the audit trail is preserved.

Date handling: when reversalDate is omitted, each reversal is dated to its own original entry so the original/reversal pair lands in the same posting period. When reversalDate is supplied it applies to every reversal in the batch.

The posting period for every reversal date must be open. Duplicate IDs in the request are de-duplicated. If any reversal fails (closed period, ineligible source entry, etc.) the whole batch rolls back and no reversals are persisted.

Reverse posted journal entries in batch › Request Body

BatchReverseJournalEntriesRequest
journalEntryIds
​string[] · minItems: 1 · maxItems: 100 · required

IDs of the journal entries to reverse (1–100). All reversals run in one transaction; one failure rolls back the whole batch. Duplicate IDs are de-duplicated.

Example: ["550e8400-e29b-41d4-a716-446655440000","550e8400-e29b-41d4-a716-446655440001"]
reversalDate
​string

Date for every reversal posting (YYYY-MM-DD). When omitted, each reversal is dated to its own original entry so the pair lands in the same period.

Example: 2026-06-01
reason
​string · maxLength: 500

Free-text reason appended to every reversal description for audit purposes.

Example: Bulk reversal of misclassified subscription invoices

Reverse posted journal entries in batch › Responses

Reversals posted successfully

BatchReverseJournalEntriesResponse
totalReversed
​number · required

Number of reversals posted. Equals the count of unique IDs in the request on success.

Example: 2
​BatchReverseJournalEntriesResultItem[] · required

Result rows pairing each original ID with its newly created reversal ID.

POST/v1/journal-entries/batch-reverse
curl https://api.ledgerbee.com/api/v1/journal-entries/batch-reverse \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "journalEntryIds": [ "550e8400-e29b-41d4-a716-446655440000", "550e8400-e29b-41d4-a716-446655440001" ], "reversalDate": "2026-06-01", "reason": "Bulk reversal of misclassified subscription invoices" }'
Example Request Body
{ "journalEntryIds": [ "550e8400-e29b-41d4-a716-446655440000", "550e8400-e29b-41d4-a716-446655440001" ], "reversalDate": "2026-06-01", "reason": "Bulk reversal of misclassified subscription invoices" }
json
Example Responses
{ "totalReversed": 2, "results": [ { "originalId": "550e8400-e29b-41d4-a716-446655440000", "reversalId": "550e8400-e29b-41d4-a716-446655440010" } ] }
json
application/json

Reverse a posted journal entry

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

Reverses a single posted journal entry. Mirrors the gated app's "Reverse only, post immediately" correction option — a new POSTED journal entry is created with the original's Dr/Cr lines flipped. The original entry is left untouched; both entries remain visible in ledger / aging / balance reports so the audit trail is preserved.

Date handling: when reversalDate is omitted, the reversal is dated to the original entry so the pair lands in the same posting period. The posting period for the resolved date must be open.

Eligibility: the source entry must be POSTED and not already part of a correction chain that disallows further reversal. The endpoint rejects ineligible entries with 400.

Reverse a posted journal entry › Request Body

ReverseJournalEntryRequest
journalEntryId
​string · required

UUID of the posted journal entry to reverse.

Example: 550e8400-e29b-41d4-a716-446655440000
reversalDate
​string

Date for the reversal posting (YYYY-MM-DD). When omitted, the reversal is dated to the original entry so it lands in the same period. Must fall in an open posting period.

Example: 2026-06-01
reason
​string · maxLength: 500

Free-text reason appended to the reversal description for audit purposes.

Example: Vendor invoice was duplicated

Reverse a posted journal entry › Responses

Reversal posted successfully

ReverseJournalEntryResponse
reversalId
​string · required

Unique identifier of the posted reversal journal entry.

Example: 550e8400-e29b-41d4-a716-446655440000
POST/v1/journal-entries/reverse
curl https://api.ledgerbee.com/api/v1/journal-entries/reverse \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "journalEntryId": "550e8400-e29b-41d4-a716-446655440000", "reversalDate": "2026-06-01", "reason": "Vendor invoice was duplicated" }'
Example Request Body
{ "journalEntryId": "550e8400-e29b-41d4-a716-446655440000", "reversalDate": "2026-06-01", "reason": "Vendor invoice was duplicated" }
json
Example Responses
{ "reversalId": "550e8400-e29b-41d4-a716-446655440000" }
json
application/json

Journal CategoriesMCP