πŸ’° GET /compute_total_due

Returns the total amount due for a given account including its children and descendants.


πŸ“Œ Summary

  • Method: GET
  • URL: /compute_total_due
  • 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 due for

πŸ“₯ Example Request

GET /compute_total_due?uuid=acc-2024-456

βœ… Success Response

{
  "success": true,
  "status": 200,
  "uuid": "acc-2024-456",
  "total_due": 3400.50,
  "start_time": "2025-07-10T13:11:05.123Z",
  "end_time": "2025-07-10T13:11:05.189Z",
  "execution_time": 0.07
}

❌ Failure Response Examples

Status Reason
400 Missing or invalid UUID
403 Unauthorized to access the account
404 Account not found
500 Internal server error

🧠 Notes

  • Internally calls account$compute_total_due(), which traverses down the account hierarchy.
  • This endpoint is useful for summarizing all upcoming obligations related to a specific category like β€œUtilities” or β€œLoans”.
  • It performs a read-only operation β€” no locking needed.

πŸ’– Sponsors

Support my work through GitHub Sponsors!

GitHub Sponsors