LedgerBee Developer
  • Getting started
  • Conventions
  • Products
  • Advisor firms
  • Configuration
  • API Reference
Information
Accounts
    List accountsgetCreate an accountpostGet an accountgetDelete an accountdeleteUpdate an accountpatch
Advisor Authority Extracts
    Submit authority extract data for an advisor firm's clientspost
Advisor Clients
    List the advisor firm's clientsget
API Key
    Get current API keyget
Authority Extracts
    Submit authority extract datapost
Bank Reconciliations
    Reconcile bank lines against entriespostUndo a bank reconciliationpostCheck what undoing a reconciliation would dopostReconcile a batch of matchespostCheck what reconciling a batch of matches would dopostCheck what reconciling bank lines against entries would dopost
Bank Transactions
    List bank linesgetGet a bank linegetDismiss bank lines from reconciliationpostCheck which bank lines a dismiss would changepostRestore dismissed bank lines to reconciliationpostCheck which bank lines a restore would changepost
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 comparisongetExport a budget's Excel workbookgetOverwrite a budget's figures from an edited workbookpostList 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 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 Note Links
    Link a credit note to the invoice it creditspostCheck a credit note’s links and the invoices it can be linked topostDetach a credit note from the invoices it is applied topost
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 customergetDelete a customerdeleteUpdate 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
Discounts
    List discountsgetCreate a discountpostGet a discountgetDelete a discountdeleteUpdate a discountpatchSet a discount's amount in one currencyputRemove a discount's amount in one currencydeleteCheck whether a discount applies to a product for a customer on a daygetAssign a discountpostRemove an assignmentdeleteUpdate an assignmentpatchList a discount's codesgetAdd a code to a discountpostDelete a codedeleteUpdate a codepatchList the discounts that apply to a product for a customer on a daygetCheck a cartpostLook up a discount codeget
Document Templates
    List document templatesget
Document Upload Links
    Upload a file through a minted linkpost
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)patchGet attachments for a draft journal entry (v2)getAdd a document to a draft journal entry (v2)postRemove a document from a draft journal entry (v2)deleteBook a draft journal entry (v2)post
Entitlements
    List entitlementsgetCreate an entitlementpostGet an entitlementgetDelete an entitlementdeleteUpdate an entitlementpatch
Invoices
    List invoicesgetCreate a draft invoicepostGet an invoicegetDelete a draft invoicedeleteUpdate an unsent invoicepatchGet 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 entrygetAdd a document to a journal entrypostRemove a document from a journal entrydeletePreview a correction without posting itpostMove postings to different accounts, keeping the document intactpostRebuild the entry a reversal undid, as a draftpostPreview rebuilding the entry a reversal undidpostReverse a posted entry and open a draft to re-enter itpostReverse posted journal entries in batchpostPreview reversing posted journal entries in batchpostReverse a posted journal entrypostPreview reversing 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 settlementgetUndo a settlementpostCheck what undoing a settlement would dopostCheck what settling these entries would dopost
Shipments
    List shipmentsgetCreate a shipment from an orderpostGet a shipmentgetCancel a shipmentpostDispatch a shipmentpost
Stock
    List stock movementsgetList on-hand stockgetOn-hand for one productget
Subscriptions
    List customer subscriptionsgetAssign a subscription to a customerpostGet a customer subscription by its stable idgetUpdate a customer subscriptionpatchAdd an add-on to a customer subscriptionpostAttach existing subscriptions as add-onspostCheck whether subscriptions can become add-onspostChange the products on a customer subscriptionpostRetry a failed card paymentpostList a subscription's pending scheduled changesgetCancel a single pending scheduled changedeleteGet a subscription's unbilled usagegetCancel a customer subscriptionpostList subscription plansgetCreate a subscription planpostArchive a subscription planpost
Suppliers
    List suppliersgetCreate a supplierpostDelete a supplierdeleteList supplier contactsgetList supplier departmentsgetList supplier groupsget
VAT Codes
    List VAT codesgetCreate a VAT codepostGet a VAT codegetDelete a VAT codedeleteUpdate a VAT codepatch
VAT periods
    Record a VAT return filed outside LedgerBeepostPreview recording a VAT return filed outside LedgerBeepostSettle a filed VAT periodpostPreview a VAT period settlementpost
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

Products

Download schema

Catalogue products. Each product belongs to a product group and carries one or more prices.


List products

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

Credential: a company's API key or OAuth token.

Retrieves a paginated list of your company's products, each including its prices. Each price carries its billingPeriodType, so a product with a one_time price can be told apart from a recurring-only one without fetching each product. Recurring and usage prices are listed only for a company with the Subscriptions module. Each product carries its full metadata map; entitlements are returned by the single-product endpoint.

Pass ?search= to prefix-match on product name or number, or ?productGroupId= to narrow the list to one product group.

Pass metadata[key]=value query parameters to return only the products whose metadata carries every given key with exactly the given value (AND semantics, exact match, at most 10 pairs). The filter composes with search and productGroupId, and total counts the filtered set. A request with more than 10 pairs returns 400 with error code METADATA_TOO_MANY_FILTERS.

Pagination

Pass each response's nextCursor back as cursor, with the same filters and sort, 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 or another sort is refused with 400 PAGINATION_INVALID_CURSOR.

Required Scope

  • products-read

List products › query Parameters

cursor
​string

Opaque cursor from the previous response's nextCursor. Returns the rows after it, in the same order. Send the same filters and sort as the request that produced it, and do not send page. The preferred way to page through a list.

page
​number · min: 1 · deprecated

Deprecated: page with cursor instead. Page number (1-indexed). From 2026-12-31, a page past the first of a list with more than 10,000 matching rows is refused.

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

Maximum number of items per page

Default: 25
search
​string

Prefix search on name or number

Example: Hosting
productGroupId
​string

Filter by product group ID

sortBy
​string · enum

Field to sort by

Enum values:
productNumber
name
createdAt
Default: createdAt
sortOrder
​string · enum

Sort direction

Enum values:
ASC
DESC
Default: DESC
​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 products › Responses

Paginated list of products for the company matching the given filters (each includes its prices)

ListProductsResponse
​ProductListItem[] · required

Page of products, each with its prices (GET one product for its entitlements)

total
​number · required

Total number of matching products

Example: 42
limit
​number · required

Items per page

Example: 25
nextCursor
​string | null · required

Cursor for the next page; pass it as cursor. null on the last page, and on every page of a sort that cannot page by cursor — hasMore then says whether another page follows by page number.

Example: eyJ2IjoxLCJmIjoiOWMxZjQyYWIzMTA4ZDc2ZSIsImsiOlsiMjAyNi0wMS0yMCJdfQ
hasMore
​boolean · required

Whether more rows follow this page.

Example: true
page
​number · deprecated

Deprecated: page with nextCursor instead. Current page number.

Example: 1
totalPages
​number · deprecated

Deprecated: page with nextCursor instead. Total number of pages.

Example: 2
GET/v1/products
curl https://api.ledgerbee.com/api/v1/products \ --header 'x-api-key: <api-key>'
Example Responses
{ "data": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "productNumber": "P001", "name": "Web Hosting", "description": "description", "unit": "pcs", "productGroupId": "productGroupId", "productType": "goods", "isActive": true, "isArchived": false, "isLocked": false, "allowFreePrice": false, "prices": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "productId": "productId", "nickname": "nickname", "unitAmount": "99.99", "billingPeriodType": "recurring", "pricingModel": "flat_rate", "billingInterval": "day", "billingIntervalCount": 1, "currency": "DKK", "baseCurrency": "DKK", "availableCurrencies": [ "string" ], "status": "draft", "isDefault": false, "isLocked": false, "allowFreePrice": false, "meterId": "meterId", "tiers": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "fromQuantity": 1, "toQuantity": 10, "unitAmount": "99.99", "flatFee": "10.00" } ], "vatRatesByZone": {} } ], "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z", "metadata": { "sku": "WH-100", "catalogSection": "hosting" } } ], "total": 42, "page": 1, "limit": 25, "totalPages": 2, "nextCursor": "eyJ2IjoxLCJmIjoiOWMxZjQyYWIzMTA4ZDc2ZSIsImsiOlsiMjAyNi0wMS0yMCJdfQ", "hasMore": true }
json
application/json

Create a product

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

Credential: a company's API key or OAuth token.

Creates a product.

An optional initial price can be supplied inline — it is created, activated, and set as the product's default price in the same transaction.

An optional metadata map (string keys to string values, at most 50 entries, keys up to 128 characters, values up to 500 characters) is stored with the product and echoed on the response. An invalid map is rejected before the product is created, with error code METADATA_KEY_REQUIRED, METADATA_KEY_TOO_LONG, METADATA_VALUE_TOO_LONG, METADATA_DUPLICATE_KEY or METADATA_TOO_MANY_ENTRIES.

Required Scope

  • products-write

Create a product › Headers

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

Optional idempotency key for safely retrying mutating requests.

Create a product › Request Body

CreateProductRequest
productNumber
​string · required

Unique product number within the company

Example: P001
name
​string · maxLength: 300 · required

Name of the product

Example: Web Hosting
unit
​string · maxLength: 255 · required

Unit of measurement

Example: pcs
productGroupId
​string · required

Product group this product belongs to (must exist)

Example: 550e8400-e29b-41d4-a716-446655440000
description
​string · maxLength: 1000

Optional description

isActive
​boolean

Whether the product is active

Default: true
productType
​string · enum

Product type (goods or services)

Enum values:
goods
services
Default: services
allowFreePrice
​boolean

Whether a price of 0 on this product is a deliberate free price. Off, a price of 0 cannot be saved.

Default: false
​object

Optional initial price. If provided it is created, activated and set as default in one transaction.

entitlementIds
​array | null · maxItems: 100

Externally managed entitlement IDs to bind (max 100)

​object

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

Example: {"sku":"WH-100"}

Create a product › Responses

Product created successfully

ProductResponse
id
​string · required

The unique identifier of the product

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

Unique product number within the company

Example: P001
name
​string · required

Name of the product

Example: Web Hosting
unit
​string · required

Unit of measurement

Example: pcs
productGroupId
​string · required

Product group this product belongs to

productType
​string · enum · required

Product type (goods or services) for EU VAT

Enum values:
goods
services
isActive
​boolean · required

Whether the product is active

Example: true
isArchived
​boolean · required

Whether the product is archived

Example: false
isLocked
​boolean · required

Whether the product is locked (in use, cannot be deleted)

Example: false
allowFreePrice
​boolean · required

Whether a price of 0 on this product is a deliberate free price. Off, a price of 0 cannot be saved and a stored 0 reads as no price set.

Example: false
createdAt
​string · date-time · required

When the product was created

Example: 2024-01-15T10:30:00Z
updatedAt
​string · date-time · required

When the product was last updated

Example: 2024-01-15T10:30:00Z
description
​string | null

Optional description

​ProductPriceResponse[]

Prices configured for this product

​EntitlementRef[]

Entitlements granted by this product

​object

Key-value metadata attached to the product

