Skip to main content

Reading and syncing

The API reference lists every field; here is what each list is for.

Inventory — inventory:read​

GET /inventory lists the locations, systems, equipment and sub-equipment the integration may see, by last change. Filters: type (facility, system, equipment, sub_equipment), parent_id (direct children), external_id, updated_since. Each node has its path (ids from the location down) and parent_id, so you can rebuild the tree. GET /inventory/{id} gives one node.

Work orders — work_orders:read​

GET /work-orders filters by status (comma-separated codes: open, in_progress, on_hold, inspection, inspection_rejected, waiting_sub_work_orders, complete, cancelled), inventory_id (the node and everything below it), changed_since, target_from / target_to, external_id, parent_id (the sub work orders of that work order). A work order carries its status, priority, inventory node, form, assignees (people's names only with people:read), target and completion dates, overdue (not completed or cancelled and past its target date) and past_due_notified_at (when its assignees were told it is overdue; null until then, and again after the target date is moved), parent_id (its main work order when it is a sub work order, else null), sub_work_orders ({"total": 4, "finished": 1} — all of its sub work orders, also ones the integration can't read; null when it has none) and changed_at. GET /work-orders/{id} gives one.

A main work order whose own work is done waits in waiting_sub_work_orders until its last sub work order is complete or cancelled; then it is completed (or goes to inspection when it has a consultant) by itself.

GET /work-orders/{id}/answers (also forms:read) gives its form's questions in order, each with its type and its answer (an option, a list of options, a number or a text) or null.

Keeping a copy up to date​

Lists are ordered by changed_at, which moves whenever anything about the work order changes — its fields, status, answers, assignees, time records, hold or inspection. To keep a copy:

  1. The first time, read everything page by page.
  2. Remember the largest changed_at you saw.
  3. Next time ask GET /work-orders?changed_since=<that time minus one minute> and upsert what comes (by id).

The minute of overlap covers changes that were being saved while you read; upserting makes the repeats harmless. For changes as they happen, use webhooks — and still sync now and then, as webhooks may arrive late or twice.

Feedback — issues:read​

GET /issues filters by resolved, inventory_id, changed_since, external_id; each has its node, whether it is resolved and the work order opened from it. GET /issues/{id} gives one.

Reference lists​

  • GET /reference/work-order-statuses, /reference/priorities, /reference/form-types — any token.
  • GET /forms — the organization's published forms (forms:read).
  • GET /people, GET /teams — the organization's people and teams with their members (people:read; personal data). Their ids are the ones you assign work orders to.