Expenses

Get Hris Expense Analytics

Expense analytics for the Expenses page: spend by month, category, person and country in one currency, with the previous period's spend and the average time to approve.

GEThttps://api.toku.com/hris/get-hris-expense-analytics

Required scope: expenses:read

curl --request GET \
  --url 'https://api.toku.com/hris/get-hris-expense-analytics' \
  --header 'Authorization: Bearer <token>'
200 response
{
  "period": "LAST_3_MONTHS",
  "from": "string",
  "to": "string",
  "currencies": [
    {
      "currencyCode": "string",
      "amount": "string",
      "count": 0
    }
  ],
  "currencyCode": "string",
  "totals": {
    "spend": "string",
    "previousSpend": "string",
    "pending": "string",
    "approved": "string",
    "reimbursed": "string",
    "count": 0,
    "people": 0
  },
  "months": [
    {
      "month": "string",
      "amount": "string"
    }
  ],
  "categories": [
    {
      "hrisExpenseCategoryID": "string",
      "name": "string",
      "amount": "string",
      "count": 0
    }
  ],
  "people": [
    {
      "roleInOrgID": "string",
      "name": "string",
      "amount": "string",
      "count": 0
    }
  ],
  "countries": [
    {
      "countryCode": "string",
      "amount": "string",
      "count": 0
    }
  ],
  "approval": {
    "averageHours": 0,
    "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.

Query parameters

periodstring

Available options: LAST_3_MONTHS, LAST_12_MONTHS, YEAR_TO_DATE, LAST_YEAR

currencyCodestring

NOTE(ck): a .transform() rule is not mirrored here; TGA still enforces it

Allowed: 1 to 10 characters, matches ^[A-Za-z0-9]+$

Response

200Successful response
periodstringrequired

Available options: LAST_3_MONTHS, LAST_12_MONTHS, YEAR_TO_DATE, LAST_YEAR

fromstringrequired
tostringrequired
currenciesobject[]required
Show child attributes
currencyCodestringrequired
amountstringrequired
countnumberrequired
currencyCodestring | nullrequired
totalsobjectrequired
Show child attributes
spendstringrequired
previousSpendstringrequired
pendingstringrequired
approvedstringrequired
reimbursedstringrequired
countnumberrequired
peoplenumberrequired
monthsobject[]required
Show child attributes
monthstringrequired
amountstringrequired
categoriesobject[]required
Show child attributes
hrisExpenseCategoryIDstring | nullrequired
namestringrequired
amountstringrequired
countnumberrequired
peopleobject[]required
Show child attributes
roleInOrgIDstringrequired
namestringrequired
amountstringrequired
countnumberrequired
countriesobject[]required
Show child attributes
countryCodestring | nullrequired
amountstringrequired
countnumberrequired
approvalobjectrequired
Show child attributes
averageHoursnumber | nullrequired
countnumberrequired
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits