LedgerBee Developer
  • Getting started
  • Conventions
  • Products
  • API Reference
Information
Accounts
    List accountsget
API Key
    Get current API keyget
Company
    Get company detailsget
Customers
    List customersgetCreate a customerpostGet a single customergetUpdate a customerpatchList a customer's contactsgetList a customer's departmentsgetList customer groupsget
Dimensions
    List all dimensionsgetCreate a new dimension categorypostGet a single dimension by IDgetUpdate a dimension categoryputDelete a dimension categorydeleteCreate a new dimension valuepostUpdate a dimension valueputDelete a dimension valuedelete
Document Templates
    List document templatesget
Journal Categories
    List journal categoriesget
Journal Entries
    Create multiple journal entries in batch (DEPRECATED — migrate to v2)postList journal entriesgetCreate a single journal entry (DEPRECATED — use POST /api/v2/journal-entries)postGet a single journal entrygetUpdate a journal entry — correct the reference and/or set your external system idpatchGet attachments for a journal entrygetReverse posted journal entries in batchpostReverse a posted journal entrypost
MCP
    LedgerBee Developer MCP Serverpost
Meters
    List meter subscriptions by IDgetReport usagepostList meter subscriptions by nameget
Product Groups
    List product groupsgetCreate a product grouppostGet a product groupgetDelete a product groupdeleteUpdate a product grouppatch
Product Prices
    Create a product pricepostGet a product pricegetDelete a product pricedeleteUpdate a product pricepatchActivate a product pricepostArchive a product pricepostDisable a product pricepostSet a price as the product defaultpost
Products
    List productsgetCreate a productpostGet a productgetDelete a productdeleteUpdate a productpatch
Projects
    List all projectsgetIdempotent project upsertputCreate a projectpostGet a projectgetUpdate a projectputGet project profitgetAdd a subprojectpostUpdate a subprojectputDelete a subprojectdelete
Subscriptions
    List customer subscriptionsgetAssign a subscription to a customerpostGet a customer subscription by its stable idgetUpdate a customer subscriptionpatchList a subscription’s pending scheduled changesgetCancel a single pending scheduled changedeleteCancel a customer subscriptionpostList subscription plansgetArchive a subscription planpost
VAT Codes
    List VAT codesget
Webhook Endpoints
    List webhook endpointsgetCreate a webhook endpointpostRetrieve a webhook endpointgetUpdate a webhook endpointputDelete a webhook endpointdeleteRoll the signing secretpostSend a test eventpost
Portal SSO
    Published RP signing keys (JWKS) for a tenant's private_key_jwt SSOgetMint a customer-portal SSO handoff referencepostProvision a customer + grant portal access (partner JIT provisioning)postRevoke (force-refresh) a user's customer-portal sessionspost
Credit Notes
    List credit notesgetCreate a credit notepostGet a credit note by IDgetGet the delivery status of a credit notegetDownload the credit note PDFgetSend a credit note to the customerpost
Payment Methods
    List saved payment methods for a customergetApply a payment method to all active subscriptions for a customerpostCancel a saved card on the payment providerdeleteUnassign a payment method from a customerdeleteGenerate a link for the customer to save a card for future paymentspostSet a saved payment method as the customer defaultput
Draft Journal Entries
    Create multiple draft journal entries in batchpostList draft journal entriesgetCreate a draft journal entrypostGet a single draft journal entrygetDelete a draft journal entrydeleteBook a draft journal entrypost
Invoices
    List invoicesgetCreate a draft invoicepostGet an invoice by IDgetGet the delivery status of an invoicegetDownload the invoice PDFgetSend an invoice to the customerpost
Order Confirmations
    List order confirmationsgetCreate a draft order confirmationpostGet an order confirmation by idgetUpdate a draft order confirmationpatchConvert an order confirmation into an invoicepostDownload an order confirmation as PDFgetSend an order confirmationpost
Portal Plans
    List the full plan cataloguegetGet one plan by idgetResolve the gated pricing catalogue for an identified buyer (partner display)post
Quotes
    List quotesgetCreate a draft quotepostGet a quote by idgetUpdate a draft quotepatchConvert a quotepostDownload a quote as PDFgetSend a quotepost
Vendors
    List vendorsgetCreate a vendorpostList vendor contactsgetList vendor departmentsgetList vendor groupsget
Draft Journal Entries (v2)
    Create draft journal entries in batch (v2)postList draft journal entries (v2)getCreate a draft journal entry (v2)postGet a single draft journal entry (v2)getDelete a draft journal entry (v2)deleteUpdate a draft journal entry (v2)patchBook a draft journal entry (v2)post
Journal Entries (v2)
    Create a journal entry (v2)postCreate journal entries in batch (v2)post
Schemas
LedgerBee Public API
LedgerBee Public API

Dimensions

