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

Customers

Download schema

Customer and customer group management endpoints


List customers

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

Retrieves all customers for your company, sorted by customer number.

Pass ?customerNumber= for an exact-match lookup of a single customer by its human-readable number (useful when you only know the number shown on an invoice, not the UUID).

The unfiltered list is cached for 5 seconds; filtered lookups always read fresh data, so a just-created or just-updated customer is immediately visible via its customer number.

Required Scope

  • customers-read

List customers › query Parameters

customerNumber
​string

Optional exact-match filter on customerNumber. Tenant scoping is enforced regardless of the filter.

externalSystemId
​string

Optional exact-match filter on externalSystemId. The value is unique per company, so at most one customer can match.

​object · style: deepObject · explode: true

Exact-match metadata filters in the form metadata[key]=value. Multiple pairs combine with AND semantics — a record matches only if it carries every given key with exactly the given value. At most 10 pairs per request.

List customers › Responses

List of customers for the company matching the given filters

​CustomerResponse[]
CustomerResponse
id
​string · required

The unique identifier of the customer

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

Customer number

Example: C001
customerType
​string · enum · required

Customer type

Enum values:
BUSINESS
PRIVATE_PERSON
Example: BUSINESS
name
​string · required

Name of the customer

Example: Acme Corporation
vatZone
​string · enum · required

VAT zone classification

Enum values:
domestic
eu
abroad
domestic_without_vat
Example: domestic
customerGroupId
​string · required

Customer group ID

Example: 550e8400-e29b-41d4-a716-446655440001
isActive
​boolean · required

Whether the customer is active

Example: true
billingRelationship
​string · enum · required

Billing relationship. self = this customer is billed directly. parent_pays = the parent customer (set via parentCustomerId) is billed instead.

Enum values:
self
parent_pays
Example: self
includeChildDetailsPdf
​boolean · required

Whether to attach a zip of per-child detail PDFs when sending consolidated invoices. Only relevant for parent customers in single_invoice mode.

Example: false
customerGroupNumber
​string

Customer group number

Example: 1
customerGroupName
​string

Customer group name

Example: Domestic Customers
email
​string

Email address

Example: contact@acme.com
phone
​string

Phone number

Example: +45 12345678
address
​string

Street address

Example: 123 Main Street
city
​string

City

Example: Copenhagen
postalCode
​string

Postal code

Example: 2100
countryCode
​string

Two-letter country code (ISO 3166-1 alpha-2)

Example: DK
vatNumber
​string

VAT registration number

Example: DK12345678
website
​string

Website URL

Example: https://acme.com
externalSystemId
​string

External system identifier for tracking the customer across other systems

Example: crm-12345
creditLimit
​number

Credit limit

Example: 50000
openingBalance
​number

Opening balance in the company base currency (signed: positive = the customer owes us)

Example: 1000
paymentTerms
​number

Payment terms in days

Example: 30
paymentTermType
​string · enum

Payment term type

Enum values:
NET_DAYS
CASH
RUNNING_MONTH_PLUS_DAYS
Example: NET_DAYS
defaultCurrency
​string

Default currency code

Example: DKK
parentCustomerId
​string | null

Parent customer ID. When set, this customer is a child in a parent-child billing relationship. Set together with billingRelationship to change how this customer is billed.

Example: 550e8400-e29b-41d4-a716-446655440000
consolidationMode
​string | null · enum

Consolidation mode for a parent customer. single_invoice = all child subscriptions are consolidated onto one parent invoice on billingDay. per_child_invoice = each child receives its own invoice. Only meaningful on parent customers.

Enum values:
single_invoice
per_child_invoice
billingDay
​number | null

Day of month (1-28) when the parent consolidated invoice is generated. Required for single_invoice consolidation mode.

Example: 1
parentInvoiceTemplateId
​string | null

Parent single invoice PDF template override

​object

Key-value metadata attached to the customer

