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

Product Groups

Download schema

Product-group ledger-account mappings. Every product belongs to a group, and the group decides which revenue account a sale posts to per VAT zone (domestic / EU / abroad / domestic-without-VAT).


List product groups

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

Retrieves a paginated list of your company's product groups. Each list item includes the number of products in the group.

Pass ?search= to prefix-match on group name or number.

Required Scope

  • products-read

List product groups › query Parameters

page
​number · min: 1

Page number (1-indexed)

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: Office
sortBy
​string · enum

Field to sort by

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

Sort direction

Enum values:
ASC
DESC
Default: DESC

List product groups › Responses

Paginated list of product groups for the company

ListProductGroupsResponse
​ProductGroupResponse[] · required

Page of product groups

total
​number · required

Total number of matching product groups

Example: 42
page
​number · required

Current page number

Example: 1
limit
​number · required

Items per page

Example: 25
totalPages
​number · required

Total number of pages

Example: 2
GET/v1/product-groups
curl https://api.ledgerbee.com/api/v1/product-groups \ --header 'x-api-key: <api-key>'
Example Responses
{ "data": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "number": "PG001", "name": "Office Supplies", "description": "Products for office use", "domesticAccountId": "550e8400-e29b-41d4-a716-446655440000", "domesticAccountNumber": 1010, "domesticAccountName": "Sales — domestic", "euAccountId": "euAccountId", "euAccountNumber": 0, "euAccountName": "euAccountName", "abroadAccountId": "abroadAccountId", "abroadAccountNumber": 0, "abroadAccountName": "abroadAccountName", "domesticWithoutVatAccountId": "domesticWithoutVatAccountId", "domesticWithoutVatAccountNumber": 0, "domesticWithoutVatAccountName": "domesticWithoutVatAccountName", "productCount": 12, "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z" } ], "total": 42, "page": 1, "limit": 25, "totalPages": 2 }
json
application/json

Create a product group

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

Creates a product group. A group maps its products to the ledger accounts used for domestic, EU (Rubric B), abroad (Rubric C), and domestic-without-VAT sales.

Required Scope

  • products-write

Create a product group › Request Body

CreateProductGroupRequest
number
​string · required

Unique product-group number within the company

Example: PG001
name
​string · required

Name of the product group

Example: Office Supplies
domesticAccountId
​string · required

Ledger account ID for domestic sales. Must reference an existing account that carries a VAT code valid for sales.

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

Ledger account ID for EU sales (Rubric B). Must carry a sales-valid VAT code.

abroadAccountId
​string · required

Ledger account ID for sales abroad (Rubric C). Must carry a sales-valid VAT code.

domesticWithoutVatAccountId
​string · required

Ledger account ID for domestic sales without VAT.

description
​string

Optional description

Example: Products for office use

Create a product group › Responses

Product group created successfully

ProductGroupResponse
id
​string · required

The unique identifier of the product group

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

Unique product-group number within the company

Example: PG001
name
​string · required

Name of the product group

Example: Office Supplies
domesticAccountId
​string · required

Ledger account ID for domestic sales

Example: 550e8400-e29b-41d4-a716-446655440000
createdAt
​string · date-time · required

When the product group was created

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

When the product group was last updated

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

Optional description

Example: Products for office use
domesticAccountNumber
​number | null

Domestic account number

Example: 1010
domesticAccountName
​string | null

Domestic account name

Example: Sales — domestic
euAccountId
​string | null

Ledger account ID for EU sales (Rubric B)

euAccountNumber
​number | null

EU account number

euAccountName
​string | null

EU account name

abroadAccountId
​string | null

Ledger account ID for sales abroad (Rubric C)

abroadAccountNumber
​number | null

Abroad account number

abroadAccountName
​string | null

Abroad account name

domesticWithoutVatAccountId
​string | null

Ledger account ID for domestic sales without VAT

domesticWithoutVatAccountNumber
​number | null

