Customers
Customer and customer group management endpoints
List customers
Credential: a company's API key or OAuth token.
Retrieves all customers for your company, sorted by customer number.
Pass ?search= to find customers by what was typed, the way the Customers
list in LedgerBee does: ?search=jens hansen&limit=20. 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), and ?vatNumber=, ?email= or ?isActive= to
narrow by those exactly.
The unfiltered list is cached for 5 seconds; a search or a filter always reads fresh data, so a just-created or just-updated customer is immediately visible through it.
Searching
search is split on spaces, and every word must appear, ignoring upper and
lower case, in at least one of the customer's name, customerNumber,
vatNumber, email, externalSystemId and phone, or in the name of
its customer group. A word matches anywhere in a value, so 5678 finds the
VAT number DK12345678, and %, _ and [ match those characters.
phone is matched with its spaces and dashes removed, so 12345678 finds
the phone number +45 12 34 56 78, and so does 12 34 56 78. Only
the first ten different words count. Results keep customer-number order; they
are not ranked by how well they match.
A search with at least one word answers one page, as if limit were sent, so
a short search on a large customer list cannot return most of it at once. An
empty search, or one of only spaces, is no search. A client that searches as
the user types should send the search about 250 ms after the last keystroke
rather than on every one.
Pagination
The list is returned in full, as an array, unless you send cursor,
page or limit. Sending any of them switches the response to a
paginated object (data, total, page, limit, totalPages,
nextCursor, hasMore); page and limit take their defaults when
omitted. A paginated read is never cached.
To walk the whole list, send limit and then pass each response's
nextCursor back as cursor, with the same filters, until hasMore is
false. Paging by page is deprecated, and page cannot be sent with
cursor (400 PAGINATION_CURSOR_WITH_PAGE). A cursor replayed with other filters is
refused with 400 PAGINATION_INVALID_CURSOR. From
2026-12-31, a page past the first of a list with more
than 10,000 items is refused with
400 PAGINATION_OFFSET_TOO_DEEP.
On this list, a search with at least one word also switches the response
to the paginated object.
Required Scope
customers-read
query Parameters
customerNumberOptional exact-match filter on customerNumber. Tenant scoping is enforced regardless of the filter.
externalSystemIdOptional exact-match filter on externalSystemId. The value is unique per company, so at most one customer can match.
parentCustomerIdOptional filter to the child customers of one parent: every customer whose parentCustomerId is this id.
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.
isActivetrue for active customers only, false for deactivated ones only. Any other value is refused.
emailOptional exact-match filter on email, ignoring upper and lower case and any whitespace around it.
vatNumberOptional exact-match filter on vatNumber. Whitespace, dots, dashes, slashes and upper or lower case are ignored, and a Danish number matches with or without its DK prefix, so DK12345678 and 12 34 56 78 find the same customers.
searchEvery word must appear, ignoring case, in the name, customerNumber, vatNumber, email, externalSystemId or phone, or in the customer group name; see the Searching section of this operation. Sending at least one word switches the response to one page.
cursorOpaque cursor from the previous response's nextCursor. Returns the items after it, in the same order. Send the same filters as the request that produced it, and do not send page. The preferred way to page through the list. Sending cursor, page or limit switches the response from the full array to a paginated object.
pageDeprecated: page with cursor instead. Page number (1-indexed). Sending cursor, page or limit switches the response from the full array to a paginated object. When only limit or cursor is sent, page is 1.
limitNumber of items per page. Sending cursor, page or limit switches the response from the full array to a paginated object. When limit is omitted from a paginated request, it is 25.
List customers › Responses
The full list of customers matching the given filters, or one page of it when cursor, page, limit or a search with at least one word is sent
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = array | |
| type = object · requires: data, total, page +4 more |
idThe unique identifier of the customer
customerNumberCustomer number
customerTypeCustomer type
nameName of the customer
vatZoneVAT zone classification
customerGroupIdCustomer group ID
isActiveWhether the customer is active
billingRelationshipBilling relationship. self = this customer is billed directly. parent_pays = the parent customer (set via parentCustomerId) is billed instead.
includeChildDetailsPdfWhether to attach a zip of per-child detail PDFs when sending consolidated invoices. Only relevant for parent customers in single_invoice mode.
selfServiceDetailsEnabledWhether this customer's portal users may fill in their own billing details (VAT number, street, postal code, city), both on the portal's Company settings page and during checkout, instead of only confirming a read-only copy of the record. Country and customer type stay operator-owned either way, which is what keeps them inside the VAT regime the operator assigned.
customerGroupNumberCustomer group number
customerGroupNameCustomer group name
emailEmail address
phonePhone number
addressStreet address
cityCity
postalCodePostal code
countryCodeTwo-letter country code (ISO 3166-1 alpha-2)
vatNumberVAT registration number
websiteWebsite URL
externalSystemIdExternal system identifier for tracking the customer across other systems
eanNumberEAN number for e-invoicing. Absent when the customer has none.
creditLimitCredit limit
openingBalanceOpening balance in the company base currency (signed: positive = the customer owes us)
paymentTermsPayment terms in days
paymentTermTypePayment term type
defaultCurrencyDefault currency code
parentCustomerIdParent 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.
consolidationModeConsolidation 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.
billingDayDay of month (1-28) when the parent consolidated invoice is generated. Required for single_invoice consolidation mode.
parentInvoiceTemplateIdParent single invoice PDF template override
Key-value metadata attached to the customer
Create a customer
Credential: a company's API key or OAuth token.
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.
customerTypedefaults toBUSINESSwhen omitted.externalSystemIdlets you store your own system's identifier for deduplication. It must be unique within your company — reusing one returns409 EXTERNAL_SYSTEM_ID_ALREADY_EXISTS. Empty or whitespace-only values are treated as unset.
Required Scope
customers-write
Headers
x-api-idempotency-keyOptional idempotency key for safely retrying mutating requests.
Create a customer › Request Body
customerTypeSpecifies whether the customer is a business or a private person
nameCustomer name
vatZoneVAT zone classification
customerGroupIdCustomer group ID
countryCodeTwo-letter country code
defaultCurrency^[A-Za-z]{3}$ · requiredThe currency this customer is invoiced in, ISO 4217 alpha-3.
customerNumberUnique customer number. Omit it, or send an empty value, to have the next number assigned from the company customer sequence; the assigned number comes back on the response.
emailEmail address
phonePhone number
addressStreet address
cityCity
postalCodePostal code
vatNumberVAT registration number
websiteWebsite URL
externalSystemIdExternal system identifier for tracking the customer across other systems
eanNumberEAN number for e-invoicing. Digits only.
notesAdditional notes
creditLimitCredit limit
openingBalanceOpening balance in the company base currency, seeding receivables that predate LedgerBee. Signed: positive = the customer owes us, negative = a credit position.
paymentTermsPayment terms in days
paymentTermTypePayment term type
isActiveWhether the customer is active
parentCustomerIdParent 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.
billingRelationshipBilling relationship. self (default) = this customer is billed directly. parent_pays = the parent customer (set via parentCustomerId) is billed instead.
consolidationModeConsolidation mode (parent customers only). single_invoice = all child subscriptions consolidated onto one invoice on billingDay. per_child_invoice = each child receives its own invoice.
billingDayDay of month (1-28) for the parent consolidated invoice. Required for single_invoice consolidation.
includeChildDetailsPdfWhether to attach a zip of per-child detail PDFs when sending consolidated invoices
selfServiceDetailsEnabledWhether this customer's portal users may fill in their own billing details (VAT number, street, postal code, city), both on the portal's Company settings page and during checkout, instead of only confirming a read-only copy of the record. Country and customer type stay operator-owned either way, which is what keeps them inside the VAT regime the operator assigned.
parentInvoiceTemplateIdParent single invoice PDF template override. Send null to clear.
Key-value metadata to attach to the customer. At most 50 entries; keys up to 128 characters, string values up to 500 characters.
Create a customer › Responses
Customer created successfully
idThe unique identifier of the created customer
customerNumberCustomer number
Get a customer
Credential: a company's API key or OAuth token.
Retrieves a customer by its unique identifier. Returns 404 when the
customer does not exist (or belongs to another company).
Required Scope
customers-read
path Parameters
customerIdCustomer ID
Get a customer › Responses
Customer details
idThe unique identifier of the customer
customerNumberCustomer number
customerTypeCustomer type
nameName of the customer
vatZoneVAT zone classification
customerGroupIdCustomer group ID
isActiveWhether the customer is active
billingRelationshipBilling relationship. self = this customer is billed directly. parent_pays = the parent customer (set via parentCustomerId) is billed instead.
includeChildDetailsPdfWhether to attach a zip of per-child detail PDFs when sending consolidated invoices. Only relevant for parent customers in single_invoice mode.
selfServiceDetailsEnabledWhether this customer's portal users may fill in their own billing details (VAT number, street, postal code, city), both on the portal's Company settings page and during checkout, instead of only confirming a read-only copy of the record. Country and customer type stay operator-owned either way, which is what keeps them inside the VAT regime the operator assigned.
customerGroupNumberCustomer group number
customerGroupNameCustomer group name
emailEmail address
phonePhone number
addressStreet address
cityCity
postalCodePostal code
countryCodeTwo-letter country code (ISO 3166-1 alpha-2)
vatNumberVAT registration number
websiteWebsite URL
externalSystemIdExternal system identifier for tracking the customer across other systems
eanNumberEAN number for e-invoicing. Absent when the customer has none.
creditLimitCredit limit
openingBalanceOpening balance in the company base currency (signed: positive = the customer owes us)
paymentTermsPayment terms in days
paymentTermTypePayment term type
defaultCurrencyDefault currency code
parentCustomerIdParent 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.
consolidationModeConsolidation 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.
billingDayDay of month (1-28) when the parent consolidated invoice is generated. Required for single_invoice consolidation mode.
parentInvoiceTemplateIdParent single invoice PDF template override
Key-value metadata attached to the customer
Delete a customer
Credential: a company's API key or OAuth token.
Deletes a customer, following the same rules as deleting one in LedgerBee.
- A customer with no bookings, invoices or subscriptions is deleted, together
with its metadata. The response says
result: DELETED. - A customer with any of those is not deleted. It is deactivated instead, so
its history stays intact: it remains readable through
GET /v1/customers/{customerId}withisActive: false, and keeps its metadata. The response saysresult: DEACTIVATED.
Either way, the customer's sub-customers are detached from it and become
self-billing (parentCustomerId: null, billingRelationship: SELF).
A parent customer is refused with 400 and the code
CUSTOMER_CANNOT_DELETE_PARENT_CHILD_NO_DELIVERY when a sub-customer billed
through it (billingRelationship: PARENT_PAYS) has an active subscription and
no way to receive its own documents. details.childCustomerId names that
sub-customer. Give it an email address (or, where your company sends
e-invoices, a number it can receive them on), then delete again.
Returns 404 with the code CUSTOMER_NOT_FOUND when the customer does not
exist in your company.
Deletes in one company run one at a time, so calls sent in parallel wait for
each other. A delete that waits more than 30 seconds is refused with 409 and
the code CUSTOMER_DELETE_BUSY. Nothing is deleted, so send it again.
Required Scope
customers-write
path Parameters
customerIdCustomer ID
Headers
x-api-idempotency-keyOptional idempotency key for safely retrying mutating requests.
Delete a customer › Responses
Customer deleted or deactivated
idThe unique identifier of the customer
customerNumberCustomer number
resultDELETED when the customer had no history and is gone. DEACTIVATED when bookings, invoices or subscriptions kept it: it stays readable with isActive: false, so its history is intact.
Update a customer
Credential: a company's API key or OAuth token.
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
path Parameters
customerIdCustomer ID
Headers
x-api-idempotency-keyOptional idempotency key for safely retrying mutating requests.
Update a customer › Request Body
customerTypeCustomer type
customerNumberUnique customer number
nameCustomer name
vatZoneVAT zone classification
customerGroupIdCustomer group ID
emailEmail address. Send null or empty string to clear.
phonePhone number
addressStreet address
cityCity
postalCodePostal code
countryCodeTwo-letter country code
vatNumberVAT registration number
websiteWebsite URL
externalSystemIdExternal system identifier for tracking the customer across other systems
eanNumberEAN number for e-invoicing. Digits only. Send null or empty string to clear.
notesAdditional notes
creditLimitCredit limit
openingBalanceOpening balance in the company base currency, seeding receivables that predate LedgerBee. Signed: positive = the customer owes us, negative = a credit position.
paymentTermsPayment terms in days
paymentTermTypePayment term type
defaultCurrency^[A-Za-z]{3}$The currency this customer is invoiced in, ISO 4217 alpha-3. Omit it, or send a blank one, to leave the stored currency alone.
isActiveWhether the customer is active
parentCustomerIdParent 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.
billingRelationshipBilling relationship. Change to parent_pays together with parentCustomerId to route billing to the parent.
consolidationModeConsolidation mode (parent customers only). Send null to clear.
billingDayDay of month (1-28) for the parent consolidated invoice. Send null to clear.
includeChildDetailsPdfWhether to attach a zip of per-child detail PDFs when sending consolidated invoices
selfServiceDetailsEnabledWhether this customer's portal users may fill in their own billing details (VAT number, street, postal code, city), both on the portal's Company settings page and during checkout, instead of only confirming a read-only copy of the record. Country and customer type stay operator-owned either way, which is what keeps them inside the VAT regime the operator assigned.
parentInvoiceTemplateIdParent single invoice PDF template override. Send null to clear.
Subscription transitions — required when changing parentCustomerId, billingRelationship, or consolidationMode on a customer with active subscriptions, and when changing billingDay or consolidationMode on a single_invoice parent (then it must cover every child customer's subscriptions). Lists every active subscription as explicit acknowledgement that each one is migrated to the new billing arrangement with a clean cut at today's date. Entries for subscriptions that need no transition are accepted and ignored.
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.
Update a customer › Responses
Customer updated successfully
idThe unique identifier of the customer
customerNumberCustomer number
customerTypeCustomer type
nameName of the customer
vatZoneVAT zone classification
customerGroupIdCustomer group ID
isActiveWhether the customer is active
billingRelationshipBilling relationship. self = this customer is billed directly. parent_pays = the parent customer (set via parentCustomerId) is billed instead.
includeChildDetailsPdfWhether to attach a zip of per-child detail PDFs when sending consolidated invoices. Only relevant for parent customers in single_invoice mode.
selfServiceDetailsEnabledWhether this customer's portal users may fill in their own billing details (VAT number, street, postal code, city), both on the portal's Company settings page and during checkout, instead of only confirming a read-only copy of the record. Country and customer type stay operator-owned either way, which is what keeps them inside the VAT regime the operator assigned.
customerGroupNumberCustomer group number
customerGroupNameCustomer group name
emailEmail address
phonePhone number
addressStreet address
cityCity
postalCodePostal code
countryCodeTwo-letter country code (ISO 3166-1 alpha-2)
vatNumberVAT registration number
websiteWebsite URL
externalSystemIdExternal system identifier for tracking the customer across other systems
eanNumberEAN number for e-invoicing. Absent when the customer has none.
creditLimitCredit limit
openingBalanceOpening balance in the company base currency (signed: positive = the customer owes us)
paymentTermsPayment terms in days
paymentTermTypePayment term type
defaultCurrencyDefault currency code
parentCustomerIdParent 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.
consolidationModeConsolidation 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.
billingDayDay of month (1-28) when the parent consolidated invoice is generated. Required for single_invoice consolidation mode.
parentInvoiceTemplateIdParent single invoice PDF template override
Key-value metadata attached to the customer
List a customer's contacts
Credential: a company's API key or OAuth token.
Retrieves the contact persons registered on a customer. The customer's default contact is returned first, then the rest alphabetically.
Required Scope
customers-read
path Parameters
customerIdCustomer ID
List a customer's contacts › Responses
List of contacts for a customer
idThe unique identifier of the contact
nameName of the contact
isDefaultForCustomerWhether this is the default contact for the customer
emailEmail address
phonePhone number
List a customer's departments
Credential: a company's API key or OAuth token.
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
path Parameters
customerIdCustomer ID
List a customer's departments › Responses
List of departments for a customer
idThe unique identifier of the department
nameName of the department
isDefaultWhether this is the default department for the customer
isActiveWhether the department is active
poNumberPurchase order number
eanNumberEAN number for e-invoicing
addressStreet address
cityCity
postalCodePostal code
countryCodeTwo-letter country code (ISO 3166-1 alpha-2)
List customer groups
Credential: a company's API key or OAuth token.
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— the full group configuration, orcheckout— the partner checkout surface requires acustomerGroupIdon every session, so a checkout-scoped key can discover the groups without a customer-data grant. With ONLY thecheckoutscope, each entry is slimmed toid,numberandname— the tenant's accounting configuration (ledger account wiring, metadata) stays behindcustomers-read.
query Parameters
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
idThe unique identifier of the customer group
numberCustomer group number
nameName of the customer group
accountIdThe ledger account ID associated with this customer group. Present with the customers-read scope; omitted for checkout-only keys.
accountNumberThe ledger account number associated with this customer group
accountNameThe ledger account name associated with this customer group
Key-value metadata attached to the customer group
discountDeprecated - always 0. No pricing path applies it. Present with the customers-read scope; omitted for checkout-only keys.