Example: {"crmSegment":"enterprise","accountOwner":"jane"}
GET/v1/customers
curl https://api.ledgerbee.com/api/v1/customers \ --header 'x-api-key: <api-key>'
Example Responses
[ { "id": "550e8400-e29b-41d4-a716-446655440000", "customerNumber": "C001", "customerType": "BUSINESS", "name": "Acme Corporation", "vatZone": "domestic", "customerGroupId": "550e8400-e29b-41d4-a716-446655440001", "customerGroupNumber": "1", "customerGroupName": "Domestic Customers", "email": "contact@acme.com", "phone": "+45 12345678", "address": "123 Main Street", "city": "Copenhagen", "postalCode": "2100", "countryCode": "DK", "vatNumber": "DK12345678", "website": "https://acme.com", "externalSystemId": "crm-12345", "creditLimit": 50000, "openingBalance": 1000, "paymentTerms": 30, "paymentTermType": "NET_DAYS", "defaultCurrency": "DKK", "isActive": true, "parentCustomerId": "550e8400-e29b-41d4-a716-446655440000", "billingRelationship": "self", "consolidationMode": "single_invoice", "billingDay": 1, "includeChildDetailsPdf": false, "parentInvoiceTemplateId": "parentInvoiceTemplateId", "metadata": { "crmSegment": "enterprise", "accountOwner": "jane" } } ]
json
application/json

Create a customer

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

Creates a customer in your company. The response contains the new id and the auto-assigned customerNumber — fetch the full record via GET /v1/customers/{customerId} if you need it.

  • customerType defaults to BUSINESS when omitted.
  • externalSystemId lets you store your own system's identifier for deduplication. It must be unique within your company — reusing one returns 409 EXTERNAL_SYSTEM_ID_ALREADY_EXISTS. Empty or whitespace-only values are treated as unset.

Required Scope

  • customers-write

Create a customer › Request Body

CreateCustomerRequest
customerType
​string · enum · required

Specifies whether the customer is a business or a private person

Enum values:
BUSINESS
PRIVATE_PERSON
Example: BUSINESS
Default: BUSINESS
customerNumber
​string · required

Unique customer number

Example: C001
name
​string · required

Customer name

Example: Acme Corporation
vatZone
​string · enum · required

VAT zone classification

Enum values:
domestic
eu
abroad
domestic_without_vat
Example: domestic
customerGroupId
​string · required

Customer group ID

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

Two-letter country code

Example: DK
defaultCurrency
​string · required

Default currency code

Example: DKK
email
​string

Email address

Example: contact@acme.com
phone
​string

Phone number

Example: +45 12345678
address
​string

Street address

Example: 123 Main Street
city
​string

City

Example: Copenhagen
postalCode
​string

Postal code

Example: 2100
vatNumber
​string

VAT registration number

Example: DK12345678
website
​string

Website URL

Example: https://acme.com
externalSystemId
​string

External system identifier for tracking the customer across other systems

Example: crm-12345
notes
​string

Additional notes

Example: Key account customer
creditLimit
​number · min: 0

Credit limit

Example: 50000
openingBalance
​number

Opening balance in the company base currency, seeding receivables that predate LedgerBee. Signed: positive = the customer owes us, negative = a credit position.

Example: 1000
paymentTerms
​number · min: 0

Payment terms in days

Example: 30
paymentTermType
​string · enum

Payment term type

Enum values:
NET_DAYS
CASH
RUNNING_MONTH_PLUS_DAYS
Example: NET_DAYS
isActive
​boolean

Whether the customer is active

Example: true
Default: true
parentCustomerId
​string | null

Parent customer ID. Set when creating this customer as a child in a parent-child billing relationship. Must be combined with billingRelationship = parent_pays to route billing to the parent. Send null to create a standalone customer.

Example: 550e8400-e29b-41d4-a716-446655440000
billingRelationship
​string · enum

Billing relationship. self (default) = this customer is billed directly. parent_pays = the parent customer (set via parentCustomerId) is billed instead.

Enum values:
self
parent_pays
consolidationMode
​string | null · enum

Consolidation mode (parent customers only). single_invoice = all child subscriptions consolidated onto one invoice on billingDay. per_child_invoice = each child receives its own invoice.

Enum values:
single_invoice
per_child_invoice
billingDay
​number | null

Day of month (1-28) for the parent consolidated invoice. Required for single_invoice consolidation.

Example: 1
includeChildDetailsPdf
​boolean

Whether to attach a zip of per-child detail PDFs when sending consolidated invoices

parentInvoiceTemplateId
​string | null

Parent single invoice PDF template override. Send null to clear.

​object

Key-value metadata to attach to the customer. At most 50 entries; keys up to 128 characters, string values up to 500 characters.