Download schema

Dimension categories and values for journal entry tagging


List all dimensions

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

Retrieves all dimension categories and their values for your company.

Response Structure

Each dimension includes:

  • id: Unique identifier for the dimension category
  • name: Display name (e.g., "Department", "Project")
  • isUnique: Whether only one value can be assigned per journal entry
  • values: Tree of dimension values with hierarchical structure

Value Hierarchy

Values are returned as a nested tree structure:

  • Root values have parentId: null
  • Nested values reference their parent via parentId
  • children array contains nested values

Performance

Results are cached for 5 seconds to improve performance. Changes via POST/PUT/DELETE endpoints automatically invalidate the cache.

Example Response

Code
[ { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Department", "isUnique": true, "values": [ { "id": "...", "name": "Sales", "parentId": null, "children": [ { "id": "...", "name": "Sales Europe", "parentId": "...", "children": [] } ] } ] } ]

List all dimensions › Responses

List of dimensions with their values

​Dimension[]
Dimension
id
​string · required

Unique identifier of the dimension category

Example: 550e8400-e29b-41d4-a716-446655440000
name
​string · minLength: 2 · maxLength: 100 · required

Display name of the dimension category

Example: Department
isUnique
​boolean · required

When true, only one value from this dimension can be assigned to a journal entry (mutually exclusive). When false, multiple values can be assigned (additive tags). Example: A "Department" dimension is typically unique (one department per entry), while a "Tags" dimension might allow multiple values.

Example: true
​DimensionValue[] · required

Available dimension values within this category, organized as a hierarchical tree. Root values have parentId as null, nested values reference their parent.

GET/v1/dimensions
curl https://api.ledgerbee.com/api/v1/dimensions \ --header 'x-api-key: <api-key>'
Example Responses
[ { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Department", "isUnique": true, "values": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Marketing", "parentId": "550e8400-e29b-41d4-a716-446655440001", "children": [ null ] } ] } ]
json
application/json

Create a new dimension category

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

Creates a new dimension category (e.g., "Department", "Project", "Cost Center").

Request Body

FieldTypeRequiredDescription
namestringYesDisplay name (2-100 characters, must be unique)
isUniquebooleanYesWhether only one value can be assigned per journal entry

Uniqueness Flag

Choose the isUnique setting based on your use case:

  • isUnique: true - Mutually exclusive categories

    • Example: "Department" - a transaction belongs to exactly one department
    • Journal entry validation will reject multiple values from this category
  • isUnique: false - Additive tags

    • Example: "Tags" - a transaction can have multiple descriptive tags
    • Multiple values can be freely assigned

Note: You can change this setting later, but changing from false to true will fail if any journal entries already have multiple values assigned from this category.

Example

Code
{ "name": "Cost Center", "isUnique": true }

Create a new dimension category › Request Body

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

Display name for the dimension category. Must be unique within your company. Choose a descriptive name that clearly indicates the categorization purpose.

Example: Cost Center
isUnique
​boolean · required

Whether only one value from this dimension can be assigned to a journal entry. Set to true for mutually exclusive categories (e.g., Department - an entry belongs to exactly one department). Set to false for additive tags (e.g., Tags - an entry can have multiple tags). This constraint is enforced when assigning dimension values to journal entries.

Example: true

Create a new dimension category › Responses

Dimension category created successfully

DimensionResponse
id
​string · required

Unique identifier of the created/updated dimension category

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

Display name of the dimension category

Example: Department
isUnique
​boolean · required

Whether only one value from this dimension can be assigned per journal entry

Example: true
POST/v1/dimensions
curl https://api.ledgerbee.com/api/v1/dimensions \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "name": "Cost Center", "isUnique": true }'
Example Request Body
{ "name": "Cost Center", "isUnique": true }
json
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Department", "isUnique": true }
json
application/json

Get a single dimension by ID

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

Retrieves a specific dimension category and all its values.

Useful when you need to refresh data for a single dimension after making changes, without fetching all dimensions.

Get a single dimension by ID › path Parameters

id
​string · required

The unique identifier of the dimension category

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

Get a single dimension by ID › Responses

The dimension with its values

Dimension
id
​string · required

Unique identifier of the dimension category

Example: 550e8400-e29b-41d4-a716-446655440000
name
​string · minLength: 2 · maxLength: 100 · required

Display name of the dimension category

Example: Department
isUnique
​boolean · required

When true, only one value from this dimension can be assigned to a journal entry (mutually exclusive). When false, multiple values can be assigned (additive tags). Example: A "Department" dimension is typically unique (one department per entry), while a "Tags" dimension might allow multiple values.

Example: true
​DimensionValue[] · required

Available dimension values within this category, organized as a hierarchical tree. Root values have parentId as null, nested values reference their parent.

