Outputs is the fixed set Ason generates automatically on close. Reports is the opposite: a catalog you run on demand, filtered to what you need, in whatever format.
The report catalog
- Every payroll has its own catalog, defined by its regulations - list it with
clusterSetName(the built-in frontend always usesAvailableReports) - Each entry (
ReportSet) has areportId, adescriptionof what it shows, and a parameter template for what it needs - Nothing fits? For a payrun period summary specifically, use the ad-hoc query endpoint on Outputs - otherwise get in touch
Running a report
One report, two ways to run it - same reportId, same parameters map either way.
- One parameter can affect another (e.g. a dropdown's options) - re-run
buildafter every parameter change, not just on submit
Interpreting parameters
The parameter template tells you how to build an input for each field, whatever UI you use:
| Field type | UI control |
|---|---|
| boolean | checkbox |
| date | date picker |
input.listSelection | multi-select |
| anything else | text / number |
input.hidden: true | don't show it at all |
language and the report's own date parameter are just regular parameters you set - no requirement to default to the logged-in user's language.
Ason's own frontend is one example built on exactly this: a parameter dialog that only opens when there's something to fill in or more than one output format (otherwise "Generate" runs immediately with defaults, dates defaulting to today), files named <report name>_<date>.<extension>.
API Endpoints
| What | Call |
|---|---|
| List available reports | GET /tenants/{tenantId}/payrolls/{payrollId}/reports |
| Build a report (structured data) | POST /tenants/{tenantId}/payrolls/{payrollId}/reports/{reportId}/build |
| Generate a report (file) | POST /tenants/{tenantId}/payrolls/{payrollId}/reports/{reportId}/generate |
