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

Draft Journal Entries (v2)

Download schema

Create draft journal entries in batch (v2)

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

Atomically creates 1–100 draft journal entries in a single transaction. Each entry follows the same restrictions as POST /api/v2/draft-journal-entries: auto-append of the AR/AP leg for locked types, tenant-scoped customerId / vendorId / journalCategoryId / line accountId validation.

If any entry fails validation or persistence the entire batch is rolled back — no draft rows are created. journalCategoryId / customerId / vendorId / accountId from another tenant rejects the whole batch with the matching error code.

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 draft journal entries in batch (v2) › Request Body

CreateDraftJournalEntryV2BatchRequest
​CreateDraftJournalEntryV2Request[] · minItems: 1 · maxItems: 100 · required

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

Create draft journal entries in batch (v2) › Responses

Batch created — every draft persisted

CreateDraftJournalEntryV2BatchResponse
totalCreated
​number · required

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

​DraftJournalEntryResponse[] · required

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

POST/v2/draft-journal-batches
curl https://api.ledgerbee.com/api/v2/draft-journal-batches \ --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" } ], "externalSystemId": "erp-7f3a2c91" } ] }'
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" } ], "externalSystemId": "erp-7f3a2c91" } ] }
json
Example Responses
{ "totalCreated": 0, "entries": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "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", "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" ], "splitEntries": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "type": "debit", "amount": 500, "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "description": "Consulting hours — March", "tagIds": [ "string" ] } ], "status": "DRAFT", "createdAt": "2026-01-15T10:30:00.000Z", "updatedAt": "2026-01-15T10:30:00.000Z" } ] }
json
application/json

List draft journal entries (v2)

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

Returns a paginated list of draft journal entries owned by the API key's app company. Tenant-scoped: drafts created by other companies are never visible here. Identical response shape to GET /api/v1/draft-journal-entries.

List draft journal entries (v2) › query Parameters

page
​number · min: 1

Page number (1-indexed)

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

Maximum items per page

Default: 25
fromDate
​string

Only include drafts on or after this date (YYYY-MM-DD)

Example: 2026-01-01
toDate
​string

Only include drafts on or before this date (YYYY-MM-DD)

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

Filter by account ID (matches any draft line on this account)

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
minAmount
​number

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

Example: 100
maxAmount
​number

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

Example: 10000
externalSystemId
​string · maxLength: 255

Exact-match filter on your own system's id. Not unique — several drafts may share one id, so expect zero or more results.

Example: erp-7f3a2c91
search
​string

Free-text search in description and reference fields

List draft journal entries (v2) › Responses

Drafts retrieved

ListDraftJournalEntriesResponse
​DraftJournalEntryResponse[] · required

List of draft journal entries

total
​number · required

Total number of matching drafts

Example: 42
page
​number · required

Current page number

Example: 1
limit
​number · required

Items per page

Example: 25
totalPages
​number · required

Total number of pages

Example: 2
GET/v2/draft-journal-entries
curl https://api.ledgerbee.com/api/v2/draft-journal-entries \ --header 'x-api-key: <api-key>'
Example Responses
{ "data": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "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", "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" ], "splitEntries": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "type": "debit", "amount": 500, "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "description": "Consulting hours — March", "tagIds": [ "string" ] } ], "status": "DRAFT", "createdAt": "2026-01-15T10:30:00.000Z", "updatedAt": "2026-01-15T10:30:00.000Z" } ], "total": 42, "page": 1, "limit": 25, "totalPages": 2 }
json
application/json

Create a draft journal entry (v2)

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

Creates a draft journal entry with the V2 restriction matrix enforced at create-time (unlike v1, which only validates on book). For CUSTOMER_INVOICE / CUSTOMER_PAYMENT / SUPPLIER_INVOICE / SUPPLIER_PAYMENT submit only the counter-side lines — the server auto-appends the AR/AP leg on the partner group default account.

Tenant scoping: every customerId / vendorId / journalCategoryId / line accountId is validated against the API key's app company. Cross-tenant or unknown ids reject with 400 (JOURNAL_CATEGORY_NOT_FOUND, ACCOUNT_NOT_FOUND, CUSTOMER_HAS_NO_GROUP, VENDOR_HAS_NO_GROUP, INVOICE_AR_LEG_NOT_ON_GROUP_DEFAULT, PAYMENT_AR_LEG_NOT_ON_GROUP_DEFAULT, INVOICE_AP_LEG_NOT_ON_GROUP_DEFAULT, PAYMENT_AP_LEG_NOT_ON_GROUP_DEFAULT).

Attachments: include up to 10 base64-encoded files in the optional attachments[] field — same shape and limits as POST /api/v2/journal-entries. Each becomes a Document linked to the draft; when the draft is booked, the documents migrate to the posted JE and surface via GET /api/v1/journal-entries/:id/attachments. Rejection paths: an invalid MIME type rejects at DTO validation with 400 SHARED_VALIDATION_FAILED; malformed base64 reaches the service and rejects with 400 INVALID_ATTACHMENT_TYPE.