Example: {"sku":"WH-100","catalogSection":"hosting"}
POST/v1/products
curl https://api.ledgerbee.com/api/v1/products \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "productNumber": "P001", "name": "Web Hosting", "description": "string", "unit": "pcs", "productGroupId": "550e8400-e29b-41d4-a716-446655440000", "isActive": true, "productType": "services", "allowFreePrice": false, "initialPrice": { "nickname": "Monthly", "unitAmount": "99.99", "billingPeriodType": "recurring", "pricingModel": "flat_rate", "billingInterval": "day", "billingIntervalCount": 1, "currency": "DKK", "meterId": "string", "tiers": [] }, "entitlementIds": [ "string" ], "metadata": { "sku": "WH-100" } }'
Example Request Body
{ "productNumber": "P001", "name": "Web Hosting", "description": "string", "unit": "pcs", "productGroupId": "550e8400-e29b-41d4-a716-446655440000", "isActive": true, "productType": "services", "allowFreePrice": false, "initialPrice": { "nickname": "Monthly", "unitAmount": "99.99", "billingPeriodType": "recurring", "pricingModel": "flat_rate", "billingInterval": "day", "billingIntervalCount": 1, "currency": "DKK", "meterId": "string", "tiers": [] }, "entitlementIds": [ "string" ], "metadata": { "sku": "WH-100" } }
json
application/json
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "productNumber": "P001", "name": "Web Hosting", "description": "description", "unit": "pcs", "productGroupId": "productGroupId", "productType": "goods", "isActive": true, "isArchived": false, "isLocked": false, "allowFreePrice": false, "prices": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "productId": "productId", "nickname": "nickname", "unitAmount": "99.99", "billingPeriodType": "recurring", "pricingModel": "flat_rate", "billingInterval": "day", "billingIntervalCount": 1, "currency": "DKK", "baseCurrency": "DKK", "availableCurrencies": [ "string" ], "status": "draft", "isDefault": false, "isLocked": false, "allowFreePrice": false, "meterId": "meterId", "tiers": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "fromQuantity": 1, "toQuantity": 10, "unitAmount": "99.99", "flatFee": "10.00" } ], "vatRatesByZone": {} } ], "entitlements": [ { "id": "id", "name": "Advanced reporting", "key": "advanced_reporting" } ], "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z", "metadata": { "sku": "WH-100", "catalogSection": "hosting" } }
json
application/json

Get a product

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

Credential: a company's API key or OAuth token.

Returns a single product, including its prices.

Required Scope

  • products-read

Get a product › path Parameters

productId
​string · required

Product ID

Get a product › Responses

Product details, including its prices

ProductResponse
id
​string · required

The unique identifier of the product

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

Unique product number within the company

Example: P001
name
​string · required

Name of the product

Example: Web Hosting
unit
​string · required

Unit of measurement

Example: pcs
productGroupId
​string · required

Product group this product belongs to

productType
​string · enum · required

Product type (goods or services) for EU VAT

Enum values:
goods
services
isActive
​boolean · required

Whether the product is active

Example: true
isArchived
​boolean · required

Whether the product is archived

Example: false
isLocked
​boolean · required

Whether the product is locked (in use, cannot be deleted)

Example: false
allowFreePrice
​boolean · required

Whether a price of 0 on this product is a deliberate free price. Off, a price of 0 cannot be saved and a stored 0 reads as no price set.

Example: false
createdAt
​string · date-time · required

When the product was created

Example: 2024-01-15T10:30:00Z
updatedAt
​string · date-time · required

When the product was last updated

Example: 2024-01-15T10:30:00Z
description
​string | null

Optional description

​ProductPriceResponse[]

Prices configured for this product

​EntitlementRef[]

Entitlements granted by this product

​object

Key-value metadata attached to the product

Example: {"sku":"WH-100","catalogSection":"hosting"}
GET/v1/products/{productId}
curl https://api.ledgerbee.com/api/v1/products/:productId \ --header 'x-api-key: <api-key>'
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "productNumber": "P001", "name": "Web Hosting", "description": "description", "unit": "pcs", "productGroupId": "productGroupId", "productType": "goods", "isActive": true, "isArchived": false, "isLocked": false, "allowFreePrice": false, "prices": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "productId": "productId", "nickname": "nickname", "unitAmount": "99.99", "billingPeriodType": "recurring", "pricingModel": "flat_rate", "billingInterval": "day", "billingIntervalCount": 1, "currency": "DKK", "baseCurrency": "DKK", "availableCurrencies": [ "string" ], "status": "draft", "isDefault": false, "isLocked": false, "allowFreePrice": false, "meterId": "meterId", "tiers": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "fromQuantity": 1, "toQuantity": 10, "unitAmount": "99.99", "flatFee": "10.00" } ], "vatRatesByZone": {} } ], "entitlements": [ { "id": "id", "name": "Advanced reporting", "key": "advanced_reporting" } ], "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z", "metadata": { "sku": "WH-100", "catalogSection": "hosting" } }
json
application/json

Delete a product

DELETE
https://api.ledgerbee.com/api
/v1/products/{productId}
x-api-key (header)
or
OAuth 2.0

Credential: a company's API key or OAuth token.

Deletes a product. A product that is locked (in use) cannot be deleted.

A product that a quote, an order confirmation or another record uses is refused with 409 and the code PRODUCT_IN_USE; details.documents names up to ten of those quotes and order confirmations and details.documentCount counts them all. Archive such a product instead.

Deleting a product also deletes its metadata.

Required Scope

  • products-write

Delete a product › path Parameters

productId
​string · required

Product ID

Delete a product › Headers

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

Optional idempotency key for safely retrying mutating requests.

Delete a product › Responses

Product deleted successfully

No data returned
DELETE/v1/products/{productId}
curl https://api.ledgerbee.com/api/v1/products/:productId \ --request DELETE \ --header 'x-api-key: <api-key>'
Example Responses
No example specified for this content type

Update a product

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

Credential: a company's API key or OAuth token.

Updates a product. Only the fields provided in the request are changed.

When metadata is provided it replaces the product's metadata wholesale: send the complete desired map, and send an empty object ({}) to clear every entry. Omit the field to leave the metadata unchanged. The response carries the resulting map.

Required Scope

  • products-write

Update a product › path Parameters

productId
​string · required

Product ID

Update a product › Headers

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

Optional idempotency key for safely retrying mutating requests.

Update a product › Request Body

UpdateProductRequest
productNumber
​string

Unique product number within the company

Example: P001
name
​string · maxLength: 300

Name of the product

Example: Web Hosting
description
​string · maxLength: 1000

Optional description

unit
​string · maxLength: 255

Unit of measurement

Example: pcs
productGroupId
​string

Product group this product belongs to

isActive
​boolean

Whether the product is active

productType
​string · enum

Product type (goods or services)

Enum values:
goods
services
allowFreePrice
​boolean

Whether a price of 0 on this product is a deliberate free price. Omit to leave unchanged. Turning it off leaves stored prices as they are.

entitlementIds
​array | null · maxItems: 100

Externally managed entitlement IDs to bind (max 100)

​object

Key-value metadata. When provided, REPLACES the product 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: {"sku":"WH-100"}

Update a product › Responses

Product updated successfully

ProductResponse
id
​string · required

The unique identifier of the product

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

Unique product number within the company

Example: P001
name
​string · required

Name of the product

Example: Web Hosting
unit
​string · required

Unit of measurement

Example: pcs
productGroupId
​string · required

Product group this product belongs to

productType
​string · enum · required

Product type (goods or services) for EU VAT

Enum values:
goods
services
isActive
​boolean · required

Whether the product is active

Example: true
isArchived
​boolean · required

Whether the product is archived

Example: false
isLocked
​boolean · required

Whether the product is locked (in use, cannot be deleted)

Example: false
allowFreePrice
​boolean · required

Whether a price of 0 on this product is a deliberate free price. Off, a price of 0 cannot be saved and a stored 0 reads as no price set.

Example: false
createdAt
​string · date-time · required

When the product was created

Example: 2024-01-15T10:30:00Z
updatedAt
​string · date-time · required

When the product was last updated

Example: 2024-01-15T10:30:00Z
description
​string | null

Optional description

​ProductPriceResponse[]

Prices configured for this product

​EntitlementRef[]

Entitlements granted by this product

​object

Key-value metadata attached to the product

