LedgerBee Developer
  • Getting started
  • Conventions
  • Products
  • Configuration
  • API Reference
Information
Accounts
    List accountsget
API Key
    Get current API keyget
Authority Extracts
    Submit authority extract datapost
Billing Groups
    Form a billing grouppostGet a billing groupgetAdd members to a billing grouppostRemove a member from a billing groupdeleteCheck billing group eligibilitypost
Budgets
    List budgetsgetGet a budgetgetGet the budget vs actuals comparisongetList a budget's frozen baselinesgetGet a frozen baseline with its snapshot cellsgetList a budget's re-baseline proposalsgetList a budget's scenariosgetResolve a budget's grid under a scenariogetGet the variance report vs a frozen baselinegetGet the runway headlineget
Checkout
    Confirm the checkoutpostQuote a first periodpostIntegration readinessgetMint a checkout sessionpostRehydrate a sessiongetRelease the card hold (edit-after-card)postPoll card statusgetOpen the card windowpostOpen a card-update window for a live subscriptionpost
Company
    Get company detailsget
Connected app OAuth
    JSON Web Key Set used to verify OAuth access-token signaturesgetRFC 8414 authorization-server metadata for the connected-app OAuth servergetRFC 9728 protected-resource metadata for an MCP resourcegetRFC 9728 protected-resource metadata for an MCP resourcegetOpenID Connect discovery document for the connected-app OAuth serverget
Credit Notes
    List credit notesgetCreate a credit notepostGet a credit notegetGet the delivery status of a credit notegetDownload the credit note PDFgetSend a credit note to the customerpostCredit a whole invoicepost
Customers
    List customersgetCreate a customerpostGet a customergetUpdate a customerpatchList a customer's contactsgetList a customer's departmentsgetList customer groupsget
Dimensions
    List all dimensionsgetCreate a new dimension categorypostGet a dimensiongetUpdate a dimension categoryputDelete a dimension categorydeleteList distribution keys (paginated)getCreate a distribution keypostGet a distribution keygetList dimension values (paginated)getCreate a new dimension valuepostUpdate a dimension valueputDelete a dimension valuedelete
Document Templates
    List document templatesget
Download Links
    Mint a download link for a document PDFgetDownload a minted linkget
Draft Journal Entries
    Create multiple draft journal entries in batchpostList draft journal entriesgetCreate a draft journal entrypostGet a draft journal entrygetDelete a draft journal entrydeleteBook a draft journal entrypost
Draft Journal Entries (v2)
    Create draft journal entries in batch (v2)postList draft journal entries (v2)getCreate a draft journal entry (v2)postGet a draft journal entry (v2)getDelete a draft journal entry (v2)deleteUpdate a draft journal entry (v2)patchBook a draft journal entry (v2)post
Entitlements
    List entitlementsgetCreate an entitlementpostGet an entitlementgetDelete an entitlementdeleteUpdate an entitlementpatch
Invoices
    List invoicesgetCreate a draft invoicepostGet an invoicegetGet the delivery status of an invoicegetDownload the invoice PDFgetSend an invoice to the customerpost
Journal Categories
    List journal categoriesgetCreate a journal categorypostUpdate a journal categoryputDelete a journal categorydelete
Journal Entries
    List journal entriesgetGet a journal entrygetUpdate a journal entry — correct the reference and/or set your external system idpatchGet attachments for a journal entrygetPreview a correction without posting itpostMove postings to different accounts, keeping the document intactpostReverse a posted entry and open a draft to re-enter itpostReverse posted journal entries in batchpostReverse a posted journal entrypost
Journal Entries (v2)
    Create a journal entry (v2)postCreate journal entries in batch (v2)post
MCP
    LedgerBee Developer MCP Serverpost
Meters
    List meter subscriptions by IDgetReport usagepostList meter subscriptions by nameget
Open Entries
    List a counterparty’s open entriesget
