Get Total Due Amount
Get Total Due Amount
Description
Get Total Due Amount Retrieve the total amount due across all tenant users (excluding the tenant owner). This endpoint now supports multiple calculation methods for optimal performance:- cache: Uses the UserAccounting table cache for fast retrieval (10-50ms)
- bigquery: Uses BigQuery for comprehensive calculation (500-2000ms)
- auto: Automatically tries cache first, falls back to BigQuery if needed (default)
- Required role:
adminor higher
Code Examples
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Query Parameters
Calculation method to use for retrieving totals
cache, bigquery, auto Response
Total due amount retrieved successfully
"success"
Total gross earnings across all users
150000.5
Total amount already paid to users
100000
Total amount currently due to users
50000.5
Number of users included in the calculation
125
Additional information about the calculation
Stage-2 addition (attribution unallocated-revenue spec).
Gross vs allocated (payable) vs unallocated (gap +
unresolved) revenue from the tenant's latest committed
attribution run. Absent/null when the tenant has
never committed a run, or when the read failed (see
unallocatedError) — the rest of the total-due figures
are still returned in either case.
Set instead of unallocated when the Stage-2 read
itself failed. Distinguishes "engine never ran for this
tenant" (both fields absent) from "the read broke"
(this field carries the error message).