curl --request GET \
--url https://api.royalti.io/accounting/gettotaldue \
--header 'Authorization: Bearer <token>'{
"message": "success",
"totalGross": 150000.5,
"totalPaid": 100000,
"totalDue": 50000.5,
"userCount": 125,
"metadata": {
"calculationMethod": "cached",
"calculationTime": 45,
"dataAvailability": "complete",
"fallbackReason": null
}
}Get Total Due Amount
curl --request GET \
--url https://api.royalti.io/accounting/gettotaldue \
--header 'Authorization: Bearer <token>'{
"message": "success",
"totalGross": 150000.5,
"totalPaid": 100000,
"totalDue": 50000.5,
"userCount": 125,
"metadata": {
"calculationMethod": "cached",
"calculationTime": 45,
"dataAvailability": "complete",
"fallbackReason": null
}
}| Parameter | Type | Description |
|---|---|---|
| method | string | Calculation method to use (cache, bigquery, auto) |
const response = await fetch('https://api.royalti.io/accounting/gettotaldue', {
method: 'GET',
headers: {
'Authorization': `Bearer ${token}`,
},
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Calculation method to use for retrieving totals
cache, bigquery, auto 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
Show child attributes