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

Billing Groups

Download schema

Several of one customer's subscriptions billing onto one shared invoice: read the set, form one, add and remove members, and ask whether a set would be accepted. Requires the Subscription license.


Form a billing group

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

Forms a billing group from a lead subscription and 1 to 19 other subscriptions of the same customer. The lead's next billing date becomes the day the set starts billing together, and its payment terms, invoice delivery and send offset are written onto every member. Currency, billing direction, revenue deferral and payment-method mode must already agree across the set. A member's own card is discarded: a group is charged on a card the buyer attaches to the group.

Every subscription id is the stable id GET /v1/subscriptions returns.

Required Scope

  • subscriptions-write

Required License

  • Subscription — the tenant must also hold this module license, or the request returns 403 LICENSE.REQUIRED.

Form a billing group › Headers

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

Optional idempotency key for safely retrying mutating requests.

Form a billing group › Request Body

PublicFormBillingGroupRequest
leadSubscriptionId
​string · required

The subscription whose terms the group takes: its next billing date becomes the group's billing date, and its payment terms, invoice delivery and send offset are written onto every member. Not repeated in memberSubscriptionIds.

Example: 0197A943-2325-7829-B835-B6C71A293065
memberSubscriptionIds
​string[] · required

The other subscriptions of the same customer that join the group: 1 to 19, distinct, none already in a group. A group holds at most 20 members including the lead.

invoiceTemplateId
​string | null

A consolidated document template for the shared invoice. Omitted or null uses the customer's, then your default.

Example: null
includeMemberDetailsPdf
​boolean

Attach a zip with one detail document per member to each send. Defaults to false.

Example: false

Form a billing group › Responses

The new group, its first shared billing date, and every member

PublicFormBillingGroupResponse
billingGroupId
​string · required

The new group.

Example: 0197A943-2325-7829-B835-B6C71A293065
billingActiveFrom
​string · required

The day the set starts billing together (YYYY-MM-DD).

Example: 2026-10-01
leadSubscriptionId
​string · required

The subscription whose terms the group took, echoed from the request.

Example: 0197A943-2325-7829-B835-B6C71A293065
​PublicBillingGroupMemberRef[] · required

Every member, the lead included.

POST/v1/billing-groups
curl https://api.ledgerbee.com/api/v1/billing-groups \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "leadSubscriptionId": "0197A943-2325-7829-B835-B6C71A293065", "memberSubscriptionIds": [ "string" ], "invoiceTemplateId": null, "includeMemberDetailsPdf": false }'
Example Request Body
{ "leadSubscriptionId": "0197A943-2325-7829-B835-B6C71A293065", "memberSubscriptionIds": [ "string" ], "invoiceTemplateId": null, "includeMemberDetailsPdf": false }
json
application/json
Example Responses
{ "billingGroupId": "0197A943-2325-7829-B835-B6C71A293065", "billingActiveFrom": "2026-10-01", "leadSubscriptionId": "0197A943-2325-7829-B835-B6C71A293065", "members": [ { "subscriptionId": "0197A943-2325-7829-B835-B6C71A293065" } ] }
json
application/json

Get a billing group

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

Returns a billing group with its current members, each carrying its own next billing date and monthly revenue. A dissolved group still answers, with dissolvedAt set and no members: the invoices it issued keep naming it.

Required Scope

  • subscriptions-read

Required License

  • Subscription — the tenant must also hold this module license, or the request returns 403 LICENSE.REQUIRED.

Get a billing group › path Parameters

billingGroupId
​string · required

Billing group id

Get a billing group › Responses

The billing group

PublicBillingGroup
id
​string · required

Billing group id

Example: 0197A943-2325-7829-B835-B6C71A293065
customerId
​string · required

The one customer every member belongs to.

Example: 0197A943-2325-7829-B835-B6C71A293065
billingActiveFrom
​string · required

The day the group started, or starts, billing as a set (YYYY-MM-DD).

Example: 2026-10-01
chargesByCard
​boolean · required

True when the next shared invoice is charged to the group's card rather than sent for bank payment. The card is the group's; members hold none of their own.