Domestic-without-VAT account number

domesticWithoutVatAccountName
​string | null

Domestic-without-VAT account name

productCount
​number

Number of products in this group (list responses only)

Example: 12
POST/v1/product-groups
curl https://api.ledgerbee.com/api/v1/product-groups \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "number": "PG001", "name": "Office Supplies", "description": "Products for office use", "domesticAccountId": "550e8400-e29b-41d4-a716-446655440000", "euAccountId": "euAccountId", "abroadAccountId": "abroadAccountId", "domesticWithoutVatAccountId": "domesticWithoutVatAccountId" }'
Example Request Body
{ "number": "PG001", "name": "Office Supplies", "description": "Products for office use", "domesticAccountId": "550e8400-e29b-41d4-a716-446655440000", "euAccountId": "euAccountId", "abroadAccountId": "abroadAccountId", "domesticWithoutVatAccountId": "domesticWithoutVatAccountId" }
json
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "number": "PG001", "name": "Office Supplies", "description": "Products for office use", "domesticAccountId": "550e8400-e29b-41d4-a716-446655440000", "domesticAccountNumber": 1010, "domesticAccountName": "Sales — domestic", "euAccountId": "euAccountId", "euAccountNumber": 0, "euAccountName": "euAccountName", "abroadAccountId": "abroadAccountId", "abroadAccountNumber": 0, "abroadAccountName": "abroadAccountName", "domesticWithoutVatAccountId": "domesticWithoutVatAccountId", "domesticWithoutVatAccountNumber": 0, "domesticWithoutVatAccountName": "domesticWithoutVatAccountName", "productCount": 12, "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z" }
json
application/json

Get a product group

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

Returns a single product group, including its sales-account mappings (domestic, EU, abroad, and domestic-without-VAT).

Required Scope

  • products-read

Get a product group › path Parameters

productGroupId
​string · required

Product group ID

Get a product group › Responses

Product group details

ProductGroupResponse
id
​string · required

The unique identifier of the product group

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

Unique product-group number within the company

Example: PG001
name
​string · required

Name of the product group

Example: Office Supplies
domesticAccountId
​string · required

Ledger account ID for domestic sales

Example: 550e8400-e29b-41d4-a716-446655440000
createdAt
​string · date-time · required

When the product group was created

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

When the product group was last updated

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

Optional description

Example: Products for office use
domesticAccountNumber
​number | null

Domestic account number

Example: 1010
domesticAccountName
​string | null

Domestic account name

Example: Sales — domestic
euAccountId
​string | null

Ledger account ID for EU sales (Rubric B)

euAccountNumber
​number | null

EU account number

euAccountName
​string | null

EU account name

abroadAccountId
​string | null

Ledger account ID for sales abroad (Rubric C)

abroadAccountNumber
​number | null

Abroad account number

abroadAccountName
​string | null

Abroad account name

domesticWithoutVatAccountId
​string | null

Ledger account ID for domestic sales without VAT

domesticWithoutVatAccountNumber
​number | null

Domestic-without-VAT account number

domesticWithoutVatAccountName
​string | null

Domestic-without-VAT account name

productCount
​number

Number of products in this group (list responses only)

Example: 12
GET/v1/product-groups/{productGroupId}
curl https://api.ledgerbee.com/api/v1/product-groups/:productGroupId \ --header 'x-api-key: <api-key>'
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "number": "PG001", "name": "Office Supplies", "description": "Products for office use", "domesticAccountId": "550e8400-e29b-41d4-a716-446655440000", "domesticAccountNumber": 1010, "domesticAccountName": "Sales — domestic", "euAccountId": "euAccountId", "euAccountNumber": 0, "euAccountName": "euAccountName", "abroadAccountId": "abroadAccountId", "abroadAccountNumber": 0, "abroadAccountName": "abroadAccountName", "domesticWithoutVatAccountId": "domesticWithoutVatAccountId", "domesticWithoutVatAccountNumber": 0, "domesticWithoutVatAccountName": "domesticWithoutVatAccountName", "productCount": 12, "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z" }
json
application/json

