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

Portal Plans

Download schema

List the full plan catalogue

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

Returns every ACTIVE plan with a PUBLISHED version in the API key's tenant, projected as its canonical native card and ordered by display order. This is the integrator's FULL catalogue — it does NOT run the per-buyer rule engine, does NOT filter by any plan-routing visibility rule, and mints NO token. Use it to read all your plans (e.g. to build pricing pages), as opposed to resolve, which returns only the subset a specific buyer matches. Requires the portal-catalog-read scope.

List the full plan catalogue › query Parameters

language
​string · enum

Language the resolved cards are localized to. Defaults to en.

Enum values:
en
da
Example: en

List the full plan catalogue › Responses

PublicPortalPlansListResponse
​object[] · required

Every ACTIVE plan with a PUBLISHED version in the API key's tenant, projected as its canonical native card and ordered by display order. This is the integrator's full catalogue — NOT filtered by any per-visitor visibility rule and NOT run through the plan-routing rule engine. Each entry carries the full card content the integrator renders.

GET/v1/portal/plans
curl https://api.ledgerbee.com/api/v1/portal/plans \ --header 'x-api-key: <api-key>'
Example Responses
{ "plans": [ {} ] }
json
application/json

Get one plan by id

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

Returns a single plan by its id, projected as its canonical native card — the integrator's by-id read. Does NOT run the rule engine and does NOT filter by visibility rules: every published plan of the tenant resolves here. Returns 404 PORTAL_PLAN_NOT_FOUND only when the plan id is unknown to the tenant or has no published version. Requires the portal-catalog-read scope.

Get one plan by id › path Parameters

planId
​string · required

The plan id (uuid).

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

Get one plan by id › query Parameters

language
​string · enum

Language the resolved cards are localized to. Defaults to en.

Enum values:
en
da
Example: en

Get one plan by id › Responses

PublicPortalPlanResponse
​object · required

A single plan projected as its canonical native card. Returns 404 PORTAL_PLAN_NOT_FOUND only when the plan id is unknown to the API key's tenant or has no published version — never filtered by visibility rules or the rule engine.

GET/v1/portal/plans/{planId}
curl https://api.ledgerbee.com/api/v1/portal/plans/:planId \ --header 'x-api-key: <api-key>'
Example Responses
{ "plan": {} }
json
application/json

Resolve the gated pricing catalogue for an identified buyer (partner display)

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

Runs the plan-routing rule engine for the buyer identified by customerId (or the no-customer-yet countryCode/customerType hints) within the API key's tenant, and returns the plans that buyer can SEE and CHECK OUT — including non-public (gated) plans the buyer matches — plus a reusable, read-only load-time catalog token. The partner returns the token to each embed iframe (via its fetchCatalogToken provider) to authorize the by-id pricing-card / checkout-document reads. Does NOT consult allowSelfSignup and never publishes to the CDN. Requires the portal-catalog-read scope.

Resolve the gated pricing catalogue for an identified buyer (partner display) › Request Body

PublicResolvePortalPlansRequest
customerId
​string

The buyer's LedgerBee customer id (an identity HANDLE — the server hydrates customer group / country / type from it; raw rule attributes are never accepted). The customer must exist in the API key's tenant (a 404 CUSTOMER_NOT_FOUND otherwise). When present, the server-resolved identity wins and the countryCode/customerType hints are ignored.

Example: 550e8400-e29b-41d4-a716-446655440010
buyerEmail
​string

The specific person (their email) the partner is acting on behalf of under customerId — e.g. the user currently signed in on the partner's site. Bound into the catalog token: when that token is later exchanged for a portal login handoff, THIS person is logged in (or bootstrapped credential-less under the customer's organization), instead of the customer's contact email / first member. Ignored without customerId; does not affect catalog visibility.

Example: buyer@partner.example
countryCode
​string

ISO 3166-1 alpha-2 country hint for the no-customer-yet preview (drives the country rule clause). Ignored when customerId is supplied.

Example: DK
customerType
​string · enum

Customer-type hint for the no-customer-yet preview (drives the customerType rule clause). Ignored when customerId is supplied.

Enum values:
BUSINESS
PRIVATE_PERSON
Example: BUSINESS
planIds
​string[]

Resolve only these plan ids. Omit to resolve every ACTIVE plan of the tenant. Each must be a uuid.

Example: ["550e8400-e29b-41d4-a716-446655440100"]
language
​string · enum

Language the resolved cards are localized to. Defaults to en.

Enum values:
en
da
Example: en

Resolve the gated pricing catalogue for an identified buyer (partner display) › Responses

PublicResolvePortalPlansResponse
​object[] · required

The plans visible AND checkout-able to the resolved buyer, each carrying the full card content the partner renders. Non-public (gated) plans appear here when the buyer matches their rule.

catalogToken
​string · required

Opaque, reusable, read-only load-time catalog token (43-char base64url). The partner returns it to each embed iframe via its fetchCatalogToken provider; the iframe presents it as a Bearer token to the by-id pricing-card / checkout-document reads. Scoped to the resolved buyer + the returned plans — replay yields only the same already-authorized cards. Treat it as a client secret (TLS-only, never log, never put on a URL).

Example: Yk3pQ9sV2nR7tW1xZ4cB8mL6dF0aH5jE2gN9uK3pQ7s
expiresAt
​string · required

ISO-8601 expiry of the catalog token.

Example: 2026-06-06T12:34:56.000Z
POST/v1/portal/plans/resolve
curl https://api.ledgerbee.com/api/v1/portal/plans/resolve \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "customerId": "550e8400-e29b-41d4-a716-446655440010", "buyerEmail": "buyer@partner.example", "countryCode": "DK", "customerType": "BUSINESS", "planIds": [ "550e8400-e29b-41d4-a716-446655440100" ], "language": "en" }'
Example Request Body
{ "customerId": "550e8400-e29b-41d4-a716-446655440010", "buyerEmail": "buyer@partner.example", "countryCode": "DK", "customerType": "BUSINESS", "planIds": [ "550e8400-e29b-41d4-a716-446655440100" ], "language": "en" }
json
Example Responses
{ "plans": [ {} ], "catalogToken": "Yk3pQ9sV2nR7tW1xZ4cB8mL6dF0aH5jE2gN9uK3pQ7s", "expiresAt": "2026-06-06T12:34:56.000Z" }
json
application/json

Order ConfirmationsQuotes