Create a draft journal entry (v2) › Request Body

CreateDraftJournalEntryV2Request
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.

externalSystemId
​string · maxLength: 255

Your own system's id for this draft. Carried onto the booked journal entry. Not unique — several drafts/entries may share one id. Filter the list endpoint by externalSystemId.

Example: erp-7f3a2c91

Create a draft journal entry (v2) › Responses

Draft created

DraftJournalEntryResponse
id
​string · required

Draft journal entry ID

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

Date in YYYY-MM-DD format

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

Denormalized amount in base/functional currency (e.g. DKK). Computed as MAX(debitTotal, creditTotal) from lines, converted via exchangeRate.

Example: 1000
currency
​string · required

Currency code

Example: DKK
journalType
​string · required

Journal type

Example: JOURNAL_ENTRY
status
​string · required

Always "DRAFT" for draft journal entries

Example: DRAFT
createdAt
​string · required

Creation timestamp

Example: 2026-01-15T10:30:00.000Z
updatedAt
​string · required

Last update timestamp

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

Document date (date on the invoice/voucher). Null when not set.

Example: 2026-01-15
description
​string

Description

Example: Office supplies purchase
reference
​string

Reference number

Example: REF-2026-001
externalSystemId
​string | null

Your own system's id for this draft, when set. Not unique. null when unset or cleared.

Example: erp-7f3a2c91
type
​string

Transaction type (debit or credit)

Example: debit
accountId
​string

Primary account ID

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

Contra account ID

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

Customer ID

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

Vendor ID

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

VAT/Tax code ID

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

Tag/Dimension IDs

documentRefs
​string[]

Document IDs attached to the draft

​DraftSplitEntryLineResponse[]

Split entry lines

POST/v2/draft-journal-entries
curl https://api.ledgerbee.com/api/v2/draft-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" } ], "externalSystemId": "erp-7f3a2c91" }'
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" } ], "externalSystemId": "erp-7f3a2c91" }
json
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "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", "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" ], "splitEntries": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "type": "debit", "amount": 500, "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "description": "Consulting hours — March", "tagIds": [ "string" ] } ], "status": "DRAFT", "createdAt": "2026-01-15T10:30:00.000Z", "updatedAt": "2026-01-15T10:30:00.000Z" }
json
application/json

Get a single draft journal entry (v2)

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

Returns the draft if it belongs to the API key's app company; 404 otherwise. Identical response shape to GET /api/v1/draft-journal-entries/:id.

Get a single draft journal entry (v2) › path Parameters

id
​string · required

Draft journal entry ID (UUID)

Get a single draft journal entry (v2) › Responses

Draft retrieved

DraftJournalEntryResponse
id
​string · required

Draft journal entry ID

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

Date in YYYY-MM-DD format

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

Denormalized amount in base/functional currency (e.g. DKK). Computed as MAX(debitTotal, creditTotal) from lines, converted via exchangeRate.

Example: 1000
currency
​string · required

Currency code

Example: DKK
journalType
​string · required

Journal type

Example: JOURNAL_ENTRY
status
​string · required

Always "DRAFT" for draft journal entries

Example: DRAFT
createdAt
​string · required

Creation timestamp

Example: 2026-01-15T10:30:00.000Z
updatedAt
​string · required

Last update timestamp

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

Document date (date on the invoice/voucher). Null when not set.

Example: 2026-01-15
description
​string

Description

Example: Office supplies purchase
reference
​string

Reference number

Example: REF-2026-001
externalSystemId
​string | null

Your own system's id for this draft, when set. Not unique. null when unset or cleared.

Example: erp-7f3a2c91
type
​string

Transaction type (debit or credit)

Example: debit
accountId
​string

Primary account ID

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

Contra account ID

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

Customer ID

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

Vendor ID

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

VAT/Tax code ID

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

Tag/Dimension IDs

documentRefs
​string[]

Document IDs attached to the draft

​DraftSplitEntryLineResponse[]

Split entry lines

GET/v2/draft-journal-entries/{id}
curl https://api.ledgerbee.com/api/v2/draft-journal-entries/:id \ --header 'x-api-key: <api-key>'
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "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", "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" ], "splitEntries": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "type": "debit", "amount": 500, "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "description": "Consulting hours — March", "tagIds": [ "string" ] } ], "status": "DRAFT", "createdAt": "2026-01-15T10:30:00.000Z", "updatedAt": "2026-01-15T10:30:00.000Z" }
json
application/json

Delete a draft journal entry (v2)

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

Deletes a draft journal entry. Any attached documents are released back to the inbox (status reset to NEW). Returns 404 if the draft id does not belong to the API key's app company.

Delete a draft journal entry (v2) › path Parameters

id
​string · required

Draft journal entry ID (UUID)

Delete a draft journal entry (v2) › Responses

Draft deleted successfully

