Diary entries

Download diary entries as a PDF

The diary entries matching the **same filters as `GET /diary-entries`**, as one PDF: for sharing a day's site record (defects, rectification work) with people who aren't on FOREMAN. "What you see is what you download" — the web app's **Export → Download PDF** menu item sends the browse's current filters to the same report. Contents: the business name/logo, the project (or "N projects"), the date span, a summary (entries · hours · people · photos), then entries grouped **project → day**, earliest first — each with the crew member, the shift's times in the site's timezone (or "Entered by hand"), hours, "Logged by … for …" where it applies, the full description, and its photos **two per row**. A range that reaches today is marked as possibly incomplete. API downloads are stamped "Generated via the FOREMAN API". Limits keep the file small enough to email: at most **300 entries** and **120 photos** (photos are embedded resized, ~800px). Over either, or with no matching entries, the call answers `422`; the message names the limit and the count (e.g. "Too many photos for one PDF: this view has 164, the limit is 120. Add filters …"). The key is Admin-equivalent, so every project is downloadable (signed-in web users need to manage every project in the view — an Admin, or that site's Site Manager). Like `GET /diary-entries`, this read closes expired shifts first. The response is **streamed** (`Content-Disposition: attachment`). Not on MCP by design: `list_diary_entries` gives an assistant the same data; the PDF is only a presentation of it.

GET
/diary-entries/pdf

The diary entries matching the same filters as GET /diary-entries, as one PDF: for sharing a day's site record (defects, rectification work) with people who aren't on FOREMAN. "What you see is what you download" — the web app's Export → Download PDF menu item sends the browse's current filters to the same report.

Contents: the business name/logo, the project (or "N projects"), the date span, a summary (entries · hours · people · photos), then entries grouped project → day, earliest first — each with the crew member, the shift's times in the site's timezone (or "Entered by hand"), hours, "Logged by … for …" where it applies, the full description, and its photos two per row. A range that reaches today is marked as possibly incomplete. API downloads are stamped "Generated via the FOREMAN API".

Limits keep the file small enough to email: at most 300 entries and 120 photos (photos are embedded resized, ~800px). Over either, or with no matching entries, the call answers 422; the message names the limit and the count (e.g. "Too many photos for one PDF: this view has 164, the limit is 120. Add filters …"). The key is Admin-equivalent, so every project is downloadable (signed-in web users need to manage every project in the view — an Admin, or that site's Site Manager).

Like GET /diary-entries, this read closes expired shifts first. The response is streamed (Content-Disposition: attachment).

Not on MCP by design: list_diary_entries gives an assistant the same data; the PDF is only a presentation of it.

Authorization

x-api-key<token>

The per-tenant API key, copied from Settings → API & integrations. Sent as the x-api-key request header. The key is tenant-scoped and acts with Admin-equivalent, tenant-wide access.

In: header

Query Parameters

projectId?array<>

Filter by project id (repeatable).

userId?array<>

Filter by crew-member user id (repeatable).

from?string

Inclusive start of the entry-date range (YYYY-MM-DD).

to?string

Inclusive end of the entry-date range (YYYY-MM-DD).

search?string

Free-text match on description and crew name.

Response Body

application/pdf

application/json

application/json

curl -X GET "https://example.com/diary-entries/pdf"
"string"
{  "error": {    "code": "unauthorized",    "message": "Missing or invalid API key."  }}
{  "error": {    "code": "validation",    "message": "One or more inputs are invalid.",    "fields": {      "fieldName": "A message explaining what's wrong with this field."    }  }}