LedgerBee Developer
  • Getting started
  • Conventions
  • Products
  • Advisor firms
  • Configuration
  • API Reference
Information
Accounts
    List accountsgetCreate an accountpostGet an accountgetDelete an accountdeleteUpdate an accountpatch
Advisor Authority Extracts
    Submit authority extract data for an advisor firm's clientspost
Advisor Clients
    List the advisor firm's clientsget
API Key
    Get current API keyget
Authority Extracts
    Submit authority extract datapost
Bank Reconciliations
    Reconcile bank lines against entriespostUndo a bank reconciliationpostCheck what undoing a reconciliation would dopostReconcile a batch of matchespostCheck what reconciling a batch of matches would dopostCheck what reconciling bank lines against entries would dopost
Bank Transactions
    List bank linesgetGet a bank linegetDismiss bank lines from reconciliationpostCheck which bank lines a dismiss would changepostRestore dismissed bank lines to reconciliationpostCheck which bank lines a restore would changepost
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 comparisongetExport a budget's Excel workbookgetOverwrite a budget's figures from an edited workbookpostList 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 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 Note Links
    Link a credit note to the invoice it creditspostCheck a credit note’s links and the invoices it can be linked topostDetach a credit note from the invoices it is applied topost
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 customergetDelete a customerdeleteUpdate 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
Discounts
    List discountsgetCreate a discountpostGet a discountgetDelete a discountdeleteUpdate a discountpatchSet a discount's amount in one currencyputRemove a discount's amount in one currencydeleteCheck whether a discount applies to a product for a customer on a daygetAssign a discountpostRemove an assignmentdeleteUpdate an assignmentpatchList a discount's codesgetAdd a code to a discountpostDelete a codedeleteUpdate a codepatchList the discounts that apply to a product for a customer on a daygetCheck a cartpostLook up a discount codeget
Document Templates
    List document templatesget
Document Upload Links
    Upload a file through a minted linkpost
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)patchGet attachments for a draft journal entry (v2)getAdd a document to a draft journal entry (v2)postRemove a document from a draft journal entry (v2)deleteBook a draft journal entry (v2)post
Entitlements
    List entitlementsgetCreate an entitlementpostGet an entitlementgetDelete an entitlementdeleteUpdate an entitlementpatch
Invoices
    List invoicesgetCreate a draft invoicepostGet an invoicegetDelete a draft invoicedeleteUpdate an unsent invoicepatchGet 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 entrygetAdd a document to a journal entrypostRemove a document from a journal entrydeletePreview a correction without posting itpostMove postings to different accounts, keeping the document intactpostRebuild the entry a reversal undid, as a draftpostPreview rebuilding the entry a reversal undidpostReverse a posted entry and open a draft to re-enter itpostReverse posted journal entries in batchpostPreview reversing posted journal entries in batchpostReverse a posted journal entrypostPreview reversing 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 settlementgetUndo a settlementpostCheck what undoing a settlement would dopostCheck what settling these entries would dopost
Shipments
    List shipmentsgetCreate a shipment from an orderpostGet a shipmentgetCancel a shipmentpostDispatch a shipmentpost
Stock
    List stock movementsgetList on-hand stockgetOn-hand for one productget
Subscriptions
    List customer subscriptionsgetAssign a subscription to a customerpostGet a customer subscription by its stable idgetUpdate a customer subscriptionpatchAdd an add-on to a customer subscriptionpostAttach existing subscriptions as add-onspostCheck whether subscriptions can become add-onspostChange the products on a customer subscriptionpostRetry a failed card paymentpostList a subscription's pending scheduled changesgetCancel a single pending scheduled changedeleteGet a subscription's unbilled usagegetCancel a customer subscriptionpostList subscription plansgetCreate a subscription planpostArchive a subscription planpost
Suppliers
    List suppliersgetCreate a supplierpostDelete a supplierdeleteList supplier contactsgetList supplier departmentsgetList supplier groupsget
VAT Codes
    List VAT codesgetCreate a VAT codepostGet a VAT codegetDelete a VAT codedeleteUpdate a VAT codepatch
VAT periods
    Record a VAT return filed outside LedgerBeepostPreview recording a VAT return filed outside LedgerBeepostSettle a filed VAT periodpostPreview a VAT period settlementpost
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

Bank Reconciliations

Download schema

Reconcile bank lines against entries

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

Credential: a company's API key or OAuth token.

Marks the bank lines reconciled against the entries named. A booked payment already posted to the bank account is linked as it is; an invoice gets a payment entry created for it, as a draft unless bookPayments is true.

Name targets by journalEntryIds, or by the openEntryIds the open-entries listing reports — an invoice or credit note there is matched through its newest booked, unreconciled entry. Or name one non-invoice draftJournalEntryId instead: the lines are reconciled against that draft alone, as the inbox reconciles a document’s draft.

Preview it first: the preview takes this exact body and answers with the refusal the reconcile call would give.

Required Scope

  • bank-reconciliations-write

Reconcile bank lines against entries › Headers

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

Optional idempotency key for safely retrying mutating requests.

Reconcile bank lines against entries › Request Body

PublicBankReconciliationRequest
bankTransactionIds
​string[] · required

The bank lines to reconcile, all unreconciled. Several lines may face one target (a payment that arrived in parts), or one line several targets — not several of each.

journalEntryIds
​string[]

Booked journal entries the lines settle: a payment entry already posted to the bank account, or the invoice entry a payment is to be created for. Each must be live (not reversed) and unreconciled.

openEntryIds
​string[]

Open invoices, credit notes or payments the lines settle, by the id the open-entries listing reports. An invoice or credit note is matched through its newest booked, unreconciled entry, the one the reconciliation screen would pick; a payment row is its own entry.

draftJournalEntryId
​string · uuid

A draft journal entry the lines settle, instead of booked or open entries: an editable, unreconciled, non-invoice draft that already carries the line on the bank’s account or is balanced onto it. It is matched alone, so it cannot be combined with journalEntryIds, openEntryIds or journalCategoryId (400 BANK_RECONCILE_DRAFT_TARGET_CONFLICT). An invoice draft is refused with BANK_INBOX_INVOICE_NOT_SUPPORTED: match its payment draft instead. bookPayments books the draft in the same call.

description
​string · maxLength: 500

A note stored on the reconciliation.

journalCategoryId
​string · uuid

Journal category for a payment the reconciliation creates. Omit it to let the category be chosen the way the reconciliation screen chooses it.

bookPayments
​boolean

Book the payments the reconciliation creates in the same call. Omitted or false, they are created as drafts to book separately.

Reconcile bank lines against entries › Responses

The reconciliation was recorded

PublicBankReconciliation
id
​string · required

The reconciliation. Undo it with POST /v1/bank-reconciliations/{id}/unreconcile.

bankTransactionIds
​string[] · required
journalEntryIds
​string[] · required
​PublicBankReconciliationCreatedPayment[] · required
offsetJournalEntryIds
​string[] · required
​PublicBankReconciliationPreviewWarning[] · required
POST/v1/bank-reconciliations
curl https://api.ledgerbee.com/api/v1/bank-reconciliations \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "bankTransactionIds": [ "string" ], "journalEntryIds": [ "string" ], "openEntryIds": [ "string" ], "draftJournalEntryId": "3f2b6f1e-8c4d-4e0b-9d5a-7a1c2e3f4b5d", "description": "string", "journalCategoryId": "3f2b6f1e-8c4d-4e0b-9d5a-7a1c2e3f4b5d", "bookPayments": true }'
Example Request Body
{ "bankTransactionIds": [ "string" ], "journalEntryIds": [ "string" ], "openEntryIds": [ "string" ], "draftJournalEntryId": "3f2b6f1e-8c4d-4e0b-9d5a-7a1c2e3f4b5d", "description": "string", "journalCategoryId": "3f2b6f1e-8c4d-4e0b-9d5a-7a1c2e3f4b5d", "bookPayments": true }
json
application/json
Example Responses
{ "id": "id", "bankTransactionIds": [ "string" ], "journalEntryIds": [ "string" ], "createdPayments": [ { "journalEntryId": "journalEntryId", "paymentType": "CUSTOMER_PAYMENT", "amount": 0, "currency": "currency", "invoiceJournalEntryId": "invoiceJournalEntryId", "invoiceStatus": "OPEN" } ], "offsetJournalEntryIds": [ "string" ], "warnings": [ { "code": "code", "severity": "info", "details": {} } ] }
json
application/json

Undo a bank reconciliation

POST
https://api.ledgerbee.com/api
/v1/bank-reconciliations/{reconciliationId}/unreconcile
x-api-key (header)
or
OAuth 2.0

Credential: a company's API key or OAuth token.

Releases the bank lines, deletes the payment drafts the reconciliation created, and reverses the payments it booked — the last only with confirmPaymentReversal: true. Entries it only linked stay posted unless named in alsoReverseJournalEntryIds.

Undoing an undone reconciliation is refused with BANK_RECONCILIATION_ALREADY_UNRECONCILED.

Required Scope

  • bank-reconciliations-write

Undo a bank reconciliation › path Parameters

reconciliationId
​string · required

ID of the bank reconciliation (UUID)

Undo a bank reconciliation › Headers

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

Optional idempotency key for safely retrying mutating requests.

Undo a bank reconciliation › Request Body

PublicUnreconcileRequest
reason
​string · maxLength: 500 · required

Why the reconciliation is undone. Stored for the audit trail.

confirmPaymentReversal
​boolean

Confirms that the payments the reconciliation booked are reversed. Required when it booked any; the preview’s paymentsToReverse lists them.

reversalDate
​string · enum
Enum values:
today
original
alsoReverseJournalEntryIds
​string[]

Entries the undo would otherwise leave posted (the preview’s entriesStillPostedAfterUndo) to reverse as well. Any other id refuses the undo.

Undo a bank reconciliation › Responses

The reconciliation was undone

PublicUnreconcileResponse
reconciliationId
​string · required
deletedDraftCount
​number · required
reversedPaymentCount
​number · required
alsoReversedEntryCount
​number · required
POST/v1/bank-reconciliations/{reconciliationId}/unreconcile
curl https://api.ledgerbee.com/api/v1/bank-reconciliations/:reconciliationId/unreconcile \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "reason": "string", "confirmPaymentReversal": true, "reversalDate": "today", "alsoReverseJournalEntryIds": [ "string" ] }'
Example Request Body
{ "reason": "string", "confirmPaymentReversal": true, "reversalDate": "today", "alsoReverseJournalEntryIds": [ "string" ] }
json
application/json
Example Responses
{ "reconciliationId": "reconciliationId", "deletedDraftCount": 0, "reversedPaymentCount": 0, "alsoReversedEntryCount": 0 }
json
application/json

Check what undoing a reconciliation would do

POST
https://api.ledgerbee.com/api
/v1/bank-reconciliations/{reconciliationId}/unreconcile/preview
x-api-key (header)
or
OAuth 2.0

Credential: a company's API key or OAuth token.

Reports the bank lines it releases, the payment drafts it deletes, the booked payments it reverses and the posted entries it only unlinks. A reconciliation settled as part of a cluster is undone with the whole cluster, and the figures cover all of it. Nothing is changed.

Answers 400 with the undo’s own refusal when a date it would post on is in a closed period. Send confirmPaymentReversal: false to be refused, as an unconfirmed undo is, when booked payments would be reversed.

Required Scope

  • bank-reconciliations-write

Check what undoing a reconciliation would do › path Parameters

reconciliationId
​string · required

ID of the bank reconciliation (UUID)

Check what undoing a reconciliation would do › Headers

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

Optional idempotency key for safely retrying mutating requests.

Check what undoing a reconciliation would do › Request Body

PublicUnreconcilePreviewRequest
reversalDate
​string · enum

When the reversal of each booked payment posts: on the payment’s own date (ORIGINAL, the default) or today (TODAY).

Enum values:
today
original
reason
​string · maxLength: 500

Ignored here; accepted so the undo body can be previewed as it is.

confirmPaymentReversal
​boolean

Send false to be answered 400 BANK_UNRECONCILE_REQUIRES_CONFIRMATION if the undo would reverse booked payments, as the undo itself would without confirmation. Omitted, the preview reports them in paymentsToReverse instead.

alsoReverseJournalEntryIds
​string[]

Answered 400 BANK_UNRECONCILE_ENTRY_NOT_REVERSIBLE when one of them is not an entry the undo would leave posted (entriesStillPostedAfterUndo), as the undo itself would refuse it.

Check what undoing a reconciliation would do › Responses

What the undo would do. Nothing was changed.

PublicUnreconcilePreview
reconciliationId
​string · required
bankTransactionCount
​number · required

Bank lines released, across the whole cluster when it was settled as one.

journalEntryCount
​number · required
draftsToDelete
​string[] · required

Payment drafts the reconciliation created, deleted by the undo.

paymentsToReverse
​string[] · required

Booked payments the reconciliation created, reversed by the undo once confirmed.

requiresConfirmation
​boolean · required

The undo needs confirmPaymentReversal: true.

​PublicUnreconcileStillPostedEntry[] · required

Posted entries the undo only unlinks; they stay posted unless named in alsoReverseJournalEntryIds.

POST/v1/bank-reconciliations/{reconciliationId}/unreconcile/preview
curl https://api.ledgerbee.com/api/v1/bank-reconciliations/:reconciliationId/unreconcile/preview \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "reversalDate": "today", "reason": "string", "confirmPaymentReversal": true, "alsoReverseJournalEntryIds": [ "string" ] }'
Example Request Body
{ "reversalDate": "today", "reason": "string", "confirmPaymentReversal": true, "alsoReverseJournalEntryIds": [ "string" ] }
json
application/json
Example Responses
{ "reconciliationId": "reconciliationId", "bankTransactionCount": 0, "journalEntryCount": 0, "draftsToDelete": [ "string" ], "paymentsToReverse": [ "string" ], "requiresConfirmation": true, "entriesStillPostedAfterUndo": [ { "journalEntryId": "journalEntryId", "entryNumber": "entryNumber", "journalType": "journalType", "date": "date" } ] }
json
application/json

Reconcile a batch of matches

POST
https://api.ledgerbee.com/api
/v1/bank-reconciliations/batch
x-api-key (header)
or
OAuth 2.0

Credential: a company's API key or OAuth token.

Reconciles up to 50 matches, each exactly as the single reconcile call would: one at a time, in order, each in its own transaction. A refused match does not undo the others; its row carries the code the single call would have answered with, and its errorDetails.

bookPayments applies to every match. journalCategoryId applies to the payments the matches create, and not to a match that names a draft.

Preview it first with POST /v1/bank-reconciliations/batch/preview, which takes this exact body.

Required Scope

  • bank-reconciliations-write

Reconcile a batch of matches › Headers

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

Optional idempotency key for safely retrying mutating requests.

Reconcile a batch of matches › Request Body

PublicBankReconciliationBatchRequest
​PublicBankReconciliationBatchItem[] · required

The matches, at most 50. Each is reconciled on its own, in order; a later match naming a bank line an earlier one names is refused with BANK_RECONCILE_BATCH_LINE_REPEATED, and one naming a draft an earlier one names with BANK_RECONCILE_BATCH_DRAFT_REPEATED.

bookPayments
​boolean

Book the payments every match creates, and a matched draft, in the same call. Omitted or false, they stay drafts.

journalCategoryId
​string · uuid

Journal category for the payments the matches create. Not applied to a match that names a draft, which keeps its own.

Reconcile a batch of matches › Responses

One row per match: its reconciliation, or the code it was refused with.

PublicBankReconciliationBatch
reconciledCount
​number · required
failedCount
​number · required
​PublicBankReconciliationBatchResultRow[] · required

One row per match, in order.

POST/v1/bank-reconciliations/batch
curl https://api.ledgerbee.com/api/v1/bank-reconciliations/batch \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "items": [ { "bankTransactionIds": [ "string" ], "journalEntryIds": [ "string" ], "openEntryIds": [ "string" ], "draftJournalEntryId": "3f2b6f1e-8c4d-4e0b-9d5a-7a1c2e3f4b5d", "description": "string" } ], "bookPayments": true, "journalCategoryId": "3f2b6f1e-8c4d-4e0b-9d5a-7a1c2e3f4b5d" }'
Example Request Body
{ "items": [ { "bankTransactionIds": [ "string" ], "journalEntryIds": [ "string" ], "openEntryIds": [ "string" ], "draftJournalEntryId": "3f2b6f1e-8c4d-4e0b-9d5a-7a1c2e3f4b5d", "description": "string" } ], "bookPayments": true, "journalCategoryId": "3f2b6f1e-8c4d-4e0b-9d5a-7a1c2e3f4b5d" }
json
application/json
Example Responses
{ "reconciledCount": 0, "failedCount": 0, "results": [ { "index": 0, "success": true, "reconciliationId": "reconciliationId", "errorCode": "errorCode", "errorDetails": {} } ] }
json
application/json

Check what reconciling a batch of matches would do

POST
https://api.ledgerbee.com/api
/v1/bank-reconciliations/batch/preview
x-api-key (header)
or
OAuth 2.0

Credential: a company's API key or OAuth token.

Runs each match’s preview, in order, and reports per match whether the batch would reconcile it or the code it would be refused with. Nothing is written. A match naming a bank line an earlier match names is reported as BANK_RECONCILE_BATCH_LINE_REPEATED, and one naming a draft an earlier match names as BANK_RECONCILE_BATCH_DRAFT_REPEATED, as the batch refuses them.

Answers 400 BANK_RECONCILE_BATCH_NOTHING_RECONCILABLE, with the per-match rows in details.results, when no match would be reconciled.

Required Scope

  • bank-reconciliations-write

Check what reconciling a batch of matches would do › Headers

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

Optional idempotency key for safely retrying mutating requests.

Check what reconciling a batch of matches would do › Request Body

PublicBankReconciliationBatchRequest
​PublicBankReconciliationBatchItem[] · required

The matches, at most 50. Each is reconciled on its own, in order; a later match naming a bank line an earlier one names is refused with BANK_RECONCILE_BATCH_LINE_REPEATED, and one naming a draft an earlier one names with BANK_RECONCILE_BATCH_DRAFT_REPEATED.

bookPayments
​boolean

Book the payments every match creates, and a matched draft, in the same call. Omitted or false, they stay drafts.

journalCategoryId
​string · uuid

Journal category for the payments the matches create. Not applied to a match that names a draft, which keeps its own.

Check what reconciling a batch of matches would do › Responses

What each match would do. Nothing was written.

PublicBankReconciliationBatchPreview
reconcilableCount
​number · required

Matches the batch would reconcile.

failedCount
​number · required

Matches the batch would refuse.

​PublicBankReconciliationBatchResultRow[] · required

One row per match, in order.

POST/v1/bank-reconciliations/batch/preview
curl https://api.ledgerbee.com/api/v1/bank-reconciliations/batch/preview \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "items": [ { "bankTransactionIds": [ "string" ], "journalEntryIds": [ "string" ], "openEntryIds": [ "string" ], "draftJournalEntryId": "3f2b6f1e-8c4d-4e0b-9d5a-7a1c2e3f4b5d", "description": "string" } ], "bookPayments": true, "journalCategoryId": "3f2b6f1e-8c4d-4e0b-9d5a-7a1c2e3f4b5d" }'
Example Request Body
{ "items": [ { "bankTransactionIds": [ "string" ], "journalEntryIds": [ "string" ], "openEntryIds": [ "string" ], "draftJournalEntryId": "3f2b6f1e-8c4d-4e0b-9d5a-7a1c2e3f4b5d", "description": "string" } ], "bookPayments": true, "journalCategoryId": "3f2b6f1e-8c4d-4e0b-9d5a-7a1c2e3f4b5d" }
json
application/json
Example Responses
{ "reconcilableCount": 0, "failedCount": 0, "results": [ { "index": 0, "success": true, "reconciliationId": "reconciliationId", "errorCode": "errorCode", "errorDetails": {} } ] }
json
application/json

Check what reconciling bank lines against entries would do

POST
https://api.ledgerbee.com/api
/v1/bank-reconciliations/preview
x-api-key (header)
or
OAuth 2.0

Credential: a company's API key or OAuth token.

Runs the reconciliation and rolls it back: which entries the lines would settle, the payment entries it would create with their lines, and its warnings. Nothing is written.

Takes the same body as the reconcile call. A request the reconcile call would refuse answers 400 with that refusal’s own code and details — an outgoing line against an incoming entry, an entry without a line on the bank’s account, an entry already reconciled or reversed.

Required Scope

  • bank-reconciliations-write

