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

Journal Categories

Download schema

Journal category management endpoints


List journal categories

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

Retrieves the journal categories of your company. A category groups journal entries and restricts which entry types may be posted into it — pass its id as journalCategoryId when creating journal entries or drafts.

The default category is returned first, then the rest in creation order. Results are cached for 5 seconds. A change you make through this API clears that cache, so your own writes are visible on your next read.

What each type means

These five are the ones you can post. The entryType column is what you send when creating a journal entry or draft — several spellings map onto one type.

TypeHoldsPosted with
JOURNAL_ENTRYGeneral ledger entries with no customer or supplier sideentryType: "journal"
SUPPLIER_INVOICEBills received from a supplierentryType: "supplier_invoice" (or the deprecated "invoice")
SUPPLIER_PAYMENTMoney paid out to a supplierentryType: "supplier_payment" (or the deprecated "payment")
CUSTOMER_INVOICEInvoices issued to a customerentryType: "customer_invoice"
CUSTOMER_PAYMENTMoney received from a customerentryType: "customer_payment"

The remaining six are raised by the platform, not by an API caller. Listing them restricts which of these postings may land in the category; there is no entryType that produces one.

TypeRaised by
CUSTOMER_REMINDERReminder fees and interest booked by the dunning process
CURRENCY_REVALUATIONForeign-currency revaluation
VAT_SETTLEMENTVAT settlement
SET_OPENING_BALANCEOpening balances, on company setup and at year end
TRANSFERRED_AMOUNTThe opening-balance transfer posted by the year-end close
YEAR_END_CLOSINGThe legacy year-end close

Required Scope

  • journal-categories-read

List journal categories › Responses

List of available journal categories for the company

​JournalCategoryResponse[]
JournalCategoryResponse
id
​string · required

The unique identifier of the journal category

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

Name of the journal category

Example: General Journal
isDefault
​boolean · required

Whether this is the default journal category

Example: true
allowedJournalTypes
​array[] · required

Journal entry types that may be posted into this category. A category created without an explicit list carries all eleven. See the endpoint description for what each value means.

Example: ["JOURNAL_ENTRY","SUPPLIER_INVOICE","SUPPLIER_PAYMENT","CUSTOMER_INVOICE","CUSTOMER_PAYMENT"]
GET/v1/journal-categories
curl https://api.ledgerbee.com/api/v1/journal-categories \ --header 'x-api-key: <api-key>'
Example Responses
[ { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "General Journal", "isDefault": true, "allowedJournalTypes": [ "JOURNAL_ENTRY", "SUPPLIER_INVOICE", "SUPPLIER_PAYMENT", "CUSTOMER_INVOICE", "CUSTOMER_PAYMENT" ] } ]
json
application/json

Create a journal category

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

Creates a journal category. Use this to set up the journals a customer posts into — for example one for sales and another for settlements — instead of asking them to create those in the app first.

Request Body

FieldTypeRequiredDescription
namestringYesDisplay name (2-100 characters, must be unique within your company)
allowedJournalTypesstring[]NoEntry types that may be posted into this category. Omit to allow every type.
isDefaultbooleanNoMake this the default category. Defaults to false.

Restricting what can be posted

Omit allowedJournalTypes and the category accepts every type — the same set your company's first category is created with. That is usually what you want for a general-purpose journal.

Send a list to restrict it. An empty array is rejected rather than treated as "allow everything": it would describe a category nothing could ever be posted into, which is never intentional.

What each type means

These five are the ones you can post. The entryType column is what you send when creating a journal entry or draft — several spellings map onto one type.

TypeHoldsPosted with
JOURNAL_ENTRYGeneral ledger entries with no customer or supplier sideentryType: "journal"
SUPPLIER_INVOICEBills received from a supplierentryType: "supplier_invoice" (or the deprecated "invoice")
SUPPLIER_PAYMENTMoney paid out to a supplierentryType: "supplier_payment" (or the deprecated "payment")
CUSTOMER_INVOICEInvoices issued to a customerentryType: "customer_invoice"
CUSTOMER_PAYMENTMoney received from a customerentryType: "customer_payment"

The remaining six are raised by the platform, not by an API caller. Listing them restricts which of these postings may land in the category; there is no entryType that produces one.

TypeRaised by
CUSTOMER_REMINDERReminder fees and interest booked by the dunning process
CURRENCY_REVALUATIONForeign-currency revaluation
VAT_SETTLEMENTVAT settlement
SET_OPENING_BALANCEOpening balances, on company setup and at year end
TRANSFERRED_AMOUNTThe opening-balance transfer posted by the year-end close
YEAR_END_CLOSINGThe legacy year-end close

