Cached analytical report
const url = 'https://api.flotera.com/api/v1/reports/earnings?window=7d&days=30&period=mtd';const options = { method: 'GET', headers: {cookie: '__Host-erm_session=<__Host-erm_session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.flotera.com/api/v1/reports/earnings?window=7d&days=30&period=mtd' \ --cookie __Host-erm_session=<__Host-erm_session>Report cache in front of ClickHouse/PG, keyed by
report_version + tenant + kind + normalized_params_hash + data_watermark
with distributed single-flight on cache miss. Parameter applicability:
earnings:window(7d/14d/30d) — daily gross/fees/net per source;rates:days(1–90) — per-source rates, daily series, utilization;summary:period(mtd/14d/30d) — totals and per-source split;marketplaces: no parameters — 30-day marketplace revenue.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Report kind (first-wave set).
Header Parameters
Section titled “Header Parameters”Return 304 Not Modified when the entity tag still matches.
Query Parameters
Section titled “Query Parameters”For kind=earnings.
For kind=rates.
For kind=summary.
Responses
Section titled “Responses”Report snapshot.
Report envelope; data shape depends on kind.
object
When this snapshot was computed.
Source watermark the snapshot is based on.
Snapshot form version (cache-shape version).
True when serving stale-while-revalidate data.
Daily earnings per source for the revenue chart and earning mix.
object
object
UTC calendar day.
Decimal string or null when unknown.
Decimal string or null when unknown.
Decimal string or null when unknown.
Decimal value serialized as a string, never a JSON number.
Decimal string or null when unknown.
Per-source rates, daily series and utilization over the window.
object
object
Decimal value serialized as a string, never a JSON number.
Decimal value serialized as a string, never a JSON number.
Decimal value serialized as a string, never a JSON number.
Decimal value serialized as a string, never a JSON number.
Decimal string or null when unknown.
object
UTC calendar day.
Decimal string or null when unknown.
Decimal string or null when unknown.
Decimal value serialized as a string, never a JSON number.
Decimal string or null when unknown.
object
UTC calendar day.
Share of OBSERVED time the cards were earning, not the share of cards that earned at all. A card busy two hours out of twenty-four is 8%, not 100% — the earlier reading turned a short rental into a fully loaded fleet.
Numerator of utilization_pct. A watched day with no rental reports 0, NOT null: zero is an answer and must stay in any sum. Reading it as “unknown” and dropping the day takes its observed hours out of the denominator too, and the average is then computed over earning days alone — on the stand that showed 28% for a week whose true figure was 6%.
Denominator of utilization_pct. Observed rather than calendar hours: an hourly bucket exists only where samples arrived, so a partial day or an offline gap does not read as idleness.
Account-wide totals for the period with a per-source split.
object
Decimal value serialized as a string, never a JSON number.
Decimal value serialized as a string, never a JSON number.
Decimal string or null when unknown.
Decimal string or null when unknown.
Decimal value serialized as a string, never a JSON number.
Net USD keyed by source (vast/clore/mining).
object
Decimal value serialized as a string, never a JSON number.
30-day marketplace revenue and connection status.
object
object
Decimal value serialized as a string, never a JSON number.
Example
{ "generated_at": "2026-07-25T10:15:30.123456Z", "data_as_of": "2026-07-25T10:15:30.123456Z", "kind": "earnings", "data": { "window": "7d", "items": [ { "source": "vast", "net_usd": "12.340000" } ] }}Headers
Section titled “Headers”Entity tag of the returned snapshot/resource version.
Not modified; the cached representation is still valid.
Missing/invalid credentials (code=unauthorized).
RFC 9457 problem document with a stable machine code.
object
Stable machine-readable error code (03 §2.4).
UUID (v7 for new entities; v4 accepted during migration).
object
JSON Pointer to the offending field.
Example
{ "type": "https://ermeon.com/problems/validation", "code": "unauthorized"}Authenticated but not permitted. code=forbidden — role/scope mismatch; code=feature_not_entitled — the plan does not include the capability; code=account_frozen — the account is frozen and this operation is declared x-ermeon-frozen: deny. The three are deliberately distinct: only the last one is fixed by a top-up (13 §5.6).
RFC 9457 problem document with a stable machine code.
object
Stable machine-readable error code (03 §2.4).
UUID (v7 for new entities; v4 accepted during migration).
object
JSON Pointer to the offending field.
Example
{ "type": "https://ermeon.com/problems/validation", "code": "unauthorized"}Resource does not exist in this tenant. Foreign identifiers also return 404 (anti-enumeration).
RFC 9457 problem document with a stable machine code.
object
Stable machine-readable error code (03 §2.4).
UUID (v7 for new entities; v4 accepted during migration).
object
JSON Pointer to the offending field.
Example
{ "type": "https://ermeon.com/problems/validation", "code": "unauthorized"}Request failed validation (code=validation_failed), with per-field errors.
RFC 9457 problem document with a stable machine code.
object
Stable machine-readable error code (03 §2.4).
UUID (v7 for new entities; v4 accepted during migration).
object
JSON Pointer to the offending field.
Example
{ "type": "https://ermeon.com/problems/validation", "code": "unauthorized"}