π° 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!