Example: {"crmSegment":"enterprise"}

Create a customer › Responses

Customer created successfully

CreateCustomerResponse
id
​string · required

The unique identifier of the created customer

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

Customer number

Example: C001
POST/v1/customers
curl https://api.ledgerbee.com/api/v1/customers \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "customerType": "BUSINESS", "customerNumber": "C001", "name": "Acme Corporation", "vatZone": "domestic", "customerGroupId": "550e8400-e29b-41d4-a716-446655440001", "email": "contact@acme.com", "phone": "+45 12345678", "address": "123 Main Street", "city": "Copenhagen", "postalCode": "2100", "countryCode": "DK", "vatNumber": "DK12345678", "website": "https://acme.com", "externalSystemId": "crm-12345", "notes": "Key account customer", "creditLimit": 50000, "openingBalance": 1000, "paymentTerms": 30, "paymentTermType": "NET_DAYS", "defaultCurrency": "DKK", "isActive": true, "parentCustomerId": "550e8400-e29b-41d4-a716-446655440000", "billingRelationship": "self", "consolidationMode": "single_invoice", "billingDay": 1, "includeChildDetailsPdf": true, "parentInvoiceTemplateId": "parentInvoiceTemplateId", "metadata": { "crmSegment": "enterprise" } }'
Example Request Body
{ "customerType": "BUSINESS", "customerNumber": "C001", "name": "Acme Corporation", "vatZone": "domestic", "customerGroupId": "550e8400-e29b-41d4-a716-446655440001", "email": "contact@acme.com", "phone": "+45 12345678", "address": "123 Main Street", "city": "Copenhagen", "postalCode": "2100", "countryCode": "DK", "vatNumber": "DK12345678", "website": "https://acme.com", "externalSystemId": "crm-12345", "notes": "Key account customer", "creditLimit": 50000, "openingBalance": 1000, "paymentTerms": 30, "paymentTermType": "NET_DAYS", "defaultCurrency": "DKK", "isActive": true, "parentCustomerId": "550e8400-e29b-41d4-a716-446655440000", "billingRelationship": "self", "consolidationMode": "single_invoice", "billingDay": 1, "includeChildDetailsPdf": true, "parentInvoiceTemplateId": "parentInvoiceTemplateId", "metadata": { "crmSegment": "enterprise" } }
json
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "customerNumber": "C001" }
json
application/json

Get a single customer

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

Retrieves a customer by its unique identifier. Returns 404 when the customer does not exist (or belongs to another company).

Required Scope

  • customers-read

Get a single customer › path Parameters

customerId
​string · required

Customer ID

Get a single customer › Responses

Customer details

CustomerResponse
id
​string · required

The unique identifier of the customer

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

Customer number

Example: C001
customerType
​string · enum · required

Customer type

Enum values:
BUSINESS
PRIVATE_PERSON
Example: BUSINESS
name
​string · required

Name of the customer

Example: Acme Corporation
vatZone
​string · enum · required

VAT zone classification

Enum values:
domestic
eu
abroad
domestic_without_vat
Example: domestic
customerGroupId
​string · required

Customer group ID

Example: 550e8400-e29b-41d4-a716-446655440001
isActive
​boolean · required

Whether the customer is active

Example: true
billingRelationship
​string · enum · required

Billing relationship. self = this customer is billed directly. parent_pays = the parent customer (set via parentCustomerId) is billed instead.

Enum values:
self
parent_pays
Example: self
includeChildDetailsPdf
​boolean · required

Whether to attach a zip of per-child detail PDFs when sending consolidated invoices. Only relevant for parent customers in single_invoice mode.

Example: false
customerGroupNumber
​string

Customer group number

Example: 1
customerGroupName
​string

Customer group name

Example: Domestic Customers
email
​string

Email address

Example: contact@acme.com
phone
​string

Phone number

Example: +45 12345678
address
​string

Street address

Example: 123 Main Street
city
​string

City

Example: Copenhagen
postalCode
​string

Postal code

Example: 2100
countryCode
​string

Two-letter country code (ISO 3166-1 alpha-2)

Example: DK
vatNumber
​string

VAT registration number

Example: DK12345678
website
​string

Website URL

Example: https://acme.com
externalSystemId
​string

External system identifier for tracking the customer across other systems

