Reports & exports

Generate Report

Builds a standard or custom CSV report over people, time-off, expense, invoice or compensation rows with filters.

POSThttps://api.toku.com/hris/generate-report

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"
}'
200 response
{
  "csv": "string",
  "filename": "string",
  "rowCount": 0,
  "truncated": true,
  "totalRowCount": 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

reportIdstringrequired
columnsstring[]
customReportBasestring

Available 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
fieldstringrequired

Allowed: 1 to 120 characters

operatorstringrequired

Available 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

exportNamestring

Allowed: at most 120 characters

asOfDatestring

Allowed: matches ^\d{4}-\d{2}-\d{2}$

Response

200Successful response
csvstringrequired
filenamestringrequired
rowCountintegerrequired

Allowed: at least 0

truncatedboolean
totalRowCountinteger

Allowed: at least 0

400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits