โณ GET /compute_total_due_within_days
Returns the total amount due for a given account (and its children) within the next specified number of days.
๐ Summary
- Method:
GET
- URL:
/compute_total_due_within_days
- Auth: Required
- Tag:
accounts
๐ Headers
Authorization: Bearer <your-token>
Content-Type: application/json
๐ค Request Parameters
Name | Type | Required | Description |
---|---|---|---|
uuid |
string | โ | UUID of the account to evaluate |
days |
number | โ | Number of days to look ahead when summing due amounts |
๐ฅ Example Request
GET /compute_total_due_within_days?uuid=acc-2024-456&days=30
โ Success Response
{
"success": true,
"status": 200,
"uuid": "acc-2024-456",
"total_due": 1700.25,
"within_days": 30,
"start_time": "2025-07-10T13:25:14.882Z",
"end_time": "2025-07-10T13:25:14.944Z",
"execution_time": 0.06
}
โ Failure Response Examples
Status | Reason |
---|---|
400 |
UUID or days parameter missing |
400 |
Invalid value for days (e.g. negative) |
403 |
Unauthorized |
404 |
Account not found |
500 |
Internal server error |
๐ง Notes - Internally uses account$compute_total_due_within_n_days(days). - days = 0 means today only. - Useful for dashboards and forecasting panels showing โAmount Due in Next 7, 14, or 30 Daysโ.
๐ Sponsors
Support my work through GitHub Sponsors!