Example: crm-12345
creditLimit
​number

Credit limit

Example: 50000
openingBalance
​number

Opening balance in the company base currency (signed: positive = the customer owes us)

Example: 1000
paymentTerms
​number

Payment terms in days

Example: 30
paymentTermType
​string · enum

Payment term type

Enum values:
NET_DAYS
CASH
RUNNING_MONTH_PLUS_DAYS
Example: NET_DAYS
defaultCurrency
​string

Default currency code

Example: DKK
parentCustomerId
​string | null

Parent customer ID. When set, this customer is a child in a parent-child billing relationship. Set together with billingRelationship to change how this customer is billed.

Example: 550e8400-e29b-41d4-a716-446655440000
consolidationMode
​string | null · enum

Consolidation mode for a parent customer. single_invoice = all child subscriptions are consolidated onto one parent invoice on billingDay. per_child_invoice = each child receives its own invoice. Only meaningful on parent customers.

Enum values:
single_invoice
per_child_invoice
billingDay
​number | null

Day of month (1-28) when the parent consolidated invoice is generated. Required for single_invoice consolidation mode.

Example: 1
parentInvoiceTemplateId
​string | null

Parent single invoice PDF template override

​object

Key-value metadata attached to the customer

Example: {"crmSegment":"enterprise","accountOwner":"jane"}
GET/v1/customers/{customerId}
curl https://api.ledgerbee.com/api/v1/customers/:customerId \ --header 'x-api-key: <api-key>'
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "customerNumber": "C001", "customerType": "BUSINESS", "name": "Acme Corporation", "vatZone": "domestic", "customerGroupId": "550e8400-e29b-41d4-a716-446655440001", "customerGroupNumber": "1", "customerGroupName": "Domestic Customers", "email": "contact@acme.com", "phone": "+45 12345678", "address": "123 Main Street", "city": "Copenhagen", "postalCode": "2100", "countryCode": "DK", "vatNumber": "DK12345678", "website": "https://acme.com", "externalSystemId": "crm-12345", "creditLimit": 50000, "openingBalance": 1000, "paymentTerms": 30, "paymentTermType": "NET_DAYS", "defaultCurrency": "DKK", "isActive": true, "parentCustomerId": "550e8400-e29b-41d4-a716-446655440000", "billingRelationship": "self", "consolidationMode": "single_invoice", "billingDay": 1, "includeChildDetailsPdf": false, "parentInvoiceTemplateId": "parentInvoiceTemplateId", "metadata": { "crmSegment": "enterprise", "accountOwner": "jane" } }
json
application/json

Update a customer

PATCH
https://api.ledgerbee.com/api
/v1/customers/{customerId}
x-api-key (header)
or
OAuth 2.0

Partially updates a customer — only the fields you send are changed; send null to clear a clearable field. Returns the full updated customer.

externalSystemId follows the same rules as on create: unique within your company (409 EXTERNAL_SYSTEM_ID_ALREADY_EXISTS on conflict), empty values treated as unset.

Required Scope

  • customers-write

Update a customer › path Parameters

customerId
​string · required

Customer ID

Update a customer › Request Body

UpdateCustomerRequest
customerType
​string · enum

Customer type

Enum values:
BUSINESS
PRIVATE_PERSON
Example: BUSINESS
customerNumber
​string

Unique customer number

Example: C001
name
​string

Customer name

Example: Acme Corporation
vatZone
​string · enum

VAT zone classification

Enum values:
domestic
eu
abroad
domestic_without_vat
Example: domestic
customerGroupId
​string

Customer group ID

Example: 550e8400-e29b-41d4-a716-446655440001
email
​string | null

Email address. Send null or empty string to clear.

Example: contact@acme.com
phone
​string

Phone number

Example: +45 12345678
address
​string

Street address

Example: 123 Main Street
city
​string

City

Example: Copenhagen
postalCode
​string

Postal code

Example: 2100
countryCode
​string

Two-letter country code

Example: DK
vatNumber
​string

VAT registration number

Example: DK12345678
website
​string

Website URL

Example: https://acme.com
externalSystemId
​string

External system identifier for tracking the customer across other systems

Example: crm-12345
notes
​string

Additional notes

Example: Key account customer
creditLimit
​number · min: 0

Credit limit

Example: 50000
openingBalance
​number

Opening balance in the company base currency, seeding receivables that predate LedgerBee. Signed: positive = the customer owes us, negative = a credit position.

Example: 1000
paymentTerms
​number · min: 0

Payment terms in days

Example: 30
paymentTermType
​string · enum

Payment term type

Enum values:
NET_DAYS
CASH
RUNNING_MONTH_PLUS_DAYS
Example: NET_DAYS
defaultCurrency
​string

Default currency code

Example: DKK
isActive
​boolean

Whether the customer is active

Example: true
parentCustomerId
​string | null

Parent customer ID. Send null to detach from parent. Changing this field on a customer with active subscriptions will transition those subscriptions to the parent's billing day with a clean cut at today's date: advance-billed subscriptions receive a credit note for the remaining days of the current period, and arrears-billed subscriptions are invoiced up to the transition date. When transitioning, subscriptionTransitions must list every active subscription on this customer as explicit acknowledgement that they will be migrated.

Example: 550e8400-e29b-41d4-a716-446655440000
billingRelationship
​string · enum

Billing relationship. Change to parent_pays together with parentCustomerId to route billing to the parent.

Enum values:
self
parent_pays
consolidationMode
​string | null · enum

Consolidation mode (parent customers only). Send null to clear.

Enum values:
single_invoice
per_child_invoice
billingDay
​number | null

Day of month (1-28) for the parent consolidated invoice. Send null to clear.

Example: 1
includeChildDetailsPdf
​boolean

Whether to attach a zip of per-child detail PDFs when sending consolidated invoices

parentInvoiceTemplateId
​string | null

Parent single invoice PDF template override. Send null to clear.

​SubscriptionTransitionItem[]

Subscription transitions — required when changing parentCustomerId, billingRelationship, or consolidationMode on a customer with active subscriptions. Must list every active subscription on this customer as explicit acknowledgement that each one will be migrated to the new billing arrangement with a clean cut at today's date.

​object

Key-value metadata. When provided, REPLACES the customer metadata wholesale — send the complete desired map; an empty object clears all entries. Omit the field to leave metadata unchanged. At most 50 entries; keys up to 128 characters, string values up to 500 characters.

Example: {"crmSegment":"enterprise"}

Update a customer › Responses

Customer updated successfully

CustomerResponse
id
​string · required

The unique identifier of the customer

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

Customer number

Example: C001
customerType
​string · enum · required

Customer type

Enum values:
BUSINESS
PRIVATE_PERSON
Example: BUSINESS
name
​string · required

Name of the customer

Example: Acme Corporation
vatZone
​string · enum · required

VAT zone classification

Enum values:
domestic
eu
abroad
domestic_without_vat
Example: domestic
customerGroupId
​string · required

Customer group ID

Example: 550e8400-e29b-41d4-a716-446655440001
isActive
​boolean · required

Whether the customer is active

Example: true
billingRelationship
​string · enum · required

Billing relationship. self = this customer is billed directly. parent_pays = the parent customer (set via parentCustomerId) is billed instead.

Enum values:
self
parent_pays
Example: self
includeChildDetailsPdf
​boolean · required

Whether to attach a zip of per-child detail PDFs when sending consolidated invoices. Only relevant for parent customers in single_invoice mode.

Example: false
customerGroupNumber
​string

Customer group number

Example: 1
customerGroupName
​string

Customer group name

Example: Domestic Customers
email
​string

Email address

Example: contact@acme.com
phone
​string

Phone number

Example: +45 12345678
address
​string

Street address

Example: 123 Main Street
city
​string

City

Example: Copenhagen
postalCode
​string

Postal code

Example: 2100
countryCode
​string

Two-letter country code (ISO 3166-1 alpha-2)

Example: DK
vatNumber
​string

VAT registration number

Example: DK12345678
website
​string

Website URL

Example: https://acme.com
externalSystemId
​string

External system identifier for tracking the customer across other systems

Example: crm-12345
creditLimit
​number

Credit limit

Example: 50000
openingBalance
​number

Opening balance in the company base currency (signed: positive = the customer owes us)

Example: 1000
paymentTerms
​number

Payment terms in days

Example: 30
paymentTermType
​string · enum

Payment term type

Enum values:
NET_DAYS
CASH
RUNNING_MONTH_PLUS_DAYS
Example: NET_DAYS
defaultCurrency
​string

Default currency code

Example: DKK
parentCustomerId
​string | null

Parent customer ID. When set, this customer is a child in a parent-child billing relationship. Set together with billingRelationship to change how this customer is billed.

Example: 550e8400-e29b-41d4-a716-446655440000
consolidationMode
​string | null · enum

Consolidation mode for a parent customer. single_invoice = all child subscriptions are consolidated onto one parent invoice on billingDay. per_child_invoice = each child receives its own invoice. Only meaningful on parent customers.

Enum values:
single_invoice
per_child_invoice
billingDay
​number | null

Day of month (1-28) when the parent consolidated invoice is generated. Required for single_invoice consolidation mode.

Example: 1
parentInvoiceTemplateId
​string | null

Parent single invoice PDF template override

​object

Key-value metadata attached to the customer

Example: {"crmSegment":"enterprise","accountOwner":"jane"}
PATCH/v1/customers/{customerId}
curl https://api.ledgerbee.com/api/v1/customers/:customerId \ --request PATCH \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "customerType": "BUSINESS", "customerNumber": "C001", "name": "Acme Corporation", "vatZone": "domestic", "customerGroupId": "550e8400-e29b-41d4-a716-446655440001", "email": "contact@acme.com", "phone": "+45 12345678", "address": "123 Main Street", "city": "Copenhagen", "postalCode": "2100", "countryCode": "DK", "vatNumber": "DK12345678", "website": "https://acme.com", "externalSystemId": "crm-12345", "notes": "Key account customer", "creditLimit": 50000, "openingBalance": 1000, "paymentTerms": 30, "paymentTermType": "NET_DAYS", "defaultCurrency": "DKK", "isActive": true, "parentCustomerId": "550e8400-e29b-41d4-a716-446655440000", "billingRelationship": "self", "consolidationMode": "single_invoice", "billingDay": 1, "includeChildDetailsPdf": true, "parentInvoiceTemplateId": "parentInvoiceTemplateId", "subscriptionTransitions": [ { "customerSubscriptionId": "550e8400-e29b-41d4-a716-446655440000" } ], "metadata": { "crmSegment": "enterprise" } }'
Example Request Body
{ "customerType": "BUSINESS", "customerNumber": "C001", "name": "Acme Corporation", "vatZone": "domestic", "customerGroupId": "550e8400-e29b-41d4-a716-446655440001", "email": "contact@acme.com", "phone": "+45 12345678", "address": "123 Main Street", "city": "Copenhagen", "postalCode": "2100", "countryCode": "DK", "vatNumber": "DK12345678", "website": "https://acme.com", "externalSystemId": "crm-12345", "notes": "Key account customer", "creditLimit": 50000, "openingBalance": 1000, "paymentTerms": 30, "paymentTermType": "NET_DAYS", "defaultCurrency": "DKK", "isActive": true, "parentCustomerId": "550e8400-e29b-41d4-a716-446655440000", "billingRelationship": "self", "consolidationMode": "single_invoice", "billingDay": 1, "includeChildDetailsPdf": true, "parentInvoiceTemplateId": "parentInvoiceTemplateId", "subscriptionTransitions": [ { "customerSubscriptionId": "550e8400-e29b-41d4-a716-446655440000" } ], "metadata": { "crmSegment": "enterprise" } }
json
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "customerNumber": "C001", "customerType": "BUSINESS", "name": "Acme Corporation", "vatZone": "domestic", "customerGroupId": "550e8400-e29b-41d4-a716-446655440001", "customerGroupNumber": "1", "customerGroupName": "Domestic Customers", "email": "contact@acme.com", "phone": "+45 12345678", "address": "123 Main Street", "city": "Copenhagen", "postalCode": "2100", "countryCode": "DK", "vatNumber": "DK12345678", "website": "https://acme.com", "externalSystemId": "crm-12345", "creditLimit": 50000, "openingBalance": 1000, "paymentTerms": 30, "paymentTermType": "NET_DAYS", "defaultCurrency": "DKK", "isActive": true, "parentCustomerId": "550e8400-e29b-41d4-a716-446655440000", "billingRelationship": "self", "consolidationMode": "single_invoice", "billingDay": 1, "includeChildDetailsPdf": false, "parentInvoiceTemplateId": "parentInvoiceTemplateId", "metadata": { "crmSegment": "enterprise", "accountOwner": "jane" } }
json
application/json

