โณ 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!

GitHub Sponsors