Hi community,
we are currently integrating awork into a billing workflow for property management / professional services and would like to use time reports as the basis for customer-facing timesheets / Leistungsnachweise.
At the moment, we can create and use custom time reports manually in awork, and users can export them as PDF from the UI.
However, as far as we can see in the public API, there is currently no documented way to generate or download a time report as PDF via API.
What we are trying to achieve
We want to automate the following process:
-
Employees track time in awork on projects/tasks
-
We use a custom time report as the basis for a monthly timesheet
-
On a fixed date each month (for example the 3rd), we want to:
-
generate the time report for the previous month
-
export/download it as PDF
-
save it to our document storage / DMS
-
optionally attach it to the awork project
-
use it as supporting document for invoicing
-
Current situation
We found and reviewed the following endpoints:
-
GET /api/v1/timereports -
GET /api/v1/timeentries -
GET /api/v1/timeentries/simplified -
GET /api/v1/projects/:projectId/timeentries -
GET /api/v1/files/:fileId/pdf
From what we understand:
-
timereportslets us access report definitions / filters -
timeentrieslets us fetch the raw time data -
files/:fileId/pdfconverts or returns an existing file as PDF, but does not generate a PDF from a time report
So right now it seems that the only robust option is to:
-
fetch the time entry data via API
-
rebuild the report externally
-
generate the PDF ourselves
That works in principle, but it means we cannot reuse the exact custom report layout users already maintain in awork.