Expenses

Get Expense Dashboard Metrics

Aggregates non-draft org expense reports into status counts/amounts and spend by category.

POSThttps://api.toku.com/hris/get-expense-dashboard-metrics

Required scope: expenses:read

curl --request POST \
  --url 'https://api.toku.com/hris/get-expense-dashboard-metrics' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "fromDate": "2026-01-01T00:00:00Z",
  "toDate": "2026-01-01T00:00:00Z"
}'
200 response
{
  "totalPending": {
    "count": 0,
    "amount": "string"
  },
  "totalApproved": {
    "count": 0,
    "amount": "string"
  },
  "totalPaid": {
    "count": 0,
    "amount": "string"
  },
  "totalRejected": {
    "count": 0,
    "amount": "string"
  },
  "spendByCategory": [
    {
      "name": "string",
      "amount": "string",
      "count": 0
    }
  ]
}

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is an access token from a Toku sign-in. See Authentication in the API reference.

Body

application/json

fromDatestring<date-time>
toDatestring<date-time>

Response

200Successful response
totalPendingobjectrequired
Show child attributes
countnumberrequired
amountstringrequired
totalApprovedobjectrequired
Show child attributes
countnumberrequired
amountstringrequired
totalPaidobjectrequired
Show child attributes
countnumberrequired
amountstringrequired
totalRejectedobjectrequired
Show child attributes
countnumberrequired
amountstringrequired
spendByCategoryobject[]required
Show child attributes
namestringrequired
amountstringrequired
countnumberrequired
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits