| Name | Description |
|---|---|
| api-key (header) | A business API key (APIB-…). The response is rolled up across all of the business’s clients. |
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.
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.
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.
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.
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());
| Name | Description |
|---|---|
| api-key (header) | A business API key (APIB-…). The response is rolled up across all of the business’s clients. |
| Code | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 |
OK — the business’s combined usage for the current billing month.
|
||||||||||||||||||
| 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.
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.
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.
| 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. |
| Code | Description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 |
OK — an array of per-client usage rows for the requested period.
|
||||||||||||||
| 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.
Prefer a visual view? Open Business → Usage in the dashboard. It shows the same numbers as the API:
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.
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
Copyright © S2Tec GmbH