πŸ“ˆ GET /walking_amount

Returns the β€œwalking amount” (cumulative total) of either amount_due or balance for a given account and its children across a date range.


πŸ“Œ Summary

  • Method: GET
  • URL: /walking_amount
  • Tag: accounts

πŸ” Headers

Authorization: Bearer <your-token>
Content-Type: application/json

πŸ“€ Query Parameters

Name Type Required Description
uuid string βœ… UUID of the account
amt_type string ❌ Type of amount to walk: "amount_due" or "balance" (default: "amount_due")
from string ❌ Start date in YYYY-MM-DD format (default: very early date)
to string ❌ End date in YYYY-MM-DD format (default: today)

πŸ“₯ Example Request

GET /walking_amount?uuid=acc-2024-xyz&amt_type=balance&from=2024-01-01&to=2024-12-31

βœ… Success Response

{
  "success": true,
  "status": 200,
  "uuid": "acc-2024-xyz",
  "amt_type": "balance",
  "from": "2024-01-01",
  "to": "2024-12-31",
  "walking_amount": [
    {
      "date": "2024-01-01",
      "value": 0
    },
    {
      "date": "2024-01-15",
      "value": 1200
    },
    {
      "date": "2024-02-01",
      "value": 2000
    }
    // ...
  ],
  "start_time": "2025-07-10T07:00:01.003Z",
  "end_time": "2025-07-10T07:00:01.023Z",
  "execution_time": 0.02
}

❌ Error Responses

Status Cause
400 UUID or date params are missing/invalid
403 Account not found or unauthorized
404 Tree or user not found
500 Internal processing error

🧠 Notes

  • Use amt_type = β€œamount_due” to get cumulative liabilities (default).

  • Use amt_type = β€œbalance” to visualize asset accumulation.

  • Under the hood, uses account$walking_amount(amt_type, daterange).


πŸ’– Sponsors

Support my work through GitHub Sponsors!

GitHub Sponsors