Example: false
includeMemberDetailsPdf
​boolean · required

Whether each send also attaches a zip with one detail document per member.

Example: false
​PublicBillingGroupMember[] · required

The current members, ordered by the day they start billing on the group and then by id. Empty once the group has dissolved.

dissolvedAt
​string | null

When the group dissolved (ISO 8601), or null while it bills as a set. A dissolved group keeps answering here because the invoices it issued still name it.

Example: null
invoiceTemplateId
​string | null

The consolidated document template the shared invoice renders from, or null to use the customer's, then your default.

Example: null
GET/v1/billing-groups/{billingGroupId}
curl https://api.ledgerbee.com/api/v1/billing-groups/:billingGroupId \ --header 'x-api-key: <api-key>'
Example Responses
{ "id": "0197A943-2325-7829-B835-B6C71A293065", "customerId": "0197A943-2325-7829-B835-B6C71A293065", "billingActiveFrom": "2026-10-01", "dissolvedAt": null, "chargesByCard": false, "invoiceTemplateId": null, "includeMemberDetailsPdf": false, "members": [ { "subscriptionId": "0197A943-2325-7829-B835-B6C71A293065", "subscriptionName": "Pro plan", "billingActiveFrom": "2026-10-01", "effectiveNextBillingDate": "2026-10-01", "monthlyRevenue": "499.00", "currency": "DKK" } ] }
json
application/json

Add members to a billing group

POST
https://api.ledgerbee.com/api
/v1/billing-groups/{billingGroupId}/members
x-api-key (header)
or
OAuth 2.0

Adds 1 to 19 existing subscriptions of the group's customer to the group. The group's billing date does not move: each joiner is moved onto it, and its invoice-affecting fields are rewritten to the group's. A joiner's own card is discarded.

A dissolved group answers 400 SUBSCRIPTION_BILLING_GROUP_NOT_JOINABLE; form a new group instead.

Required Scope

  • subscriptions-write

Required License

  • Subscription — the tenant must also hold this module license, or the request returns 403 LICENSE.REQUIRED.

Add members to a billing group › path Parameters

billingGroupId
​string · required

Billing group id

Add members to a billing group › Headers

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

Optional idempotency key for safely retrying mutating requests.

Add members to a billing group › Request Body

PublicAddBillingGroupMembersRequest
subscriptionIds
​string[] · required

Subscriptions of the group's customer that join it: 1 to 19, distinct, none already in a group. The group's billing date does not move; each joiner is moved onto it.

Add members to a billing group › Responses

The group, the day the joiners start billing on it, and the joiners

PublicAddBillingGroupMembersResponse
billingGroupId
​string · required

The group joined.

Example: 0197A943-2325-7829-B835-B6C71A293065
billingActiveFrom
​string · required

The day the joiners start billing on the group's invoice (YYYY-MM-DD).

Example: 2026-10-01
​PublicBillingGroupMemberRef[] · required

The subscriptions that joined.

POST/v1/billing-groups/{billingGroupId}/members
curl https://api.ledgerbee.com/api/v1/billing-groups/:billingGroupId/members \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "subscriptionIds": [ "string" ] }'
Example Request Body
{ "subscriptionIds": [ "string" ] }
json
application/json
Example Responses
{ "billingGroupId": "0197A943-2325-7829-B835-B6C71A293065", "billingActiveFrom": "2026-10-01", "joiners": [ { "subscriptionId": "0197A943-2325-7829-B835-B6C71A293065" } ] }
json
application/json

Remove a member from a billing group

DELETE
https://api.ledgerbee.com/api
/v1/billing-groups/{billingGroupId}/members/{subscriptionId}
x-api-key (header)
or
OAuth 2.0

Takes one subscription off the group, effective at once. It keeps the billing date and the fields the group gave it and bills on its own from its next billing date. If fewer than two members remain, the whole group dissolves and the response says so with groupDissolved: true.

The subscription must be a current member of THIS group; otherwise the request answers 404 SUBSCRIPTION_BILLING_GROUP_MEMBER_NOT_FOUND, whose details.groupDissolvedAt says whether the group itself has ended. While a shared invoice is still being collected on the group's card, no member can leave (400 SUBSCRIPTION_BILLING_GROUP_LEAVE_BLOCKED_BY_UNPAID_INVOICE).