Order Confirmations
    List order confirmationsgetCreate a draft order confirmationpostGet an order confirmationgetUpdate a draft order confirmationpatchConvert an order confirmation into an invoicepostDownload an order confirmation as PDFgetSend an order confirmationpost
Payment Methods
    List saved payment methods for a customergetCancel 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
Portal Plans
    List the full plan cataloguegetGet a plangetResolve the gated pricing catalogue for an identified buyer (partner display)post
Portal SSO
    Get a tenant's SSO signing keys (JWKS)getMint a checkout-vouch token (partner-vouched anonymous checkout)postMint a customer-portal SSO handoff referencepostProvision a customer + grant portal access (partner JIT provisioning)postRevoke (force-refresh) a user's customer-portal sessionspost
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 productpatchArchive a productpost
Projects
    List all projectsgetCreate or update a project by external referenceputCreate a projectpostGet a projectgetUpdate a projectputGet project profitgetAdd a subprojectpostUpdate a subprojectputDelete a subprojectdelete
Quotes
    List quotesgetCreate a draft quotepostGet a quotegetUpdate a draft quotepatchConvert a quotepostDownload a quote as PDFgetSend a quotepost
Settlements
    List a counterparty’s settlementsgetSettle open entries against each otherpostGet a settlementgetCheck what settling these entries would dopost
Subscriptions
    List customer subscriptionsgetAssign a subscription to a customerpostGet a customer subscription by its stable idgetUpdate a customer subscriptionpatchRetry a failed card paymentpostList a subscription's pending scheduled changesgetCancel a single pending scheduled changedeleteCancel a customer subscriptionpostList subscription plansgetCreate a subscription planpostArchive a subscription planpost
Suppliers
    List suppliersgetCreate a supplierpostList supplier contactsgetList supplier departmentsgetList supplier groupsget
VAT Codes
    List VAT codesget
Vendors
    List vendorsgetCreate a vendorpostList vendor contactsgetList vendor departmentsgetList vendor groupsget
Webhook Endpoints
    List webhook endpointsgetCreate a webhook endpointpostRetrieve a webhook endpointgetUpdate a webhook endpointputDelete a webhook endpointdeleteRoll the signing secretpostSend a test eventpost
Schemas
LedgerBee Public API
LedgerBee Public API

Draft Journal Entries

Download schema

deprecated

Create multiple draft journal entries in batch

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

Creates multiple draft journal entries in a single transaction. All entries are committed together — if any entry fails, the entire batch is rolled back.

DEPRECATED — sunset on 2026-12-31 (RFC 8594; every response carries Deprecation/Sunset/Link headers). Migrate to POST /api/v2/draft-journal-batches.

Required Scope

  • journal-entries-write

Create multiple draft journal entries in batch › Headers

x-api-idempotency-key
​string · maxLength: 255

Optional idempotency key for safely retrying mutating requests.

Create multiple draft journal entries in batch › Request Body

CreateDraftJournalEntryBatchRequest
​CreateDraftJournalEntryRequest[] · minItems: 1 · maxItems: 100 · required

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

Create multiple draft journal entries in batch › Responses

Batch of draft journal entries created successfully

CreateDraftJournalEntryBatchResponse
totalCreated
​number · required

Number of draft entries successfully created

Example: 5
​DraftJournalEntryResponse[] · required

Details of all created draft journal entries