Check what reconciling bank lines against entries would do › Headers

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

Optional idempotency key for safely retrying mutating requests.

Check what reconciling bank lines against entries would do › Request Body

PublicBankReconciliationRequest
bankTransactionIds
​string[] · required

The bank lines to reconcile, all unreconciled. Several lines may face one target (a payment that arrived in parts), or one line several targets — not several of each.

journalEntryIds
​string[]

Booked journal entries the lines settle: a payment entry already posted to the bank account, or the invoice entry a payment is to be created for. Each must be live (not reversed) and unreconciled.

openEntryIds
​string[]

Open invoices, credit notes or payments the lines settle, by the id the open-entries listing reports. An invoice or credit note is matched through its newest booked, unreconciled entry, the one the reconciliation screen would pick; a payment row is its own entry.

draftJournalEntryId
​string · uuid

A draft journal entry the lines settle, instead of booked or open entries: an editable, unreconciled, non-invoice draft that already carries the line on the bank’s account or is balanced onto it. It is matched alone, so it cannot be combined with journalEntryIds, openEntryIds or journalCategoryId (400 BANK_RECONCILE_DRAFT_TARGET_CONFLICT). An invoice draft is refused with BANK_INBOX_INVOICE_NOT_SUPPORTED: match its payment draft instead. bookPayments books the draft in the same call.

description
​string · maxLength: 500

A note stored on the reconciliation.

journalCategoryId
​string · uuid

Journal category for a payment the reconciliation creates. Omit it to let the category be chosen the way the reconciliation screen chooses it.

bookPayments
​boolean

Book the payments the reconciliation creates in the same call. Omitted or false, they are created as drafts to book separately.

Check what reconciling bank lines against entries would do › Responses

What the reconciliation would do. Nothing was written.

PublicBankReconciliationPreview
journalEntryIds
​string[] · required

The journal entries the lines would be reconciled against, with open entries resolved.

​PublicBankReconciliationPreviewBankLine[] · required
​PublicBankReconciliationPreviewPayment[] · required

The payment entries the reconciliation would create, line by line. Empty when every target is already a payment.

offsetJournalEntryIds
​string[] · required

Invoice entries that cancel each other inside the selection and settle without a bank payment.

​PublicBankReconciliationPreviewWarning[] · required
POST/v1/bank-reconciliations/preview
curl https://api.ledgerbee.com/api/v1/bank-reconciliations/preview \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "bankTransactionIds": [ "string" ], "journalEntryIds": [ "string" ], "openEntryIds": [ "string" ], "draftJournalEntryId": "3f2b6f1e-8c4d-4e0b-9d5a-7a1c2e3f4b5d", "description": "string", "journalCategoryId": "3f2b6f1e-8c4d-4e0b-9d5a-7a1c2e3f4b5d", "bookPayments": true }'
Example Request Body
{ "bankTransactionIds": [ "string" ], "journalEntryIds": [ "string" ], "openEntryIds": [ "string" ], "draftJournalEntryId": "3f2b6f1e-8c4d-4e0b-9d5a-7a1c2e3f4b5d", "description": "string", "journalCategoryId": "3f2b6f1e-8c4d-4e0b-9d5a-7a1c2e3f4b5d", "bookPayments": true }
json
application/json
Example Responses
{ "journalEntryIds": [ "string" ], "bankTransactions": [ { "id": "id", "bankAccountId": "bankAccountId", "signedAmount": 0, "currency": "currency", "date": "date", "autoIncluded": true } ], "payments": [ { "journalType": "CUSTOMER_PAYMENT", "date": "date", "currency": "currency", "invoiceJournalEntryId": "invoiceJournalEntryId", "invoiceReference": "invoiceReference", "appliedInvoiceAmount": 0, "invoiceStatusAfter": "OPEN", "isOverpayment": true, "lines": [ { "accountNumber": "accountNumber", "accountName": "accountName", "type": "debit", "ledgerCurrencyAmount": 0, "ledgerCurrency": "ledgerCurrency", "baseCurrencyAmount": 0 } ] } ], "offsetJournalEntryIds": [ "string" ], "warnings": [ { "code": "code", "severity": "info", "details": {} } ] }
json
application/json

Authority ExtractsBank Transactions