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

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.

Tip: for dimensions with many values (e.g. imported charts), the paginated GET /dimensions/{id}/values returns the same values as a flat set with parentId for rebuilding the hierarchy, without shipping every dimension's full tree in one payload.

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": [] } ] } ] } ]

Required Scope

  • dimensions-read

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: 255 · 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 }

Required Scope

  • dimensions-write

Create a new dimension category › Headers

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

Optional idempotency key for safely retrying mutating requests.

Create a new dimension category › Request Body

CreateDimensionRequest
name
​string · minLength: 2 · maxLength: 255 · 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
application/json
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Department", "isUnique": true }
json
application/json

Get a dimension

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.

Tip: for a dimension with many values, the paginated GET /dimensions/{id}/values returns the same values as a flat set with parentId for rebuilding the hierarchy.

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

Required Scope

  • dimensions-read

Get a dimension › path Parameters

id
​string · required

The unique identifier of the dimension category

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

Get a dimension › 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: 255 · 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" }

Required Scope

  • dimensions-write

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

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

Optional idempotency key for safely retrying mutating requests.

Update a dimension category › Request Body

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

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
application/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

Required Scope

  • dimensions-write

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

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

Optional idempotency key for safely retrying mutating requests.

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

List distribution keys (paginated)

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

Lists the distribution keys of a dimension — reusable percentage splits over its values. A document booked with a distribution key on a dimension expands its amount across the key's target values at the stored percentages (six decimal places, largest-remainder rounding: the pieces always sum exactly to the booked amount).

Ad-hoc (one-document) keys are excluded by default — they are transient and system-managed, so they are noise in a catalog sync. Pass includeAdHoc=true to see them; a specific ad-hoc key is always readable by id.

Required Scope

  • dimensions-read

List distribution keys (paginated) › path Parameters

id
​string · required

The dimension category id

List distribution keys (paginated) › query Parameters

page
​number · min: 1

Page number (1-indexed)

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

Items per page

Example: 25
Default: 25
includeAdHoc
​boolean

Include ad-hoc (one-document) keys. Defaults to false: ad-hoc keys are transient and system-managed, so they are noise in a catalog sync. A specific ad-hoc key is always readable by id.

Default: false

List distribution keys (paginated) › Responses

One page of distribution keys

PublicListDistributionKeysResponse
​PublicDistributionKey[] · required

Distribution keys, ordered by name

total
​number · required

Total number of keys matching the query

Example: 3
page
​number · required

Current page number (1-indexed)

Example: 1
limit
​number · required

Maximum number of items per page

Example: 25
totalPages
​number · required

Total number of pages available

Example: 1
GET/v1/dimensions/{id}/distribution-keys
curl https://api.ledgerbee.com/api/v1/dimensions/:id/distribution-keys \ --header 'x-api-key: <api-key>'
Example Responses
{ "data": [ { "id": "id", "name": "70/30 Sales split", "isAdHoc": true, "isActive": true, "allocations": [ { "valueId": "valueId", "valueName": "Marketing", "percentage": 66.666667, "sortOrder": 0 } ] } ], "total": 3, "page": 1, "limit": 25, "totalPages": 1 }
json
application/json

Create a distribution key

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

Creates a distribution key over this dimension's values. Allocations must reference at least two distinct values of this dimension and their percentages must sum to exactly 100 (up to six decimal places per share).

Reusable vs ad-hoc

  • Reusable (default): requires a name; appears in listings and can be applied to any document.
  • Ad-hoc (isAdHoc: true): a one-document split. The name is optional — when omitted, the key names itself from its allocations (e.g. 60% Marketing / 40% Sales). Ad-hoc keys are hidden from listings by default and their lifecycle is system-managed: apply the returned id to a draft's tagIds; the key archives when that document posts, is deleted with the draft, and is swept if left orphaned.

Required Scope

  • dimensions-write

Create a distribution key › path Parameters

id
​string · required

The dimension category id

Create a distribution key › Headers

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

Optional idempotency key for safely retrying mutating requests.

Create a distribution key › Request Body

PublicCreateDistributionKey
​PublicCreateDistributionKeyAllocation[] · required

Allocations that must sum to exactly 100%. Between 2 and 100 entries.

name
​string · maxLength: 120

Display name. Required for a reusable key; omit it on an ad-hoc key, which names itself from its allocations server-side.

Example: 70/30 Sales split
isAdHoc
​boolean

True to create a one-document split. Ad-hoc keys are hidden from listings by default and their lifecycle is system-managed: archived when the document they are applied to posts, deleted with the draft that owned them, and swept if left orphaned. Reference the returned id from a draft’s tagIds to apply the split.

Default: false

Create a distribution key › Responses

