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
AuthorizationstringheaderrequiredBearer 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
periodstringAvailable options: LAST_3_MONTHS, LAST_12_MONTHS, YEAR_TO_DATE, LAST_YEAR
currencyCodestringNOTE(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
periodstringrequiredAvailable options: LAST_3_MONTHS, LAST_12_MONTHS, YEAR_TO_DATE, LAST_YEAR
fromstringrequiredtostringrequiredcurrenciesobject[]requiredShow child attributes
currencyCodestringrequiredamountstringrequiredcountnumberrequiredcurrencyCodestring | nullrequiredtotalsobjectrequiredShow child attributes
spendstringrequiredpreviousSpendstringrequiredpendingstringrequiredapprovedstringrequiredreimbursedstringrequiredcountnumberrequiredpeoplenumberrequiredmonthsobject[]requiredShow child attributes
monthstringrequiredamountstringrequiredcategoriesobject[]requiredShow child attributes
hrisExpenseCategoryIDstring | nullrequirednamestringrequiredamountstringrequiredcountnumberrequiredpeopleobject[]requiredShow child attributes
roleInOrgIDstringrequirednamestringrequiredamountstringrequiredcountnumberrequiredcountriesobject[]requiredShow child attributes
countryCodestring | nullrequiredamountstringrequiredcountnumberrequiredapprovalobjectrequiredShow child attributes
averageHoursnumber | nullrequiredcountnumberrequired400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits