Core Concepts
The resource model behind the Factory OS API — organizations, factories, machines, and work orders.
Factory OS models the real-world factory hierarchy as a tree of resources.
Hierarchy
Organization (tenant)
└─ Factory (physical site)
├─ Machine (CNC, press, oven, ...)
├─ Production Order (work order)
├─ Product
├─ Production Method (routing)
└─ ShiftEvery resource below the organization inherits access rules from it. A user invited to biocare sees every factory under biocare, but nothing else.
Slugs, not UUIDs
URL path params use slugs for human readability:
GET /api/factories/biocare-main/machines
^^^^^^^^^^^^
factories.slug, not uuidResource bodies still return UUIDs in id fields — use those for joins and updates.
Multi-tenancy
Every row in every table carries an organization_id. Row-level security in Postgres enforces that queries only see rows your JWT's org can access. The API adds a second layer of role-based checks on top.
Audit log
Every mutation is recorded in the audit log with the user, timestamp, resource, and old/new values. Query it via the Audit API.