# Schedule, takt and deviations

> An integration reads the project's zones, schedule imports and tasks, the takt board, zone handoffs and deviations.

An integration, such as a site management system or a reporting tool, can read what the app shows on the *Takt board*: the project's zones, the installation tasks read from its models, the board of a day, a zone's handoffs and their defects, and the deviation report with its CSV file.

Everything on this page is a read. The schedule comes from the models: it is read from a model's `[4D]Task` properties or its `IfcTask` entities each time a version is ingested, so an integration changes it by [uploading a new model version](/en/integrations/models/). Marking a zone's work done, receiving, returning, approving and reopening it attest work; see [Hand off a zone](/en/integrations/inspections-and-verdicts/#hand-off-a-zone).

## What it needs

| Operation | Scope | Project role |
|:----------|:------|:-------------|
| Every read on this page | `schedule:read` (or `read`) | viewer |
| The deviation CSV file | `schedule:read` (or `read`) | admin |

`schedule:read` alone gives the viewer role. The admin role for the CSV comes from a scope that gives it, such as `models:write`. The organisation's admin picks the scopes; see [Create an integration](/en/integrations/create-an-integration/). Then get an [access token](/en/integrations/get-an-access-token/) that carries them.

The project's organisation must use the features the app needs: the *Takt board* for zones, the board, handoffs and deviations, and the schedule for schedule imports, tasks and element facts. A project without them answers `403 FEATURE_OFF`, and the lists name it in `skipped_projects` with `FEATURE_OFF`.

## Collect zones, imports and tasks

Three lists work like every other list: windows, cursors and deletions as in [Collect changes in a window](/en/integrations/collect-changes/).

```sh
curl "https://api.whatsbuilt.fi/v1/schedule-tasks?project_id=$PROJECT&modified_from=2026-11-19T00:00:00%2B02:00&modified_to=2026-11-20T00:00:00%2B02:00" \
  -H "Authorization: Bearer $TOKEN"
```

```json
{ "data": [ { "id": "5f1c…", "project_id": "…", "model_id": "9b2e…", "source": "ifc_properties", "name": "Seinät - 1. krs", "work_name": "Seinät",
              "start_date": "2026-11-02", "finish_date": "2026-11-06", "task_type": "INSTALLATION", "sequence": 1, "ifc_guid": null,
              "zone_id": "c4d0…", "archived_at": null, "changed_at": "2026-11-19T08:14:03.512844+00:00", "deleted": false } ],
  "window": { "modified_from": "2026-11-18T22:00:00.000000+00:00", "modified_to": "2026-11-19T22:00:00.000000+00:00" },
  "skipped_projects": [], "next_cursor": null }
```

- `GET /v1/zones`: the zones, today one per storey of the project's models, with `label`, `sort_key` and `element_count`. A zone left without live elements is a change with `archived_at`, not a deletion.
- `GET /v1/schedule-imports`: one row per schedule read from a model version, with `source` and `summary`. When a later version brings a new import, the previous one is a change with `superseded_at`.
- `GET /v1/schedule-tasks`: the tasks. A task keeps its id and `changed_at` across imports while its fields stay the same; one that a later import no longer has is a change with `archived_at`. `work_name` is the task name without the zone, the board's row, and `zone_id` the zone most of its elements are in.

Deleting a model deletes its imports and tasks, which come as deletions. `model_id` filters imports and tasks.

## Read the board and a zone

These reads are snapshots: the answer is read when asked and has no `changed_at` or deletions. Read them again for the current state.

| Read | What it answers |
|:-----|:----------------|
| `GET /v1/projects/{projectId}/zone-scheme` | The live zones in the app's order and the count of elements in no zone |
| `GET /v1/projects/{projectId}/zones/{zoneId}/elements` | A zone's GlobalIds, paged with `cursor` |
| `GET /v1/projects/{projectId}/schedule-tasks/{taskId}/elements` | A task's elements, paged with `cursor`; `effective` marks the link progress reads |
| `GET /v1/projects/{projectId}/schedule-element-facts` | Per element its installation task and its installed, passed and defect days, in columns, at most 2,000 elements a page; `limit` and `cursor` page it, and each page names only the tasks of its own elements |
| `GET /v1/projects/{projectId}/takt-board?date=2026-11-19` | The board of a day: zones × work names with installed, inspected and open-defect counts and the handoff state |
| `GET /v1/projects/{projectId}/handoffs/{zoneId}` | A zone's tasks with their handoff states, the latest handoffs and their defects; `task_id` or `work_name` narrows it to one task or one row |

Days are `YYYY-MM-DD` in Finnish time. The board is today's without `date`.

A handoff names who recorded it in `actor_name` and their organisation in `account_name`. When an integration or an app recorded it through the REST API, `created_via` is `integration` or `app`, `via_client_id` the integration's id or the app's client id, and `via_client_name` the app's registered name; the app shows it as *Integration · {name}* or *{person} · via {app}*. `may_record_done` and `may_receive` say what the integration's project role allows.

## Deviations

`GET /v1/projects/{projectId}/deviations` answers failed checks, findings, returns and late installs of a date range: totals and one page of groups by zone, organisation or element, or with `by=deviation` the deviations themselves.

```sh
curl "https://api.whatsbuilt.fi/v1/projects/$PROJECT/deviations?from=2026-11-01&to=2026-11-19&by=deviation" \
  -H "Authorization: Bearer $TOKEN"
```

Without `from` and `to` the range is the 30 days ending today. Only `next_cursor = null` ends the pages; pass it as `cursor`.

`GET /v1/projects/{projectId}/deviations.csv` answers the same CSV file as the app's export, one row per deviation, to a project admin:

```sh
curl -o deviations.csv "https://api.whatsbuilt.fi/v1/projects/$PROJECT/deviations.csv?from=2026-11-01&to=2026-11-19" \
  -H "Authorization: Bearer $TOKEN"
```

A project writes at most 20 of these files an hour, from the app and the API together; more answers `429` with `Retry-After`. A range too large to build within 20 seconds answers `400 VALIDATION_ERROR` and writes no file: page through the report with `by=deviation` instead.

## Errors

| Status | Code | When |
|:-------|:-----|:-----|
| `400` | `VALIDATION_ERROR` | A malformed id or day, `from` after `to`, or a CSV range too large to build in time |
| `400` | `INVALID_CURSOR` | A cursor that does not belong to the list |
| `403` | `INSUFFICIENT_SCOPE` | The token lacks `schedule:read` |
| `403` | `INSUFFICIENT_PROJECT_ROLE` | The project is not the integration's, or the CSV without the admin role |
| `403` | `FEATURE_OFF` | The project's organisation does not use the *Takt board* or the schedule |
| `404` | `NOT_FOUND` | No such zone or live task |
| `429` | `RATE_LIMITED` | The CSV files of the hour are used up |

Every error code is on [Errors and limits](/en/integrations/errors-and-limits/) and the fields in the [API reference](/en/api-reference/operations/listscheduletasks/).