Example: {"sku":"WH-100","catalogSection":"hosting"}
PATCH/v1/products/{productId}
curl https://api.ledgerbee.com/api/v1/products/:productId \ --request PATCH \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "productNumber": "P001", "name": "Web Hosting", "description": "string", "unit": "pcs", "productGroupId": "string", "isActive": true, "productType": "goods", "allowFreePrice": true, "entitlementIds": [ "string" ], "metadata": { "sku": "WH-100" } }'
Example Request Body
{ "productNumber": "P001", "name": "Web Hosting", "description": "string", "unit": "pcs", "productGroupId": "string", "isActive": true, "productType": "goods", "allowFreePrice": true, "entitlementIds": [ "string" ], "metadata": { "sku": "WH-100" } }
json
application/json
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "productNumber": "P001", "name": "Web Hosting", "description": "description", "unit": "pcs", "productGroupId": "productGroupId", "productType": "goods", "isActive": true, "isArchived": false, "isLocked": false, "allowFreePrice": false, "prices": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "productId": "productId", "nickname": "nickname", "unitAmount": "99.99", "billingPeriodType": "recurring", "pricingModel": "flat_rate", "billingInterval": "day", "billingIntervalCount": 1, "currency": "DKK", "baseCurrency": "DKK", "availableCurrencies": [ "string" ], "status": "draft", "isDefault": false, "isLocked": false, "allowFreePrice": false, "meterId": "meterId", "tiers": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "fromQuantity": 1, "toQuantity": 10, "unitAmount": "99.99", "flatFee": "10.00" } ], "vatRatesByZone": {} } ], "entitlements": [ { "id": "id", "name": "Advanced reporting", "key": "advanced_reporting" } ], "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z", "metadata": { "sku": "WH-100", "catalogSection": "hosting" } }
json
application/json

Archive a product

POST
https://api.ledgerbee.com/api
/v1/products/{productId}/archive
x-api-key (header)
or
OAuth 2.0

Credential: a company's API key or OAuth token.

Archives a product and every price on it. Nothing new can be sold against an archived product, while the subscriptions and documents already referencing it keep resolving — which is why this, not DELETE, is what a product in use gets. There is no unarchive.

Archiving keeps the product's metadata; the response carries it unchanged.

Required Scope

  • products-write

Archive a product › path Parameters

productId
​string · required

Product ID

Archive a product › Headers

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

Optional idempotency key for safely retrying mutating requests.

Archive a product › Responses

Product archived successfully

ProductResponse
id
​string · required

The unique identifier of the product

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

Unique product number within the company

Example: P001
name
​string · required

Name of the product

Example: Web Hosting
unit
​string · required

Unit of measurement

Example: pcs
productGroupId
​string · required

Product group this product belongs to

productType
​string · enum · required

Product type (goods or services) for EU VAT

Enum values:
goods
services
isActive
​boolean · required

Whether the product is active

Example: true
isArchived
​boolean · required

Whether the product is archived

Example: false
isLocked
​boolean · required

Whether the product is locked (in use, cannot be deleted)

Example: false
allowFreePrice
​boolean · required

Whether a price of 0 on this product is a deliberate free price. Off, a price of 0 cannot be saved and a stored 0 reads as no price set.

Example: false
createdAt
​string · date-time · required

When the product was created

Example: 2024-01-15T10:30:00Z
updatedAt
​string · date-time · required

When the product was last updated

Example: 2024-01-15T10:30:00Z
description
​string | null

Optional description

​ProductPriceResponse[]

Prices configured for this product

​EntitlementRef[]

Entitlements granted by this product

​object

Key-value metadata attached to the product

Example: {"sku":"WH-100","catalogSection":"hosting"}
POST/v1/products/{productId}/archive
curl https://api.ledgerbee.com/api/v1/products/:productId/archive \ --request POST \ --header 'x-api-key: <api-key>'
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "productNumber": "P001", "name": "Web Hosting", "description": "description", "unit": "pcs", "productGroupId": "productGroupId", "productType": "goods", "isActive": true, "isArchived": false, "isLocked": false, "allowFreePrice": false, "prices": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "productId": "productId", "nickname": "nickname", "unitAmount": "99.99", "billingPeriodType": "recurring", "pricingModel": "flat_rate", "billingInterval": "day", "billingIntervalCount": 1, "currency": "DKK", "baseCurrency": "DKK", "availableCurrencies": [ "string" ], "status": "draft", "isDefault": false, "isLocked": false, "allowFreePrice": false, "meterId": "meterId", "tiers": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "fromQuantity": 1, "toQuantity": 10, "unitAmount": "99.99", "flatFee": "10.00" } ], "vatRatesByZone": {} } ], "entitlements": [ { "id": "id", "name": "Advanced reporting", "key": "advanced_reporting" } ], "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z", "metadata": { "sku": "WH-100", "catalogSection": "hosting" } }
json
application/json

Product PricesProjects