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

Meters

Download schema

Meter and usage reporting endpoints


List meter subscriptions by ID

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

Looks up a meter by its UUID and returns the subscriptions (with their products) that can report usage to it — i.e. subscriptions holding a product whose price is linked to this meter. Paused subscriptions are excluded.

Returns an empty subscriptions array when no product price uses the meter. Responds 404 with code METER_NOT_FOUND if the meter does not exist in your company, and 403 with code LICENSE.REQUIRED if your company lacks the Metered Products or Subscription license.

Required Scope

  • meter-report

List meter subscriptions by ID › path Parameters

meterId
​string · required

The unique identifier of the meter

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

List meter subscriptions by ID › Responses

Subscriptions and products that can report usage to this meter

MeterSubscriptionsResponseDTO
meterId
​string · required

Meter ID

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

Meter name

Example: api_calls
​MeterSubscriptionDTO[] · required

Subscriptions with products using this meter

GET/v1/meters/{meterId}/subscriptions
curl https://api.ledgerbee.com/api/v1/meters/:meterId/subscriptions \ --header 'x-api-key: <api-key>'
Example Responses
{ "meterId": "550e8400-e29b-41d4-a716-446655440000", "meterName": "api_calls", "subscriptions": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Enterprise Plan", "status": "active", "products": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "API Calls Package", "productNumber": "PROD-001" } ] } ] }
json
application/json

Report usage

POST
https://api.ledgerbee.com/api
/v1/meters/report
x-api-key (header)

Reports a usage event to a meter for metered subscription billing. Ingestion is asynchronous: a successful report returns 202 with status: queued and a requestId — the event is not yet visible the moment the call returns.

The Idempotency-Key header is required (400 when missing). Replaying a request with the same key returns 200 with status: duplicate and the event is not ingested twice, so retries are always safe.

Use the meter-subscriptions endpoints to discover which subscriptions and products can report usage to a given meter.

Required Scope

  • meter-report

Report usage › Headers

x-api-idempotency-key
​string · required

Idempotency key to deduplicate submissions

Report usage › Request Body

UsageReportRequestDto
value
​number · required

Usage value to record

Example: 100
customerId
​string · required

Customer ID this usage is associated with.

Example: 550e8400-e29b-41d4-a716-446655440000
meterId
​string

Meter identifier. Provide meterId or meterName. Meter must be ACTIVE; usage will be rejected for archived meters.

Example: 550e8400-e29b-41d4-a716-446655440000
meterName
​string

Meter name. Provide meterId or meterName. Meter must be ACTIVE; usage will be rejected for archived meters.

Example: api_calls
timestamp
​string

ISO-8601 timestamp. Defaults to now.

Example: 2024-01-15T10:30:00Z
metadata
​object

Additional metadata for the usage event (values must be string, number, or boolean)

Example: {"region":"us-east-1","feature":"api-calls"}

Report usage › Responses

Duplicate request detected

status
​string
idempotencyKey
​string
POST/v1/meters/report
curl https://api.ledgerbee.com/api/v1/meters/report \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-idempotency-key: <string>' \ --header 'x-api-key: <api-key>' \ --data '{ "meterId": "550e8400-e29b-41d4-a716-446655440000", "meterName": "api_calls", "value": 100, "timestamp": "2024-01-15T10:30:00Z", "customerId": "550e8400-e29b-41d4-a716-446655440000", "metadata": { "region": "us-east-1", "feature": "api-calls" } }'
Example Request Body
{ "meterId": "550e8400-e29b-41d4-a716-446655440000", "meterName": "api_calls", "value": 100, "timestamp": "2024-01-15T10:30:00Z", "customerId": "550e8400-e29b-41d4-a716-446655440000", "metadata": { "region": "us-east-1", "feature": "api-calls" } }
json
Example Responses
{ "status": "duplicate", "idempotencyKey": "idempotencyKey" }
json
application/json

List meter subscriptions by name

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

Looks up a meter by its name (?meterName=) and returns the subscriptions (with their products) that can report usage to it — useful when your integration knows the meter's name (e.g. api_calls) but not its UUID. Paused subscriptions are excluded.

Returns an empty subscriptions array when no product price uses the meter. Responds 400 with code METER_IDENTIFIER_REQUIRED when meterName is missing, 404 with code METER_NOT_FOUND if no meter has that name in your company, and 403 with code LICENSE.REQUIRED if your company lacks the Metered Products or Subscription license.

Required Scope

  • meter-report

List meter subscriptions by name › query Parameters

meterName
​string · required

The name of the meter to look up

List meter subscriptions by name › Responses

Subscriptions and products that can report usage to this meter (lookup by name)

MeterSubscriptionsResponseDTO
meterId
​string · required

Meter ID

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

Meter name

Example: api_calls
​MeterSubscriptionDTO[] · required

Subscriptions with products using this meter

GET/v1/meters/subscriptions
curl 'https://api.ledgerbee.com/api/v1/meters/subscriptions?meterName=<string>' \ --header 'x-api-key: <api-key>'
Example Responses
{ "meterId": "550e8400-e29b-41d4-a716-446655440000", "meterName": "api_calls", "subscriptions": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Enterprise Plan", "status": "active", "products": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "API Calls Package", "productNumber": "PROD-001" } ] } ] }
json
application/json

MCPProduct Groups