POST/v1/draft-journal-batches
curl https://api.ledgerbee.com/api/v1/draft-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": "supplier_invoice", "type": "debit", "description": "Office supplies purchase", "reference": "REF-2026-001", "currency": "DKK", "customerId": "550e8400-e29b-41d4-a716-446655440002", "supplierId": "550e8400-e29b-41d4-a716-446655440003", "vendorId": "550e8400-e29b-41d4-a716-446655440003", "tagIds": [ "550e8400-e29b-41d4-a716-446655440003" ], "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "attachments": [], "splitEntries": [], "externalSystemId": "erp-7f3a2c91" } ] }'
Example Request Body
{ "entries": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "contraAccountId": "550e8400-e29b-41d4-a716-446655440001", "date": "2026-01-15", "amount": 1000, "entryType": "supplier_invoice", "type": "debit", "description": "Office supplies purchase", "reference": "REF-2026-001", "currency": "DKK", "customerId": "550e8400-e29b-41d4-a716-446655440002", "supplierId": "550e8400-e29b-41d4-a716-446655440003", "vendorId": "550e8400-e29b-41d4-a716-446655440003", "tagIds": [ "550e8400-e29b-41d4-a716-446655440003" ], "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "attachments": [], "splitEntries": [], "externalSystemId": "erp-7f3a2c91" } ] }
json
application/json
Example Responses
{ "totalCreated": 5, "entries": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "date": "2026-01-15", "documentDate": "2026-01-15", "amount": 7450, "originalAmount": 1000, "currency": "EUR", "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", "supplierId": "550e8400-e29b-41d4-a716-446655440003", "vendorId": "550e8400-e29b-41d4-a716-446655440003", "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "tagIds": [ "string" ], "documentRefs": [ "string" ], "lines": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "type": "debit", "amount": 500, "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "description": "Consulting hours - March", "tagIds": [ "string" ] } ], "splitEntries": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "type": "debit", "amount": 500, "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "description": "Consulting hours — March", "tagIds": [ "string" ] } ], "exchangeRate": 7.45, "exchangeRateDate": "2026-01-15", "status": "DRAFT", "createdAt": "2026-01-15T10:30:00.000Z", "updatedAt": "2026-01-15T10:30:00.000Z" } ] }
json
application/json

deprecated

List draft journal entries

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

Retrieves a paginated list of draft journal entries created via the public API, with optional filtering.

DEPRECATED — sunset on 2026-12-31 (RFC 8594; every response carries Deprecation/Sunset/Link headers). Migrate to the v2 draft endpoints under /api/v2/draft-journal-entries.

Required Scope

  • journal-entries-read

List draft journal entries › 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

supplierId
​string · uuid

Filter by supplier ID

vendorId
​string · uuid

Deprecated — use supplierId. Legacy alias for the supplier filter.

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 › Responses

Draft journal entries retrieved successfully

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/v1/draft-journal-entries
curl https://api.ledgerbee.com/api/v1/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": 7450, "originalAmount": 1000, "currency": "EUR", "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", "supplierId": "550e8400-e29b-41d4-a716-446655440003", "vendorId": "550e8400-e29b-41d4-a716-446655440003", "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "tagIds": [ "string" ], "documentRefs": [ "string" ], "lines": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "type": "debit", "amount": 500, "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "description": "Consulting hours - March", "tagIds": [ "string" ] } ], "splitEntries": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "type": "debit", "amount": 500, "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "description": "Consulting hours — March", "tagIds": [ "string" ] } ], "exchangeRate": 7.45, "exchangeRateDate": "2026-01-15", "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

deprecated

Create a draft journal entry

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

Creates a draft journal entry that can be reviewed before being booked as a real posted journal entry. Accepts the same fields as the regular journal entry endpoint. The posting period is not validated at creation time.

DEPRECATED — sunset on 2026-12-31 (RFC 8594; every response carries Deprecation/Sunset/Link headers). Migrate to the v2 draft endpoints under /api/v2/draft-journal-entries.

Required Scope

  • journal-entries-write

Create a draft journal entry › Headers

x-api-idempotency-key
​string · maxLength: 255

Optional idempotency key for safely retrying mutating requests.

Create a draft journal entry › Request Body

CreateDraftJournalEntryRequest
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). Optional for drafts — partial drafts (primary line only) are allowed and must be completed in the platform UI before booking. Cannot be a heading or total account.

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 · maxLength: 2000

Description of the journal entry

Example: Office supplies purchase
reference
​string

Reference number or identifier

Example: REF-2026-001
currency
​string | null · minLength: 3 · maxLength: 3 · pattern: ^[A-Za-z]{3}$

ISO 4217 alpha-3 currency code.

Example: DKK
customerId
​string

Customer ID (UUID) for customer-related entries

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

Supplier 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
​AttachmentRequest[] · maxItems: 10

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

​DraftSplitEntryLine[] · minItems: 2 · maxItems: 50

Split entry lines for multi-account drafts. Each line may omit accountId to act as a placeholder; the draft is persisted with NULL on those lines and the user completes them in the platform UI. Booking still requires every line to carry a real account and the entry to balance.

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
vendorId
​string · deprecated

Deprecated — use supplierId. Legacy alias for the supplier reference; still accepted, but sending both supplierId and vendorId with different values returns 400.

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

Create a draft journal entry › Responses

Draft journal entry created successfully

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

How large this draft is, in your company base currency — the one your company reports in. A draft entered as EUR 1,000 by a company reporting in DKK is 7450 here.

Do not display this number together with currency. That field names the currency the draft was entered in (EUR in the example), while this number is in DKK, so the pair reads as EUR 7,450 — about seven times what the draft is actually for. originalAmount is the figure that belongs beside currency.

Reads 0 on a draft that holds no figure in this currency. The minAmount and maxAmount filters on the list endpoint run on this field, so a draft reading 0 here is excluded whenever either filter is applied.

The deprecated v1 create takes a request field of the same name carrying the figure the draft is entered in, so a EUR draft sent as amount: 1000 is returned with amount: 7450 — the request field and this one are in different currencies under one name.

Example: 7450
originalAmount
​number · required

How large this draft is, in the currency it was entered in — the currency currency names, and the one lines[].amount uses. A draft entered as EUR 1,000 is 1000 here, whatever your company reports in.

This is the figure to display beside currency. amount is the same draft in your company base currency: on that EUR draft this field reads 1000 and amount reads 7450. Reads 0 on a draft that carries no amount yet.

Example: 1000
currency
​string · required

The currency this draft was entered in — EUR for a supplier invoice received in EUR. This is not the currency amount is in; originalAmount is the figure in this currency.

Example: EUR
journalType
​string · required

Journal type

Example: JOURNAL_ENTRY
​DraftJournalEntryLine[] · required

Every line of the draft — the field to read. Always present, an empty array included, so a client never has to distinguish absent from empty. The name matches the lines the v2 draft endpoints take, so a v2 draft reads back through the field it was written with. The deprecated v1 create still takes splitEntries, so a v1 client sends these lines back under that name.

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
supplierId
​string

Supplier 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

exchangeRate
​number | null

What one unit of currency is worth in your company base currency. 7.45 on a EUR draft of a company reporting in DKK means 1 EUR buys 7.45 DKK.

This is the rate the draft is converted at, not a factor between the two amounts on this response. amount is built from the draft lines rather than from originalAmount, so multiplying originalAmount by this rate does not reliably reproduce it — on a draft whose sides disagree the two figures differ with no rate involved at all. A draft already entered in your own currency carries 1. Null only while a foreign-currency draft has no rate yet — booking gives it one.

Example: 7.45
exchangeRateDate
​string | null

Date the exchangeRate was captured for. Null whenever exchangeRate is.

Example: 2026-01-15
vendorId
​string · deprecated

Deprecated — use supplierId. Legacy alias, emitted with the same value.

Example: 550e8400-e29b-41d4-a716-446655440003
​DraftSplitEntryLineResponse[] · deprecated

Deprecated — use lines. Present only on drafts that need it: a plain one-debit-one-credit draft with no per-line memo or dimensions reports its accounts through accountId / contraAccountId and omits this field entirely. It also reports a placeholder line's account as "", which the write side rejects. lines is populated either way and round-trips.