Delete a product group

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

Deletes a product group.

Required Scope

  • products-write

Delete a product group › path Parameters

productGroupId
​string · required

Product group ID

Delete a product group › Responses

Product group deleted successfully

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

Update a product group

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

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

Required Scope

  • products-write

Update a product group › path Parameters

productGroupId
​string · required

Product group ID

Update a product group › Request Body

UpdateProductGroupRequest
number
​string

Unique product-group number within the company

Example: PG001
name
​string

Name of the product group

Example: Office Supplies
description
​string

Optional description

Example: Products for office use
domesticAccountId
​string

Ledger account ID for domestic sales

euAccountId
​string

Ledger account ID for EU sales (Rubric B)

abroadAccountId
​string

Ledger account ID for sales abroad (Rubric C)

domesticWithoutVatAccountId
​string

Ledger account ID for domestic sales without VAT

Update a product group › Responses

Product group updated successfully

ProductGroupResponse
id
​string · required

The unique identifier of the product group

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

Unique product-group number within the company

Example: PG001
name
​string · required

Name of the product group

Example: Office Supplies
domesticAccountId
​string · required

Ledger account ID for domestic sales

Example: 550e8400-e29b-41d4-a716-446655440000
createdAt
​string · date-time · required

When the product group was created

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

When the product group was last updated

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

Optional description

Example: Products for office use
domesticAccountNumber
​number | null

Domestic account number

Example: 1010
domesticAccountName
​string | null

Domestic account name

Example: Sales — domestic
euAccountId
​string | null

Ledger account ID for EU sales (Rubric B)

euAccountNumber
​number | null

EU account number

euAccountName
​string | null

EU account name

abroadAccountId
​string | null

Ledger account ID for sales abroad (Rubric C)

abroadAccountNumber
​number | null

Abroad account number

abroadAccountName
​string | null

Abroad account name

domesticWithoutVatAccountId
​string | null

Ledger account ID for domestic sales without VAT

domesticWithoutVatAccountNumber
​number | null

Domestic-without-VAT account number

domesticWithoutVatAccountName
​string | null

Domestic-without-VAT account name

productCount
​number

Number of products in this group (list responses only)

Example: 12
PATCH/v1/product-groups/{productGroupId}
curl https://api.ledgerbee.com/api/v1/product-groups/:productGroupId \ --request PATCH \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "number": "PG001", "name": "Office Supplies", "description": "Products for office use", "domesticAccountId": "domesticAccountId", "euAccountId": "euAccountId", "abroadAccountId": "abroadAccountId", "domesticWithoutVatAccountId": "domesticWithoutVatAccountId" }'
Example Request Body
{ "number": "PG001", "name": "Office Supplies", "description": "Products for office use", "domesticAccountId": "domesticAccountId", "euAccountId": "euAccountId", "abroadAccountId": "abroadAccountId", "domesticWithoutVatAccountId": "domesticWithoutVatAccountId" }
json
Example Responses
{ "id": "550e8400-e29b-41d4-a716-446655440000", "number": "PG001", "name": "Office Supplies", "description": "Products for office use", "domesticAccountId": "550e8400-e29b-41d4-a716-446655440000", "domesticAccountNumber": 1010, "domesticAccountName": "Sales — domestic", "euAccountId": "euAccountId", "euAccountNumber": 0, "euAccountName": "euAccountName", "abroadAccountId": "abroadAccountId", "abroadAccountNumber": 0, "abroadAccountName": "abroadAccountName", "domesticWithoutVatAccountId": "domesticWithoutVatAccountId", "domesticWithoutVatAccountNumber": 0, "domesticWithoutVatAccountName": "domesticWithoutVatAccountName", "productCount": 12, "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z" }
json
application/json

MetersProduct Prices