No data returned
DELETE/v2/draft-journal-entries/{id}
curl https://api.ledgerbee.com/api/v2/draft-journal-entries/:id \ --request DELETE \ --header 'x-api-key: <api-key>'
Example Responses
No example specified for this content type

Update a draft journal entry (v2)

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

Partial update: every create-time field is accepted except entryType (the journal type pins constraints decided at creation and is immutable) and attachments (own lifecycle). Omitted fields keep their current values; splitEntries, when provided, replaces the full line set.

externalSystemId is carried onto the booked journal entry when the draft is booked, and is not unique: several drafts or entries may share one id. Filter GET /draft-journal-entries?externalSystemId=... to list carriers.

Reviewed (locked) drafts reject updates with 400 DRAFT_REVIEWED_LOCKED — unmark the review first. Concurrent updates are last-write-wins.

Update a draft journal entry (v2) › path Parameters

id
​string · required

Draft journal entry ID (UUID)

Update a draft journal entry (v2) › Request Body

UpdateDraftJournalEntryV2Request
date
​string

Posting date (YYYY-MM-DD).

originalAmount
​number

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

customerId
​string | null · uuid

Customer reference. null clears it; omitting keeps it. Changing it reshapes the entry — requires lines and re-runs the per-entryType validation (CUSTOMER_* types cannot clear their counterparty).

vendorId
​string | null · uuid

Vendor reference. null clears it; omitting keeps it. Changing it reshapes the entry — requires lines and re-runs the per-entryType validation (SUPPLIER_* types cannot clear their counterparty).

description
​string

Optional human-readable description.

reference
​string

Invoice number / external reference.

currency
​string

ISO 4217 currency code. Defaults to company currency.

​SplitEntryLine[]

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

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.

externalSystemId
​string | null · maxLength: 255

Your own system's id. null clears the value; omitting the field keeps it.

Example: erp-7f3a2c91

Update a draft journal entry (v2) › Responses

Draft updated

DraftJournalEntryResponse
id
​string · required

Draft journal entry ID

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

Date in YYYY-MM-DD format

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

Denormalized amount in base/functional currency (e.g. DKK). Computed as MAX(debitTotal, creditTotal) from lines, converted via exchangeRate.

Example: 1000
currency
​string · required

Currency code

Example: DKK
journalType
​string · required

Journal type

Example: JOURNAL_ENTRY
status
​string · required

Always "DRAFT" for draft journal entries

Example: DRAFT
createdAt
​string · required

Creation timestamp

Example: 2026-01-15T10:30:00.000Z
updatedAt
​string · required

Last update timestamp

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

Document date (date on the invoice/voucher). Null when not set.

Example: 2026-01-15
description
​string

Description

Example: Office supplies purchase
reference
​string

Reference number

Example: REF-2026-001
externalSystemId
​string | null

Your own system's id for this draft, when set. Not unique. null when unset or cleared.

Example: erp-7f3a2c91
type
​string

Transaction type (debit or credit)

Example: debit
accountId
​string

Primary account ID

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

Contra account ID

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

Customer ID

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

Vendor ID

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

VAT/Tax code ID

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

Tag/Dimension IDs

documentRefs
​string[]

Document IDs attached to the draft

​DraftSplitEntryLineResponse[]

Split entry lines

PATCH/v2/draft-journal-entries/{id}
curl https://api.ledgerbee.com/api/v2/draft-journal-entries/:id \ --request PATCH \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "date": "date", "originalAmount": 0, "customerId": "00000000-0000-0000-0000-000000000000", "vendorId": "00000000-0000-0000-0000-000000000000", "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", "externalSystemId": "erp-7f3a2c91" }'
Example Request Body
{ "date": "date", "originalAmount": 0, "customerId": "00000000-0000-0000-0000-000000000000", "vendorId": "00000000-0000-0000-0000-000000000000", "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", "externalSystemId": "erp-7f3a2c91" }
json
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "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", "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" ], "splitEntries": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "type": "debit", "amount": 500, "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "description": "Consulting hours — March", "tagIds": [ "string" ] } ], "status": "DRAFT", "createdAt": "2026-01-15T10:30:00.000Z", "updatedAt": "2026-01-15T10:30:00.000Z" }
json
application/json

Book a draft journal entry (v2)

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

Converts a draft journal entry into a posted journal entry. Validates the posting period and balance, then permanently deletes the draft. V2 drafts already carry the auto-appended AR/AP leg, so booking is a clean handoff to the posted-JE pipeline — no duplicate anchor leg is created. Returns 404 if the draft id does not belong to the API key's app company.

Book a draft journal entry (v2) › path Parameters

id
​string · required

Draft journal entry ID (UUID)

Book a draft journal entry (v2) › Responses

Draft booked successfully — returns the created journal entry

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/draft-journal-entries/{id}/book
curl https://api.ledgerbee.com/api/v2/draft-journal-entries/:id/book \ --request POST \ --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

VendorsJournal Entries (v2)