POST/v1/draft-journal-entries
curl https://api.ledgerbee.com/api/v1/draft-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": "supplier_invoice", "type": "debit", "description": "Office supplies purchase", "reference": "REF-2026-001", "currency": "DKK", "customerId": "550e8400-e29b-41d4-a716-446655440002", "supplierId": "550e8400-e29b-41d4-a716-446655440003", "vendorId": "550e8400-e29b-41d4-a716-446655440003", "tagIds": [ "550e8400-e29b-41d4-a716-446655440003" ], "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "attachments": [ { "filename": "invoice.pdf", "content": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC...", "mimeType": "application/pdf" } ], "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" ] } ], "externalSystemId": "erp-7f3a2c91" }'
Example Request Body
{ "accountId": "550e8400-e29b-41d4-a716-446655440000", "contraAccountId": "550e8400-e29b-41d4-a716-446655440001", "date": "2026-01-15", "amount": 1000, "entryType": "supplier_invoice", "type": "debit", "description": "Office supplies purchase", "reference": "REF-2026-001", "currency": "DKK", "customerId": "550e8400-e29b-41d4-a716-446655440002", "supplierId": "550e8400-e29b-41d4-a716-446655440003", "vendorId": "550e8400-e29b-41d4-a716-446655440003", "tagIds": [ "550e8400-e29b-41d4-a716-446655440003" ], "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "attachments": [ { "filename": "invoice.pdf", "content": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC...", "mimeType": "application/pdf" } ], "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" ] } ], "externalSystemId": "erp-7f3a2c91" }
json
application/json
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "date": "2026-01-15", "documentDate": "2026-01-15", "amount": 7450, "originalAmount": 1000, "currency": "EUR", "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", "supplierId": "550e8400-e29b-41d4-a716-446655440003", "vendorId": "550e8400-e29b-41d4-a716-446655440003", "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "tagIds": [ "string" ], "documentRefs": [ "string" ], "lines": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "type": "debit", "amount": 500, "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "description": "Consulting hours - March", "tagIds": [ "string" ] } ], "splitEntries": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "type": "debit", "amount": 500, "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "description": "Consulting hours — March", "tagIds": [ "string" ] } ], "exchangeRate": 7.45, "exchangeRateDate": "2026-01-15", "status": "DRAFT", "createdAt": "2026-01-15T10:30:00.000Z", "updatedAt": "2026-01-15T10:30:00.000Z" }
json
application/json

deprecated

Get a draft journal entry

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

Retrieves a draft journal entry by ID.

DEPRECATED — sunset on 2026-12-31 (RFC 8594; every response carries Deprecation/Sunset/Link headers). Migrate to the v2 draft endpoints under /api/v2/draft-journal-entries.

Required Scope

  • journal-entries-read

Get a draft journal entry › path Parameters

id
​string · required

Draft journal entry ID (UUID)

Get a draft journal entry › Responses

Draft journal entry retrieved successfully

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

How large this draft is, in your company base currency — the one your company reports in. A draft entered as EUR 1,000 by a company reporting in DKK is 7450 here.

Do not display this number together with currency. That field names the currency the draft was entered in (EUR in the example), while this number is in DKK, so the pair reads as EUR 7,450 — about seven times what the draft is actually for. originalAmount is the figure that belongs beside currency.

Reads 0 on a draft that holds no figure in this currency. The minAmount and maxAmount filters on the list endpoint run on this field, so a draft reading 0 here is excluded whenever either filter is applied.

The deprecated v1 create takes a request field of the same name carrying the figure the draft is entered in, so a EUR draft sent as amount: 1000 is returned with amount: 7450 — the request field and this one are in different currencies under one name.

Example: 7450
originalAmount
​number · required

How large this draft is, in the currency it was entered in — the currency currency names, and the one lines[].amount uses. A draft entered as EUR 1,000 is 1000 here, whatever your company reports in.

This is the figure to display beside currency. amount is the same draft in your company base currency: on that EUR draft this field reads 1000 and amount reads 7450. Reads 0 on a draft that carries no amount yet.

Example: 1000
currency
​string · required

The currency this draft was entered in — EUR for a supplier invoice received in EUR. This is not the currency amount is in; originalAmount is the figure in this currency.

Example: EUR
journalType
​string · required

Journal type

Example: JOURNAL_ENTRY
​DraftJournalEntryLine[] · required

