Usage & quota

Eagle Doc gives a business two complementary views of its consumption: the rolled-up total across all clients, and a per-client breakdown. Both read from the same underlying counters — they differ only in how usage is grouped and which credential you use.

Data plane · APIB- key
Rolled-up totals

Call the usual /api/usage/v1/* endpoints with a business API key. You receive the business’s combined quota and usage across all clients — exactly what is billed against the subscription.

Management API · real-user token
Per-client breakdown

Call the business management API (or open the dashboard) to split usage by client, with one row per sub-business plus a row for the main business’s own usage.

Which view do I get?

An APIB-… key on /api/usage/v1/* always returns the business’s rolled-up totals (all clients combined). To see how usage splits per client, use the breakdown endpoint or the dashboard.

Rolled-up business usage

The existing usage endpoints work unchanged with a business key. Authenticate with your APIB-… key in the api-key header and you receive the business’s combined counters — every client’s pages summed into one quota.

Read the current billing month with a business key:

curl --location 'https://de.eagle-doc.com/api/usage/v1/current' \
  --header 'api-key: APIB-your-business-key'
import requests

resp = requests.get(
    "https://de.eagle-doc.com/api/usage/v1/current",
    headers={"api-key": "APIB-your-business-key"},
)
print(resp.json())
const resp = await fetch("https://de.eagle-doc.com/api/usage/v1/current", {
  headers: { "api-key": "APIB-your-business-key" },
});
console.log(await resp.json());
Parameters
Name Description
api-key (header) A business API key (APIB-…). The response is rolled up across all of the business’s clients.
Responses
Code Description
200 OK — the business’s combined usage for the current billing month.
Field Name Description
currentMonthThe billing month in YYYY-MM format.
contractQuotaPages included by the business contract.
quotaUsedPages processed so far this month across all clients.
overUsageAllowedWhether usage may exceed contractQuota.
hardLimitA ceiling above which no more pages are processed (may be null).
overUsagePages beyond the contract quota (quotaUsed - contractQuota).
pricePerPageOverUsageAgreed price per over-usage page.
overUsageCostoverUsage × pricePerPageOverUsage.
{
    "currentMonth": "2026-07",
    "contractQuota": 1000,
    "quotaUsed": 143,
    "overUsageAllowed": false,
    "hardLimit": 2000,
    "overUsage": 0,
    "pricePerPageOverUsage": 0.0,
    "overUsageCost": 0.0
}
403 BadCredentialException — the API key is missing or invalid.
500 InternalServerErrorException — something went wrong for an unknown reason.

GET /api/usage/v1/monthly returns past quota periods, and GET /api/usage/v1/logs returns a per-request log. Called with a business key, both are rolled up across all clients.

These endpoints share the exact field shapes of the personal usage API. See the full usage & quota reference for every field.

Per-client breakdown

To split usage by client, call the business management API. It returns one row per client (sub-business), so you can bill, report or reconcile per client while everything still rolls up to the one subscription.

Requires a real-user token

These endpoints live under /api/business/** and require a real-user token — a personal API-… key or a signed-in dashboard session — with at least the MEMBER role. Business APIB-… keys are rejected.

Parameters
Name Description
businessId (path) The id of your business.
period (query) current for the ongoing billing month, or a past month as YYYY-MM.
api-key (header) A real-user token: a personal API-… key (or dashboard session) with role MEMBER or higher. APIB-… keys are rejected.
Responses
Code Description
200 OK — an array of per-client usage rows for the requested period.
Field Name Description
subBusinessIdThe client’s id. An empty string marks the main business’s own usage.
subBusinessNameThe client’s display name. Deleted clients appear as (deleted sub-business).
externalClientRefYour own client reference (the x-sub-business-ref you sent), if any.
pagesPages processed for this client (may be fractional).
pageCreditsBilled page credits for this client.
requestsNumber of requests made for this client.
[
    {
        "subBusinessId": "",
        "subBusinessName": "Acme GmbH",
        "externalClientRef": "",
        "pages": 40.0,
        "pageCredits": 52,
        "requests": 12
    },
    {
        "subBusinessId": "66cc...",
        "subBusinessName": "Client A",
        "externalClientRef": "CRM-1001",
        "pages": 103.0,
        "pageCredits": 130,
        "requests": 31
    }
]
403 A business APIB-… key was used, or the token lacks the MEMBER role. The error body follows the standard shape (httpCode, httpCodeName, messageCode, message, messageDetails, data).
500 InternalServerErrorException — something went wrong for an unknown reason.

The row whose subBusinessId is an empty string is the main business’s own usage (documents processed without a client tag). Every other row is one of your clients.

The business management API also exposes GET /api/business/{businessId}/usage/current, …/logs and …/monthly — the same shapes as the personal usage API, scoped to the whole business. The logs endpoint accepts ?subBusinessId=, &start=, &end=, &page= and &size= filters to drill into a single client or date range.

In the dashboard

Prefer a visual view? Open Business → Usage in the dashboard. It shows the same numbers as the API:

  • A quota card with the business’s contract allowance and pages used this month.
  • A per-client breakdown with a period selector to switch between the current month and past months.
  • A logs table with a client filter and a “By” column showing who made each request — a member name or “API key”.
Rolled-up vs. per-client, at a glance

The data-plane /api/usage/v1/* endpoints with an APIB-… key give you the rolled-up total; the breakdown endpoint and the dashboard give you the per-client split.

Support

We are here to help

Building your multi-client integration and something is unclear? We are glad to help so your project succeeds.

Reach us at support@eagle-doc.com