Appearance
Data Model
The API serves three kinds of record: the hierarchy (factories, lines and machines), check instances and actions. They use the same names the rest of these docs use. See Core Concepts and Check Lifecycle for how they work in the product.
Factory ─┬─ Line ─┬─ Machine ─┬─ Check ─── Check instance (one per due occurrence)
│ │ └──────────── Action (raised from a check, or by hand)Every record carries id, created_at and updated_at, plus every hierarchy ID that applies to it (factory_id, line_id, machine_id). So you can filter and join on the same fields everywhere. IDs are opaque strings. Timestamps are UTC.
Enums Are Open Sets
Every status, kind and category listed on this page is the current set of values. New values can be added within v1 without notice. Your integration must accept a value it doesn't recognise, for example by grouping it as "other", rather than rejecting the record or failing the refresh.
Factories, Lines and Machines
Permission: hierarchy:read.
| Record | Fields |
|---|---|
| Factory | name, timezone (IANA, for example Europe/London), status |
| Line | factory_id, name, line_type, status |
| Machine | factory_id, line_id, name, sequence, status |
| Field | Value | Meaning |
|---|---|---|
status | active | In use. |
archived | Retired, but kept for history. | |
line_type | sequenced | Machines in production order. sequence gives the order. |
group | An unordered set of assets. sequence carries no meaning. |
- Lists exclude archived records unless you send
include_archived=true. A single-record request (/factories/{id}) always returns an archived record, so you can still label history. - A line or machine counts as archived when it, or anything above it, is archived. Its
updated_atincludes changes to its ancestors, so incremental sync sees a parent being archived or restored. - The factory's
timezoneis the one summaries use for daily, weekly and monthly buckets.
Check Instances
Permission: checks:read.
A check instance is one occurrence of a check that was due at a particular time. It is the record behind every completion figure.
| Field | Meaning |
|---|---|
check_id | The check this is an occurrence of. |
check_kind | cil: a pass/fail check (cleaning, inspection, lubrication). centreline: a measured value against a target. Data Capture instances aren't exposed in v1. |
origin | scheduled: raised by the check's schedule (periodic, shift start, format change). ad_hoc: someone asked for it, with Trigger all checks or by triggering a check by hand. |
status | See below. |
due_at | When it became due. |
grace_period_ends_at | When it stops being completable on time. |
completed_at | When the result was submitted, or null. |
passed | true or false for a submitted result with a pass/fail outcome. null when there's no result, or the result has no pass/fail outcome. |
Check Instance Statuses
| Status | Meaning | A miss? |
|---|---|---|
due | Due and not yet done. It is past due_at: inside its grace period, or just past it until the job that marks misses next runs. | No |
overdue | A scheduled instance whose grace period ended without a result, and whose closure hasn't been recorded. | Yes |
missed | A scheduled instance whose closure without a result has been recorded. | Yes |
completed | A result was submitted. | No |
skipped | A person excused it deliberately. | No |
not_applicable | Not required: the line was running a format the check doesn't apply to when the grace period ended. | No |
expired | An ad-hoc instance nobody completed before the check was due again. Nobody was obliged to do it. | Never |
Both overdue and missed count against the completion rate. expired is never a miss.
When an instance closes. A scheduled instance that wasn't done in its grace period closes at the earlier of two moments: a newer occurrence of the same check coming due, or exactly 7 days after its grace period ended (the late-completion window). Its status changes from overdue to missed when Continual records the closure, a few minutes later (see below).
Statuses are records, not permission. A status says what has been recorded; it doesn't say whether Continual will accept a late completion now. Late completion is decided when it is attempted: it is refused from either closing moment on, whether or not the closure has been recorded yet, and the usual rules still apply (for example, a check that has been switched off can't be completed). So an overdue instance may already be past its cutoff, and a due instance just past its grace period can still be done late.
Instances Appear Only Once Due
An instance appears on lists, by ID and in summaries only once its due_at has passed. Upcoming instances aren't exposed in v1. As a result:
- A public
dueinstance is always past itsdue_at. - Nothing you have seen is ever deleted. When a schedule changes or a check is archived, Continual removes only future instances, and those were never visible.
- An instance's
updated_atis the later of its last change and itsdue_at. Becoming due is its first visible update, so an incremental sync picks up newly due work as well as later changes, including the moves fromduetooverdueand fromoverduetomissed. - Status changes are recorded by a job that runs every 5 minutes. When the grace period ends, an instance stays
dueuntil that job next runs; when an overdue instance closes, it staysoverdueuntil that job next runs, even though it can no longer be completed. A delayed run can make either lag longer.
Lists and summaries include instances of archived checks and hierarchy by default (include_archived=true), so history stays complete. Send include_archived=false to match the portal, which excludes them.
Actions
Permission: actions:read.
An action is a piece of follow-up work: raised automatically from a check result, or by a person.
| Field | Meaning |
|---|---|
check_id | The check it was raised from, or null for a manual action without a check. |
title | A short title, or null. |
category | See below. |
origin | automatic: raised by Continual from check results. manual: raised by a person. |
status | See below. |
root_cause | Recorded when the action is resolved: equipment_fault, consumable_material, operator_error, process_issue or other. null when not recorded. |
target_resolution_at | When it should be resolved by, or null. |
resolved_at, verified_at, closed_at | When each step happened, or null. |
Action Categories
| Category | Meaning |
|---|---|
defect | A fault found by a failing CIL check. |
deviation | A centreline value left outside its target for follow-up. |
review | A manager's verdict is owed on a temporary target trial. This is a decision, not corrective work. |
null | A manual action. Manual actions carry no category. |
Action Statuses
| Status | Meaning |
|---|---|
open | Awaiting work. |
pending_verification | Resolved, waiting for someone to confirm the fix. |
closed | Finished. |
An action usually moves open → pending_verification → closed. Some skip the middle step: a manual action without a check closes when it's resolved, and a deviation action closes on its own when the next result for its check passes. See Actions.
Resolving, verifying or closing an action updates its updated_at, so incremental sync sees each step. Action lists and summaries include every action regardless of the state of its hierarchy.
Not Exposed in v1
Check definitions (titles, instructions, schedules and targets), descriptions, resolution notes and other free text, people (who completed what, assignees), photos and media, check results with measured values and targets, Data Capture, and line output. See What Is Not in v1.