Getting started
Pagination and time windows
Response format
{
"data": [ { "id": 1 }, { "id": 2 } ],
"nextCursor": "WyJ2MiIsImNvbXBsZXRpb25zIi…",
"meta": {
"dataset": "task-reports",
"count": 500,
"generatedAt": "2026-12-01T06:00:00.000Z",
"from": "2026-11-24T00:00:00.000Z",
"to": "2026-12-01T00:00:00.000Z"
}
}data: the rows. Each row is flat and has anidthat is stable and unique within its dataset.nextCursor: the cursor for the next page, ornullon the last page.meta.fromandmeta.to: the time window that was applied. For events,tois exclusive.meta.openDayandmeta.timeZone: only fordaily-reports,task-outcomes, andhaccp-incidents. The current business day, which is not over yet, and the time zone in which business days end at 3 a.m.
Load all pages
| Parameter | Meaning | Default |
|---|---|---|
limit | Rows per page, 1 to 1000 | 500 |
cursor | nextCursor of the previous page | – |
Keep requesting pages until nextCursor is null. A page can contain fewer rows than limit, or none at all, even if more pages follow. Only nextCursor tells you when you have reached the end.
The cursor includes the time window of the first page, so you do not need to repeat from and to. It is opaque and valid only for its dataset: pass it on unchanged and do not build your own.
URL="https://www.gastrotodo.de/api/v1/reporting/task-reports"
curl -H "Authorization: Bearer $KEY" "$URL?from=2026-11-01&to=2026-11-30"
curl -H "Authorization: Bearer $KEY" "$URL?cursor=WyJ2MiIsImNvbXBsZXRpb25zIi…"Time windows
| Parameter | Format | Default |
|---|---|---|
from | YYYY-MM-DD or timestamp with time zone | 7 days before to |
to | YYYY-MM-DD or timestamp with time zone | now |
- A date covers the whole UTC day:
from=2026-11-01&to=2026-11-30returns all of November. - A timestamp is applied exactly and must include a time zone:
2026-12-01T06:00:00Zor2026-12-01T07:00:00%2B01:00. In this case,tois exclusive. - A window can span at most 92 days.
daily-reports,task-outcomes, andhaccp-incidentsuse whole business days and accept onlyYYYY-MM-DD. Iftois in the future, the window ends on the current business day. Withoutfromandto, you get the last 7 business days, including the current one.
Incremental loading
Data can change after the fact: a report is corrected or undone, a defect is resolved, a task is completed late. Loading only what is new since your last request would miss these changes. Instead, load an overlapping window and replace it every time:
| Dataset | Load daily | Update the target table |
|---|---|---|
task-reports, haccp-measurements, instruction-acknowledgments, training-completions | Last 7 days | Delete the rows in the window and insert the new ones |
daily-reports, task-outcomes, haccp-incidents | Last 7 days | Delete the rows in the window and insert the new ones |
defects | Last 7 days | Merge by id (MERGE) |
For the other datasets, a MERGE by id would miss deletions: a report that was undone would stay in your data forever. Corrections to HACCP measurements can also affect older days. If you need full accuracy, also reload the last 92 days once a month.
The API also changes retroactively when a task is deleted: its rows disappear from task-outcomes and daily-reports, and its missed and canceled checks from haccp-incidents. Rows in your warehouse that are older than your reload window are not affected. Your figures can then differ from the app for those days.
For a complete example, see BigQuery and Dataform.