Required Scope

  • subscriptions-write

Required License

  • Subscription — the tenant must also hold this module license, or the request returns 403 LICENSE.REQUIRED.

Remove a member from a billing group › path Parameters

billingGroupId
​string · required

Billing group id

subscriptionId
​string · required

The subscription to remove, by its stable id

Remove a member from a billing group › Headers

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

Optional idempotency key for safely retrying mutating requests.

Remove a member from a billing group › Responses

The group left, the subscription that left, and whether the group dissolved

PublicRemoveBillingGroupMemberResponse
billingGroupId
​string · required

The group the subscription left.

Example: 0197A943-2325-7829-B835-B6C71A293065
subscriptionId
​string · required

The subscription that left, by its stable id.

Example: 0197A943-2325-7829-B835-B6C71A293065
groupDissolved
​boolean · required

True when this departure left fewer than two members and the whole group dissolved: the remaining member bills on its own from its next billing date.

Example: false
DELETE/v1/billing-groups/{billingGroupId}/members/{subscriptionId}
curl https://api.ledgerbee.com/api/v1/billing-groups/:billingGroupId/members/:subscriptionId \ --request DELETE \ --header 'x-api-key: <api-key>'
Example Responses
{ "billingGroupId": "0197A943-2325-7829-B835-B6C71A293065", "subscriptionId": "0197A943-2325-7829-B835-B6C71A293065", "groupDissolved": false }
json
application/json

Check billing group eligibility

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

Asks whether a set of subscriptions could form a billing group, or join an existing one, without writing anything. Every refusal the set carries is reported at once — at most one per subscription plus at most one about the set — where the write itself stops at the first.

mode: "form" takes leadSubscriptionId and memberSubscriptionIds; mode: "join" takes billingGroupId and subscriptionIds. A dissolved group answers eligible: false with a set-level refusal; an unknown group is a 404.

Required Scope

  • subscriptions-read

Required License

  • Subscription — the tenant must also hold this module license, or the request returns 403 LICENSE.REQUIRED.

Check billing group eligibility › Headers

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

Optional idempotency key for safely retrying mutating requests.

Check billing group eligibility › Request Body

PublicBillingGroupEligibilityRequest
mode
​string · enum · required

form asks whether leadSubscriptionId and memberSubscriptionIds could form a group; join asks whether subscriptionIds could join billingGroupId.

Enum values:
form
join
Example: form
leadSubscriptionId
​string

form: the subscription whose terms the group would take.

memberSubscriptionIds
​string[]

form: the subscriptions that would join, 0 to 19. Omitted or empty asks whether the lead could lead a group at all.

billingGroupId
​string

join: the group to join.

subscriptionIds
​string[]

join: the subscriptions that would join, 1 to 19.

Check billing group eligibility › Responses

Whether the write would be accepted, and every refusal it would answer with

PublicBillingGroupEligibilityResponse
eligible
​boolean · required

True when the write would be accepted today.

Example: true
​PublicBillingGroupRefusal[] · required

Every refusal, at most one per subscription plus at most one about the set. Empty when eligible. A subscription refused for two reasons reports the first; the second appears once the first is fixed.

POST/v1/billing-groups/eligibility
curl https://api.ledgerbee.com/api/v1/billing-groups/eligibility \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "mode": "form", "leadSubscriptionId": "string", "memberSubscriptionIds": [ "string" ], "billingGroupId": "string", "subscriptionIds": [ "string" ] }'
Example Request Body
{ "mode": "form", "leadSubscriptionId": "string", "memberSubscriptionIds": [ "string" ], "billingGroupId": "string", "subscriptionIds": [ "string" ] }
json
application/json
Example Responses
{ "eligible": true, "refusals": [ { "code": "SUBSCRIPTION_BILLING_GROUP_CURRENCY_MISMATCH", "subscriptionId": "0197A943-2325-7829-B835-B6C71A293065" } ] }
json
application/json

Authority ExtractsBudgets