List a customer's contacts

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

Retrieves the contact persons registered on a customer. The customer's default contact is returned first, then the rest alphabetically.

Required Scope

  • customers-read

List a customer's contacts › path Parameters

customerId
​string · required

Customer ID

List a customer's contacts › Responses

List of contacts for a customer

​CustomerContactResponse[]
CustomerContactResponse
id
​string · required

The unique identifier of the contact

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

Name of the contact

Example: John Doe
isDefaultForCustomer
​boolean · required

Whether this is the default contact for the customer

Example: true
email
​string

Email address

Example: john.doe@acme.com
phone
​string

Phone number

Example: +45 12345678
GET/v1/customers/{customerId}/contacts
curl https://api.ledgerbee.com/api/v1/customers/:customerId/contacts \ --header 'x-api-key: <api-key>'
Example Responses
[ { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "John Doe", "email": "john.doe@acme.com", "phone": "+45 12345678", "isDefaultForCustomer": true } ]
json
application/json

List a customer's departments

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

Retrieves the departments of a customer — sub-units with their own address, EAN number (for e-invoicing), and purchase-order number, typically used to route invoices within larger organizations.

The default department is returned first, then the rest alphabetically.

Required Scope

  • customers-read

List a customer's departments › path Parameters

customerId
​string · required

Customer ID

List a customer's departments › Responses

List of departments for a customer

​CustomerDepartmentResponse[]
CustomerDepartmentResponse
id
​string · required

The unique identifier of the department

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

Name of the department

Example: Headquarters
isDefault
​boolean · required

Whether this is the default department for the customer

Example: true
isActive
​boolean · required

Whether the department is active

Example: true
poNumber
​string

Purchase order number

Example: PO-12345
eanNumber
​string

EAN number for e-invoicing

Example: 5790000000000
address
​string

Street address

Example: 123 Main Street
city
​string

City

Example: Copenhagen
postalCode
​string

Postal code

Example: 2100
countryCode
​string

Two-letter country code (ISO 3166-1 alpha-2)

Example: DK
GET/v1/customers/{customerId}/departments
curl https://api.ledgerbee.com/api/v1/customers/:customerId/departments \ --header 'x-api-key: <api-key>'
Example Responses
[ { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Headquarters", "isDefault": true, "isActive": true, "poNumber": "PO-12345", "eanNumber": "5790000000000", "address": "123 Main Street", "city": "Copenhagen", "postalCode": "2100", "countryCode": "DK" } ]
json
application/json

List customer groups

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

Retrieves all customer groups for your company, sorted by group number. Groups carry a discount percentage and the ledger account customers in the group post to — assign a customer to a group via the customerGroupId field when creating or updating the customer.

Results are cached for 5 seconds.

Required Scope

  • customers-read

List customer groups › query Parameters

​object · style: deepObject · explode: true

Exact-match metadata filters in the form metadata[key]=value. Multiple pairs combine with AND semantics — a record matches only if it carries every given key with exactly the given value. At most 10 pairs per request.

List customer groups › Responses

List of customer groups for the company matching the given filters

​CustomerGroupResponse[]
CustomerGroupResponse
id
​string · required

The unique identifier of the customer group

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

Customer group number

Example: 1
name
​string · required

Name of the customer group

Example: Domestic Customers
discount
​number · required

Discount percentage for this customer group

Example: 10
accountId
​string · required

The ledger account ID associated with this customer group

Example: 550e8400-e29b-41d4-a716-446655440001
accountNumber
​number

The ledger account number associated with this customer group

Example: 1100
accountName
​string

The ledger account name associated with this customer group

Example: Trade Debtors
​object

Key-value metadata attached to the customer group

Example: {"segment":"enterprise"}
GET/v1/customers/groups
curl https://api.ledgerbee.com/api/v1/customers/groups \ --header 'x-api-key: <api-key>'
Example Responses
[ { "id": "550e8400-e29b-41d4-a716-446655440000", "number": "1", "name": "Domestic Customers", "discount": 10, "accountId": "550e8400-e29b-41d4-a716-446655440001", "accountNumber": 1100, "accountName": "Trade Debtors", "metadata": { "segment": "enterprise" } } ]
json
application/json

CompanyDimensions