Examples

A journal that accepts anything:

Code
{ "name": "Daily" }

A sales journal restricted to customer postings:

Code
{ "name": "Sales", "allowedJournalTypes": ["CUSTOMER_INVOICE", "CUSTOMER_PAYMENT"], "isDefault": false }

The default category

Your company always has exactly one default. Passing isDefault: true moves the flag off the category that currently holds it. Passing false (or omitting it) leaves the existing default in place.

Error Handling

  • Name already taken: JOURNAL_CATEGORY_NAME_ALREADY_EXISTS
  • Empty allowedJournalTypes: JOURNAL_CATEGORY_ALLOWED_TYPES_REQUIRED

Required Scope

  • journal-categories-write

Create a journal category › Headers

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

Optional idempotency key for safely retrying mutating requests.

Create a journal category › Request Body

CreateJournalCategoryRequest
name
​string · minLength: 2 · maxLength: 100 · required

Name of the journal category. Must be unique within your company.

Example: Sales
allowedJournalTypes
​string[]

Journal entry types that may be posted into this category. Posting an entry of a type not listed here is rejected. Omit this field to allow every type — the same set a company’s first category is created with. An empty array is rejected: it would describe a category nothing could ever be posted into. See the endpoint description for what each value means and which entryType reaches it. Send the field or leave it out — an explicit null is rejected.

Enum values:
JOURNAL_ENTRY
SUPPLIER_INVOICE
SUPPLIER_PAYMENT
CUSTOMER_INVOICE
CUSTOMER_PAYMENT
CUSTOMER_REMINDER
CURRENCY_REVALUATION
VAT_SETTLEMENT
Example: ["CUSTOMER_INVOICE","CUSTOMER_PAYMENT"]
isDefault
​boolean

Make this the default category. Your company always has exactly one default, so passing true moves the flag off the category that currently holds it. Defaults to false.

Example: false

Create a journal category › Responses

The created journal category

JournalCategoryResponse
id
​string · required

The unique identifier of the journal category

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

Name of the journal category

Example: General Journal
isDefault
​boolean · required

Whether this is the default journal category

Example: true
allowedJournalTypes
​array[] · required

Journal entry types that may be posted into this category. A category created without an explicit list carries all eleven. See the endpoint description for what each value means.

Example: ["JOURNAL_ENTRY","SUPPLIER_INVOICE","SUPPLIER_PAYMENT","CUSTOMER_INVOICE","CUSTOMER_PAYMENT"]
POST/v1/journal-categories
curl https://api.ledgerbee.com/api/v1/journal-categories \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "name": "Sales", "allowedJournalTypes": [ "CUSTOMER_INVOICE", "CUSTOMER_PAYMENT" ], "isDefault": false }'
Example Request Body
{ "name": "Sales", "allowedJournalTypes": [ "CUSTOMER_INVOICE", "CUSTOMER_PAYMENT" ], "isDefault": false }
json
application/json
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "name": "General Journal", "isDefault": true, "allowedJournalTypes": [ "JOURNAL_ENTRY", "SUPPLIER_INVOICE", "SUPPLIER_PAYMENT", "CUSTOMER_INVOICE", "CUSTOMER_PAYMENT" ] }
json
application/json

Update a journal category

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

Updates a journal category. All fields are optional — send only what you want to change; anything you omit is left as it is.

Request Body

FieldTypeRequiredDescription
namestringNoNew display name (2-100 characters, must be unique within your company)
allowedJournalTypesstring[]NoReplaces the allowed entry types. Cannot be empty.
isDefaultbooleanNoSee below.

Changing the allowed types

The new list replaces the old one, and cannot be empty. Entries already posted into the category are unaffected — the restriction applies to entries posted from now on.

Note this differs from create: omitting the field here leaves the current set alone, whereas omitting it on create means every type. To widen a category back to everything, send the full list.

What each type means

These five are the ones you can post. The entryType column is what you send when creating a journal entry or draft — several spellings map onto one type.

TypeHoldsPosted with
JOURNAL_ENTRYGeneral ledger entries with no customer or supplier sideentryType: "journal"
SUPPLIER_INVOICEBills received from a supplierentryType: "supplier_invoice" (or the deprecated "invoice")
SUPPLIER_PAYMENTMoney paid out to a supplierentryType: "supplier_payment" (or the deprecated "payment")
CUSTOMER_INVOICEInvoices issued to a customerentryType: "customer_invoice"
CUSTOMER_PAYMENTMoney received from a customerentryType: "customer_payment"

The remaining six are raised by the platform, not by an API caller. Listing them restricts which of these postings may land in the category; there is no entryType that produces one.