Distribution key created

PublicDistributionKey
id
​string · required

Unique identifier of the distribution key

name
​string · required

Display name

Example: 70/30 Sales split
isAdHoc
​boolean · required

True for a one-document split created inline on a draft. Ad-hoc keys are excluded from listings unless includeAdHoc=true, and their lifecycle is system-managed.

isActive
​boolean · required

False once the key is archived (a posted ad-hoc key archives automatically)

​PublicDistributionKeyAllocation[] · required

The allocations, in display order. Percentages sum to exactly 100.

POST/v1/dimensions/{id}/distribution-keys
curl https://api.ledgerbee.com/api/v1/dimensions/:id/distribution-keys \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "name": "70/30 Sales split", "isAdHoc": false, "allocations": [ { "valueId": "string", "percentage": 33.333333, "sortOrder": 0 } ] }'
Example Request Body
{ "name": "70/30 Sales split", "isAdHoc": false, "allocations": [ { "valueId": "string", "percentage": 33.333333, "sortOrder": 0 } ] }
json
application/json
Example Responses
{ "id": "id", "name": "70/30 Sales split", "isAdHoc": true, "isActive": true, "allocations": [ { "valueId": "valueId", "valueName": "Marketing", "percentage": 66.666667, "sortOrder": 0 } ] }
json
application/json

Get a distribution key

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

Retrieves one distribution key with its allocations. Works for ad-hoc keys too — the id returned at creation stays readable while the key exists.

Required Scope

  • dimensions-read

Get a distribution key › path Parameters

id
​string · required

The dimension category id

keyId
​string · required

The distribution key id

Get a distribution key › Responses

The distribution key

PublicDistributionKey
id
​string · required

Unique identifier of the distribution key

name
​string · required

Display name

Example: 70/30 Sales split
isAdHoc
​boolean · required

True for a one-document split created inline on a draft. Ad-hoc keys are excluded from listings unless includeAdHoc=true, and their lifecycle is system-managed.

isActive
​boolean · required

False once the key is archived (a posted ad-hoc key archives automatically)

​PublicDistributionKeyAllocation[] · required

The allocations, in display order. Percentages sum to exactly 100.

GET/v1/dimensions/{id}/distribution-keys/{keyId}
curl https://api.ledgerbee.com/api/v1/dimensions/:id/distribution-keys/:keyId \ --header 'x-api-key: <api-key>'
Example Responses
{ "id": "id", "name": "70/30 Sales split", "isAdHoc": true, "isActive": true, "allocations": [ { "valueId": "valueId", "valueName": "Marketing", "percentage": 66.666667, "sortOrder": 0 } ] }
json
application/json

List dimension values (paginated)

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

Lists a dimension's values as a flat, paginated set, ordered by name. Each value carries its parentId, so hierarchical dimensions can be rebuilt client-side. Prefer this over the embedded values trees on GET /dimensions and GET /dimensions/{id} when a dimension holds many values — the trees ship every value in one payload.

Distribution keys never appear here — a key is a distribution over values, not a value. Manage them via GET /dimensions/{id}/distribution-keys.

Required Scope

  • dimensions-read

List dimension values (paginated) › path Parameters

id
​string · required

The dimension category id

List dimension values (paginated) › query Parameters

page
​number · min: 1

Page number (1-indexed)

Example: 1
Default: 1
limit
​number · min: 1 · max: 500

Items per page

Example: 100
Default: 100

List dimension values (paginated) › Responses

One page of dimension values

PublicListDimensionValuesResponse
​PublicDimensionValueListItem[] · required

Dimension values as a FLAT page ordered by name; use parentId to rebuild hierarchy

total
​number · required

Total number of values in this dimension

Example: 240
page
​number · required

Current page number (1-indexed)

Example: 1
limit
​number · required

Maximum number of items per page

Example: 100
totalPages
​number · required

Total number of pages available

Example: 3
GET/v1/dimensions/{id}/values
curl https://api.ledgerbee.com/api/v1/dimensions/:id/values \ --header 'x-api-key: <api-key>'
Example Responses
{ "data": [ { "id": "id", "name": "Marketing", "parentId": "parentId" } ], "total": 240, "page": 1, "limit": 100, "totalPages": 3 }
json
application/json

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" }

Required Scope

  • dimensions-write

Create a new dimension value › Headers

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

Optional idempotency key for safely retrying mutating requests.

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: 255 · 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
application/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 }

Required Scope

  • dimensions-write

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

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

Optional idempotency key for safely retrying mutating requests.

Update a dimension value › Request Body

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

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
application/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

Required Scope

  • dimensions-write

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

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

Optional idempotency key for safely retrying mutating requests.

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