Every line of the draft — the field to read. Always present, an empty array included, so a client never has to distinguish absent from empty. The name matches the lines the v2 draft endpoints take, so a v2 draft reads back through the field it was written with. The deprecated v1 create still takes splitEntries, so a v1 client sends these lines back under that name.

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
supplierId
​string

Supplier 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

exchangeRate
​number | null

What one unit of currency is worth in your company base currency. 7.45 on a EUR draft of a company reporting in DKK means 1 EUR buys 7.45 DKK.

This is the rate the draft is converted at, not a factor between the two amounts on this response. amount is built from the draft lines rather than from originalAmount, so multiplying originalAmount by this rate does not reliably reproduce it — on a draft whose sides disagree the two figures differ with no rate involved at all. A draft already entered in your own currency carries 1. Null only while a foreign-currency draft has no rate yet — booking gives it one.

Example: 7.45
exchangeRateDate
​string | null

Date the exchangeRate was captured for. Null whenever exchangeRate is.

Example: 2026-01-15
vendorId
​string · deprecated

Deprecated — use supplierId. Legacy alias, emitted with the same value.

Example: 550e8400-e29b-41d4-a716-446655440003
​DraftSplitEntryLineResponse[] · deprecated

Deprecated — use lines. Present only on drafts that need it: a plain one-debit-one-credit draft with no per-line memo or dimensions reports its accounts through accountId / contraAccountId and omits this field entirely. It also reports a placeholder line's account as "", which the write side rejects. lines is populated either way and round-trips.

GET/v1/draft-journal-entries/{id}
curl https://api.ledgerbee.com/api/v1/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": 7450, "originalAmount": 1000, "currency": "EUR", "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", "supplierId": "550e8400-e29b-41d4-a716-446655440003", "vendorId": "550e8400-e29b-41d4-a716-446655440003", "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "tagIds": [ "string" ], "documentRefs": [ "string" ], "lines": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "type": "debit", "amount": 500, "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "description": "Consulting hours - March", "tagIds": [ "string" ] } ], "splitEntries": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "type": "debit", "amount": 500, "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "description": "Consulting hours — March", "tagIds": [ "string" ] } ], "exchangeRate": 7.45, "exchangeRateDate": "2026-01-15", "status": "DRAFT", "createdAt": "2026-01-15T10:30:00.000Z", "updatedAt": "2026-01-15T10:30:00.000Z" }
json
application/json

deprecated

Delete a draft journal entry

DELETE
https://api.ledgerbee.com/api
/v1/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). When a bank payment still references the draft, the delete is refused with 409 DRAFT_LINKED_TO_BANK_PAYMENT (the linked payment ids are in the error details); re-send with ?detachBankPayments=true to confirm — the payments survive, only their draft link is cleared.

DEPRECATED — sunset on 2026-12-31 (RFC 8594; every response carries Deprecation/Sunset/Link headers). Migrate to the v2 draft endpoints under /api/v2/draft-journal-entries.

Required Scope

  • journal-entries-write

Delete a draft journal entry › path Parameters

id
​string · required

Draft journal entry ID (UUID)

Delete a draft journal entry › query Parameters

detachBankPayments
​boolean

Confirm detaching any bank payments still linked to this draft.

Delete a draft journal entry › Headers

x-api-idempotency-key
​string · maxLength: 255

Optional idempotency key for safely retrying mutating requests.

Delete a draft journal entry › Responses

Draft deleted successfully

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

deprecated

Book a draft journal entry

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

Converts a draft journal entry into a real posted journal entry. Validates the posting period and balance, then permanently deletes the draft.

DEPRECATED — sunset on 2026-12-31 (RFC 8594; every response carries Deprecation/Sunset/Link headers). Migrate to the v2 draft endpoints under /api/v2/draft-journal-entries.

Required Scope

  • journal-entries-write

Book a draft journal entry › path Parameters

id
​string · required

Draft journal entry ID (UUID)

Book a draft journal entry › Headers

x-api-idempotency-key
​string · maxLength: 255