TypeRaised by
CUSTOMER_REMINDERReminder fees and interest booked by the dunning process
CURRENCY_REVALUATIONForeign-currency revaluation
VAT_SETTLEMENTVAT settlement
SET_OPENING_BALANCEOpening balances, on company setup and at year end
TRANSFERRED_AMOUNTThe opening-balance transfer posted by the year-end close
YEAR_END_CLOSINGThe legacy year-end close

Moving the default

Mark the successor with isDefault: true; that moves the flag off the category that currently holds it, in one call. Clearing the flag with isDefault: false is only accepted when another category is already the default, so a company can never end up without one.

Error Handling

  • Category not found: JOURNAL_CATEGORY_NOT_FOUND
  • Name already taken: JOURNAL_CATEGORY_NAME_ALREADY_EXISTS
  • Empty allowedJournalTypes: JOURNAL_CATEGORY_ALLOWED_TYPES_REQUIRED
  • Clearing the only default: JOURNAL_CATEGORY_CANNOT_DELETE_DEFAULT

Required Scope

  • journal-categories-write

Update a journal category › path Parameters

id
​string · required

The journal category id

Update a journal category › Headers

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

Optional idempotency key for safely retrying mutating requests.

Update a journal category › Request Body

UpdateJournalCategoryRequest
name
​string · minLength: 2 · maxLength: 100

New name for the journal category. Must be unique within your company.

Example: Sales and refunds
allowedJournalTypes
​string[]

Replaces the set of journal entry types that may be posted into this category. The list cannot be empty, and omitting the field here leaves the current set unchanged (unlike on create, where omitting it means every type). Entries already posted are unaffected.

Enum values:
JOURNAL_ENTRY
SUPPLIER_INVOICE
SUPPLIER_PAYMENT
CUSTOMER_INVOICE
CUSTOMER_PAYMENT
CUSTOMER_REMINDER
CURRENCY_REVALUATION
VAT_SETTLEMENT
Example: ["CUSTOMER_INVOICE","CUSTOMER_PAYMENT"]
isDefault
​boolean

Pass true to make this the default category, which moves the flag off the category that currently holds it. Passing false is only accepted when another category is already the default — to move the default, mark its successor rather than clearing the incumbent.

Example: true

Update a journal category › Responses

The updated journal category

JournalCategoryResponse
id
​string · required

The unique identifier of the journal category

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

Name of the journal category

Example: General Journal
isDefault
​boolean · required

Whether this is the default journal category

Example: true
allowedJournalTypes
​array[] · required

Journal entry types that may be posted into this category. A category created without an explicit list carries all eleven. See the endpoint description for what each value means.

Example: ["JOURNAL_ENTRY","SUPPLIER_INVOICE","SUPPLIER_PAYMENT","CUSTOMER_INVOICE","CUSTOMER_PAYMENT"]
PUT/v1/journal-categories/{id}
curl https://api.ledgerbee.com/api/v1/journal-categories/:id \ --request PUT \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "name": "Sales and refunds", "allowedJournalTypes": [ "CUSTOMER_INVOICE", "CUSTOMER_PAYMENT" ], "isDefault": true }'
Example Request Body
{ "name": "Sales and refunds", "allowedJournalTypes": [ "CUSTOMER_INVOICE", "CUSTOMER_PAYMENT" ], "isDefault": true }
json
application/json
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "name": "General Journal", "isDefault": true, "allowedJournalTypes": [ "JOURNAL_ENTRY", "SUPPLIER_INVOICE", "SUPPLIER_PAYMENT", "CUSTOMER_INVOICE", "CUSTOMER_PAYMENT" ] }
json
application/json

Delete a journal category

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

Deletes a journal category.

Prerequisites

  • It must not be the default category. Make another category the default first, then delete this one.
  • No unposted entry may still be pointing at it. Move or post those drafts first.

What happens to posted entries

Journal entries already posted into the category keep pointing at it, so history still reads back with the journal it was booked in. The category simply stops appearing in listings and can no longer be posted into.

Error Handling

  • Category not found: JOURNAL_CATEGORY_NOT_FOUND
  • It is the default: JOURNAL_CATEGORY_CANNOT_DELETE_DEFAULT
  • An unposted entry still uses it: JOURNAL_CATEGORY_IN_USE_BY_DRAFT

Required Scope

  • journal-categories-write

Delete a journal category › path Parameters

id
​string · required

The journal category id

Delete a journal category › Headers

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

Optional idempotency key for safely retrying mutating requests.

Delete a journal category › Responses

Journal category deleted

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

InvoicesJournal Entries
JSON
JSON