GET/v1/dimensions/{id}
curl https://api.ledgerbee.com/api/v1/dimensions/:id \ --header 'x-api-key: <api-key>'
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Department", "isUnique": true, "values": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Marketing", "parentId": "550e8400-e29b-41d4-a716-446655440001", "children": [ null ] } ] }
json
application/json

Update a dimension category

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

Updates an existing dimension category. All fields are optional - only provide fields you want to change.

Updating the Name

Provide a new name to rename the dimension category. The new name must be unique within your company.

Changing the Uniqueness Constraint

From false to true:

  • Will fail if any journal entries currently have multiple values from this category
  • Before making this change, ensure all journal entries have at most one value assigned
  • Error code if failed: JOURNAL_TAG_CATEGORY_UNIQUENESS_CONFLICT

From true to false:

  • Always succeeds
  • Existing journal entries are unaffected
  • Future journal entries can have multiple values

Request Body

FieldTypeRequiredDescription
namestringNoNew display name (2-100 characters, must be unique)
isUniquebooleanNoNew uniqueness constraint

Example

Code
{ "name": "Business Unit" }

Update a dimension category › path Parameters

id
​string · required

The unique identifier of the dimension category to update

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

Update a dimension category › Request Body

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

New display name for the dimension category. Must be unique within your company. Changing the name does not affect existing dimension value assignments.

Example: Business Unit
isUnique
​boolean

Update the uniqueness constraint for this dimension category. Changing from false to true will fail if any journal entries currently have multiple values assigned from this category. Plan this change carefully as it affects data validation.

Example: false

Update a dimension category › Responses

Dimension category updated successfully

DimensionResponse
id
​string · required

Unique identifier of the created/updated dimension category

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

Display name of the dimension category

Example: Department
isUnique
​boolean · required

Whether only one value from this dimension can be assigned per journal entry

Example: true
PUT/v1/dimensions/{id}
curl https://api.ledgerbee.com/api/v1/dimensions/:id \ --request PUT \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "name": "Business Unit", "isUnique": false }'
Example Request Body
{ "name": "Business Unit", "isUnique": false }
json
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Department", "isUnique": true }
json
application/json

Delete a dimension category

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

Deletes a dimension category. The category must be empty (have no values) before deletion.

Prerequisites

Before deleting a dimension category:

  1. Delete all dimension values within the category
  2. For hierarchical values, delete children before parents

Cascade Behavior

  • Dimension values are NOT automatically deleted
  • You must explicitly delete all values first
  • This prevents accidental data loss

Error Handling

  • If the category has values, returns error code: JOURNAL_TAG_CATEGORY_HAS_TAGS
  • If the category doesn't exist, returns error code: JOURNAL_TAG_CATEGORY_NOT_FOUND

Delete a dimension category › path Parameters

id
​string · required

The unique identifier of the dimension category to delete

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

Delete a dimension category › Responses

Dimension category deleted successfully

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

Create a new dimension value

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

Creates a new dimension value within an existing dimension category.

Request Body

FieldTypeRequiredDescription
dimensionIdstring (UUID)YesThe dimension category ID this value belongs to
namestringYesDisplay name (2-120 characters, must be unique within category)
parentIdstring (UUID)NoParent value ID for hierarchical structures

Creating Hierarchical Values

Dimension values can be nested to create hierarchies like "Europe > Denmark > Copenhagen":

  1. Create "Europe" without a parentId (root level)
  2. Create "Denmark" with parentId = Europe's ID
  3. Create "Copenhagen" with parentId = Denmark's ID

Rules:

  • Parent must exist within the same dimension category
  • No circular references allowed

Example - Root Value

Code
{ "dimensionId": "550e8400-e29b-41d4-a716-446655440000", "name": "Europe" }

Example - Nested Value

Code
{ "dimensionId": "550e8400-e29b-41d4-a716-446655440000", "name": "Denmark", "parentId": "550e8400-e29b-41d4-a716-446655440001" }

Create a new dimension value › Request Body

CreateDimensionValueRequest
dimensionId
​string · required

ID of the dimension category this value belongs to. The category must exist and belong to your company.

Example: 550e8400-e29b-41d4-a716-446655440000
name
​string · minLength: 2 · maxLength: 120 · required

Display name for the dimension value. Must be unique within the dimension category. Choose descriptive names that will be clear when selecting values in the UI.

Example: Marketing
parentId
​string | null

Parent dimension value ID for creating hierarchical structures. Leave null or omit for root-level values. The parent must exist within the same dimension category. Example: Create "Europe" first, then create "Denmark" with parentId set to Europe's ID.

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

Create a new dimension value › Responses

Dimension value created successfully

DimensionValueResponse
id
​string · required

Unique identifier of the created/updated dimension value

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

Display name of the dimension value

Example: Marketing
dimensionId
​string · required

ID of the dimension category this value belongs to