Optional idempotency key for safely retrying mutating requests.

Book a draft journal entry › 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 line accountId names, in that line's account currency (currency). On a two-line entry this is the entry total. On a wider entry it is one line of several — sum lines[].functionalAmount on either side for the total.

Example: 1000
currency
​string · required

Currency amount is denominated in — the operating currency of that first line's account.

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

One non-VAT line of the entry, paired with contraAccountId as a two-line summary. On a two-line entry the pair describes the whole entry. On a wider one it describes two of its lines and nothing about the rest — read lines for the full picture. Which two are picked is not part of this contract and differs by endpoint (a read takes them in posting order; the draft-booking response takes a debit and a credit), so do not infer a line's position from it.

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
originalAmount
​number | null

What you posted, in the currency you posted it in — the document figure, before any conversion. Distinct from amount, which is denominated in the ACCOUNT currency (currency): a EUR entry against DKK accounts reports originalAmount: 200 / originalCurrency: "EUR" and amount: 1492.24 / currency: "DKK". Null on historical entries that stored no document amount.

Example: 200
originalCurrency
​string | null

The currency the entry was posted in: what originalAmount is denominated in, and what exchangeRate converts FROM. Present independently of originalAmount — an entry can name a currency and store no document amount, which is the historical shape, and the currency still says what its rate converts from. Null only on an entry that names no currency at all.

Example: EUR
exchangeRate
​number | null

Rate converting originalCurrency to the company base currency — 7.45 on a EUR entry of a DKK-based company means 1 EUR = 7.45 DKK, so originalAmount * exchangeRate is the base-currency total that lines[].functionalAmount sums to. Reported whether you supplied it on create or the platform resolved it, which is what lets you compute the difference against the rate your own settlement later used. 1 on an entry posted in the base currency, since that is the conversion that was applied and stored. Null only on historical entries that stored no rate at all.

Example: 7.45
exchangeRateDate
​string | null

Date the exchangeRate was captured for. Null whenever exchangeRate is.

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

The other half of the accountId pair, when the entry has a second non-VAT line. Same caveat: it is one line, not a summary of every line other than accountId.

Example: 550e8400-e29b-41d4-a716-446655440001
​JournalEntryLine[]

Every line of the entry, including VAT lines the platform derived. This is the complete picture: accountId, contraAccountId, amount, currency and vatCodeId above all describe one line, or two, and nothing about the rest. Debits and credits balance across the array on functionalAmount. The order is stable for a given entry — normally the order the lines were posted in — but match lines by account rather than by position, and use vatSourceLineIndex to link a VAT line to its source.

customerId
​string

Customer ID if applicable

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

Supplier ID if applicable

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

VAT/Tax code on the line accountId names, if it has one. Lines can carry different codes — read lines[].vatCodeId for the per-line codes.

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

Tag IDs attached to the entry as a whole. Per-line dimensions are on lines[].tagIds.

documentRefs
​string[]

Document IDs attached to the entry

vendorId
​string · deprecated

Deprecated — use supplierId. Legacy alias, emitted with the same value.

Example: 550e8400-e29b-41d4-a716-446655440003
POST/v1/draft-journal-entries/{id}/book
curl https://api.ledgerbee.com/api/v1/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", "originalAmount": 200, "originalCurrency": "EUR", "exchangeRate": 7.45, "exchangeRateDate": "2026-01-15", "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", "lines": [ { "accountId": "550e8400-e29b-41d4-a716-446655440000", "type": "debit", "accountAmount": 500, "accountCurrency": "DKK", "functionalAmount": 500, "originalAmount": 200, "isVatLine": false, "vatSourceLineIndex": 0, "vatCodeId": "550e8400-e29b-41d4-a716-446655440000", "description": "Consulting hours — March", "tagIds": [ "string" ] } ], "customerId": "550e8400-e29b-41d4-a716-446655440002", "supplierId": "550e8400-e29b-41d4-a716-446655440003", "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

Download LinksDraft Journal Entries (v2)