API/Account
Get usage for the current billing period
GET/v1/usage· API key
How much of the plan's allowance has been used this period. Lets a
client, or an agent, check headroom before a batch rather than find
out from a 402. Reading usage is not itself metered.
curl https://api.einvoicing.dev/v1/usage \ -H "Authorization: Bearer $EINVOICING_API_KEY"<?php$client = new GuzzleHttp\Client();$response = $client->request('GET', 'https://api.einvoicing.dev/v1/usage', [ 'headers' => [ 'Authorization' => 'Bearer ' . getenv('EINVOICING_API_KEY'), ],]);$data = json_decode((string) $response->getBody(), true)['data'];req, _ := http.NewRequest(http.MethodGet, "https://api.einvoicing.dev/v1/usage", nil)req.Header.Set("Authorization", "Bearer "+os.Getenv("EINVOICING_API_KEY"))res, err := http.DefaultClient.Do(req)if err != nil { log.Fatal(err)}defer res.Body.Close()const res = await fetch("https://api.einvoicing.dev/v1/usage", { headers: { Authorization: `Bearer ${process.env.EINVOICING_API_KEY}`, },});const { data } = await res.json();Response
200 Usage for the current billing period.
| Field | Type | Description |
|---|---|---|
datarequired | Usage | Usage in the current billing period. |
{ "data": { "plan": "developer", "period_start": "2026-09-01T00:00:00.000Z", "period_end": "2026-10-01T00:00:00.000Z", "documents": { "used": 1412, "included": 2000, "overage": 0 }, "lookups": { "used": 380, "included": 5000, "overage": 0 } }}Errors
Every error is application/problem+json (RFC 9457). Branch on type, which is stable, never on title or detail.
| Status | When |
|---|---|
| 401 | No key, or a key that is unknown or revoked. Problem |
| 429 | Too many requests in a short window. Slow down and retry after the
number of seconds in |
Schemas
Usage
Usage in the current billing period.
| Field | Type | Description |
|---|---|---|
planrequired | string |
|
period_startrequired | Timestamp · date-time | RFC 3339, UTC, millisecond precision. |
period_endrequired | Timestamp · date-time | RFC 3339, UTC, millisecond precision. |
documentsrequired | Meter | One metered allowance. documents counts validations and
conversions together; lookups counts participant lookups.
|
lookupsrequired | Meter | One metered allowance. documents counts validations and
conversions together; lookups counts participant lookups.
|