Example: 550e8400-e29b-41d4-a716-446655440001
dimensionName
​string · required

Name of the dimension category this value belongs to

Example: Department
dimensionIsUnique
​boolean · required

Whether the parent category enforces single selection

Example: true
parentId
​string | null

Parent dimension value ID, if this is a nested value

Example: 550e8400-e29b-41d4-a716-446655440002
POST/v1/dimensions/values
curl https://api.ledgerbee.com/api/v1/dimensions/values \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "dimensionId": "550e8400-e29b-41d4-a716-446655440000", "name": "Marketing", "parentId": "550e8400-e29b-41d4-a716-446655440001" }'
Example Request Body
{ "dimensionId": "550e8400-e29b-41d4-a716-446655440000", "name": "Marketing", "parentId": "550e8400-e29b-41d4-a716-446655440001" }
json
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Marketing", "dimensionId": "550e8400-e29b-41d4-a716-446655440001", "dimensionName": "Department", "dimensionIsUnique": true, "parentId": "550e8400-e29b-41d4-a716-446655440002" }
json
application/json

Update a dimension value

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

Updates an existing dimension value. All fields are optional - only provide fields you want to change.

Updating the Name

Provide a new name to rename the value. The new name must be unique within the dimension category.

Changing the Parent (Moving in Hierarchy)

Set parentId to move the value within the hierarchy:

  • Move to root level: Set parentId: null
  • Move under another value: Set parentId to the new parent's ID

Rules:

  • New parent must exist within the same dimension category
  • Cannot create circular references (A cannot be parent of B if B is already an ancestor of A)
  • Moving a value also moves all its children

Request Body

FieldTypeRequiredDescription
namestringNoNew display name (2-120 characters, must be unique within category)
parentIdstring (UUID) or nullNoNew parent value ID, or null for root level

Example - Rename

Code
{ "name": "Northern Europe" }

Example - Move to Root

Code
{ "parentId": null }

Update a dimension value › path Parameters

id
​string · required

The unique identifier of the dimension value to update

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

Update a dimension value › Request Body

UpdateDimensionValueRequest
name
​string · minLength: 2 · maxLength: 120

New display name for the dimension value. Must be unique within the dimension category. Changing the name does not affect existing journal entry assignments.

Example: Digital Marketing
parentId
​string | null

New parent dimension value ID. Set to null to move to root level. The parent must exist within the same dimension category and cannot create circular references (e.g., A cannot be parent of B if B is already an ancestor of A).

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

Update a dimension value › Responses

Dimension value updated successfully

DimensionValueResponse
id
​string · required

Unique identifier of the created/updated dimension value

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

Display name of the dimension value

Example: Marketing
dimensionId
​string · required

ID of the dimension category this value belongs to

Example: 550e8400-e29b-41d4-a716-446655440001
dimensionName
​string · required

Name of the dimension category this value belongs to

Example: Department
dimensionIsUnique
​boolean · required

Whether the parent category enforces single selection

Example: true
parentId
​string | null

Parent dimension value ID, if this is a nested value

Example: 550e8400-e29b-41d4-a716-446655440002
PUT/v1/dimensions/values/{id}
curl https://api.ledgerbee.com/api/v1/dimensions/values/:id \ --request PUT \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "name": "Digital Marketing", "parentId": "550e8400-e29b-41d4-a716-446655440001" }'
Example Request Body
{ "name": "Digital Marketing", "parentId": "550e8400-e29b-41d4-a716-446655440001" }
json
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Marketing", "dimensionId": "550e8400-e29b-41d4-a716-446655440001", "dimensionName": "Department", "dimensionIsUnique": true, "parentId": "550e8400-e29b-41d4-a716-446655440002" }
json
application/json

Delete a dimension value

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

Deletes a dimension value. The value must have no children before deletion.

Prerequisites

Before deleting a dimension value:

  1. Delete all child values first (if hierarchical)
  2. Consider the impact on reporting - historical journal entries keep their assignments

Cascade Behavior

  • Child values are NOT automatically deleted
  • You must explicitly delete children first (bottom-up deletion)
  • Journal entry assignments are automatically removed when the value is deleted

Deletion Order for Hierarchies

For a hierarchy like "Europe > Denmark > Copenhagen":

  1. Delete "Copenhagen" first
  2. Then delete "Denmark"
  3. Finally delete "Europe"

Error Handling

  • If the value has children, returns error code: JOURNAL_TAG_HAS_CHILDREN
  • If the value doesn't exist, returns error code: JOURNAL_TAG_NOT_FOUND

Delete a dimension value › path Parameters

id
​string · required

The unique identifier of the dimension value to delete

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

Delete a dimension value › Responses

Dimension value deleted successfully

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

CustomersDocument Templates
JSON
JSON
JSON
JSON
JSON
JSON
JSON