Reports & exports
Generate Report
Builds a standard or custom CSV report over people, time-off, expense, invoice or compensation rows with filters.
Not available to API keys yet. It will need reports:write.
curl --request POST \
--url 'https://api.toku.com/hris/generate-report' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"reportId": "string",
"columns": [
"string"
],
"customReportBase": "people",
"filters": [
{
"field": "string",
"operator": "equals",
"values": [
"string"
]
}
],
"exportName": "string",
"asOfDate": "string"
}'{
"csv": "string",
"filename": "string",
"rowCount": 0,
"truncated": true,
"totalRowCount": 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.
Body
application/json
reportIdstringrequiredcolumnsstring[]customReportBasestringAvailable options: people, time_off, expense, invoice, compensation
filtersobject[]NOTE(ck): default [] is not expressible here, so this field is optional; TGA applies the default
Allowed: at most 25 items
Show child attributes
fieldstringrequiredAllowed: 1 to 120 characters
operatorstringrequiredAvailable options: equals, not_equals, contains, not_contains, in, not_in, gt, gte, lt, lte, is_empty, is_not_empty
valuesstring[]Allowed: at most 500 items
exportNamestringAllowed: at most 120 characters
asOfDatestringAllowed: matches ^\d{4}-\d{2}-\d{2}$
Response
200Successful response
csvstringrequiredfilenamestringrequiredrowCountintegerrequiredAllowed: at least 0
truncatedbooleantotalRowCountintegerAllowed: at least 0