Yieldly Public API (1.0.0)

Download OpenAPI specification:

The Yieldly Public API — a stable, versioned (/v1) REST API for integrating your systems (ERP, MES, BI, data warehouses) with your Yieldly OEE and production data.

Authentication

Every endpoint (except /v1/health) accepts one of three bearer credentials in the Authorization: Bearer <token> header:

  1. Company M2M client (oauth2 client-credentials) — for server-to-server integrations (ERP/MES). A company_admin creates a client in Settings → API; exchange its client_id + client_secret for an access token at the OAuth2 token endpoint, requesting the scopes you need. The token is scoped to the whole company. Offboarding a person never breaks it.
  2. Personal access token (PAT) — an opaque first-party key oee_pat_…, created by any member in Settings → API. A PAT runs as that user: their role + group/visibility scope apply (it is never god-mode), further narrowed by the PAT's own scopes. Deleting the user revokes their PATs.
  3. OAuth2 authorization code (oauth2User) — for apps that connect on a user's behalf (e.g. Zapier). The user signs in — including via their company SSO — and authorizes; the app receives an access token that runs as that user (same scoping as a PAT). PKCE is required, and the authorize + token endpoints are on this domain.

Both require API access to be enabled for your company, and enforce the same strict access controls as the rest of the platform.

Scopes

Scopes are resource:action (least privilege, no catch-all). For an M2M client the full scope string is oee-public/<resource:action>, e.g. oee-public/hierarchy:read. A request needs the scope the endpoint declares; otherwise it gets 403 insufficient_scope. The scopes:

  • hierarchy:read — the equipment model (sites, areas, lines, work cells, sensors).
  • metrics:read — OEE, produced counts, OEE trend, downtime Pareto.
  • stops:read / stops:write — downtime intervals + categories / classify a stop.
  • batches:read / batches:write — production runs + scrap / start/close runs + record scrap.
  • products:read / products:write — the product catalog, line rates, changeovers.
  • schedule:read / schedule:write — scheduled runs (needs the scheduling add-on).
  • events:read / hooks:write — the event feed / webhook subscriptions (Automations add-on).

AI assistants (MCP)

Beyond the REST API, Yieldly exposes a remote MCP (Model Context Protocol) server at /mcp so AI assistants (Claude, ChatGPT, …) can query your production data as tools. It is a separate paid module ("AI assistant connector"), enabled in Settings → AI assistant (MCP), and uses the same resource:action scopes and access controls as the REST API.

Conventions

  • Paths kebab-case; payloads camelCase.
  • Errors follow RFC 7807 Problem Details (application/problem+json).
  • Lists are cursor-paged: follow nextCursor until it is null.
  • Metrics windows take from/to as ISO-8601; to must be after from.

Meta

Liveness + service metadata.

Liveness probe

Unauthenticated. Returns { status: "ok" } when the API is up.

Responses

Response samples

Content type
application/json
{
  • "status": "ok"
}

Hierarchy

The ISA-95 equipment model — sites, areas, lines, work cells, equipment.

List sites

The company's sites (ISA-95 Site). Filterable by externalId.

Authorizations:
m2mpat
query Parameters
externalId
string

Filter to the row(s) with this ISA-95 integration id.

limit
integer [ 1 .. 1000 ]

Responses

Response samples

Content type
application/json
{
  • "sites": [
    ]
}

Get a site

Authorizations:
m2mpat
path Parameters
siteId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "timezone": "string",
  • "externalId": "string"
}

List a site's areas

Authorizations:
m2mpat
path Parameters
siteId
required
string <uuid>
query Parameters
externalId
string

Filter to the row(s) with this ISA-95 integration id.

limit
integer [ 1 .. 1000 ]

Responses

Response samples

Content type
application/json
{
  • "areas": [
    ]
}

List a site's lines

Authorizations:
m2mpat
path Parameters
siteId
required
string <uuid>
query Parameters
externalId
string

Filter to the row(s) with this ISA-95 integration id.

limit
integer [ 1 .. 1000 ]

Responses

Response samples

Content type
application/json
{
  • "lines": [
    ]
}

Get an area

Authorizations:
m2mpat
path Parameters
areaId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
  • "name": "string",
  • "externalId": "string"
}

List production lines

The caller's production lines. Used by the Automations line-picker too, so it accepts the lines:read scope and the automation entitlement.

Authorizations:
m2mpat

Responses

Response samples

Content type
application/json
{
  • "lines": [
    ]
}

Get a line

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
  • "areaId": "ebbb2a49-d827-4796-8d8a-108c229835e9",
  • "externalId": "string",
  • "oeeTargetPercent": 0
}

List a line's work cells

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "stages": [
    ]
}

List a line's equipment

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
query Parameters
externalId
string

Filter to the row(s) with this ISA-95 integration id.

limit
integer [ 1 .. 1000 ]

Responses

Response samples

Content type
application/json
{
  • "sensors": [
    ]
}

Get a sensor

Authorizations:
m2mpat
path Parameters
sensorId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "name": "string",
  • "externalId": "string",
  • "capacityPerMinute": 0
}

Metrics

ISO 22400-2 OEE, produced counts, OEE trend and the downtime Pareto.

Line OEE for a window

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

Responses

Response samples

Content type
application/json
{
  • "from": "2019-08-24T14:15:22Z",
  • "to": "2019-08-24T14:15:22Z",
  • "oee": 0,
  • "availability": 0,
  • "performance": 0,
  • "quality": 0,
  • "plannedProductionSeconds": 0,
  • "runSeconds": 0,
  • "actualCount": 0,
  • "targetCount": 0,
  • "goodCount": 0,
  • "scrapCount": 0,
  • "losses": {
    },
  • "lossByCategory": [
    ]
}

Line OEE trend (bucketed)

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

interval
string
Enum: "minute" "hour" "day"

Responses

Response samples

Content type
application/json
{
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "interval": "minute",
  • "bucketSeconds": 0,
  • "buckets": [
    ]
}

Produced-count time-series

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

interval
string
Enum: "raw" "minute" "hour" "day"

Responses

Response samples

Content type
application/json
{
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "interval": "raw",
  • "bucketSeconds": 0,
  • "buckets": [
    ]
}

Downtime reason Pareto

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

Responses

Response samples

Content type
application/json
{
  • "from": "2019-08-24T14:15:22Z",
  • "to": "2019-08-24T14:15:22Z",
  • "windowSeconds": 0,
  • "totalStops": 0,
  • "totalDowntimeSeconds": 0,
  • "unclassifiedCount": 0,
  • "mttrSeconds": 0,
  • "mtbfSeconds": 0,
  • "reasons": [
    ],
  • "byOeeType": [
    ]
}

Site OEE for a window

Authorizations:
m2mpat
path Parameters
siteId
required
string <uuid>
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

Responses

Response samples

Content type
application/json
{
  • "from": "2019-08-24T14:15:22Z",
  • "to": "2019-08-24T14:15:22Z",
  • "oee": 0,
  • "availability": 0,
  • "performance": 0,
  • "quality": 0,
  • "plannedProductionSeconds": 0,
  • "runSeconds": 0,
  • "actualCount": 0,
  • "targetCount": 0,
  • "goodCount": 0,
  • "scrapCount": 0,
  • "losses": {
    },
  • "lossByCategory": [
    ]
}

Company-wide OEE for a window

Authorizations:
m2mpat
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

Responses

Response samples

Content type
application/json
{
  • "from": "2019-08-24T14:15:22Z",
  • "to": "2019-08-24T14:15:22Z",
  • "oee": 0,
  • "availability": 0,
  • "performance": 0,
  • "quality": 0,
  • "plannedProductionSeconds": 0,
  • "runSeconds": 0,
  • "actualCount": 0,
  • "targetCount": 0,
  • "goodCount": 0,
  • "scrapCount": 0,
  • "losses": {
    },
  • "lossByCategory": [
    ]
}

Line Oee By Product

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

Responses

Response samples

Content type
application/json
{
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "items": [
    ]
}

Line Oee By Shift

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

Responses

Response samples

Content type
application/json
{
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "items": [
    ]
}

Line Scrap Trend

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

interval
string
Enum: "minute" "hour" "day"

Responses

Response samples

Content type
application/json
{
  • "interval": "minute",
  • "bucketSeconds": 0,
  • "buckets": [
    ]
}

Line Stop Trend

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

interval
string
Enum: "minute" "hour" "day"

Responses

Response samples

Content type
application/json
{
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "interval": "minute",
  • "bucketSeconds": 0,
  • "buckets": [
    ]
}

Site Oee Trend

Authorizations:
m2mpat
path Parameters
siteId
required
string <uuid>
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

interval
string
Enum: "minute" "hour" "day"

Responses

Response samples

Content type
application/json
{
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
  • "interval": "minute",
  • "bucketSeconds": 0,
  • "buckets": [
    ]
}

Site Oee By Line

Authorizations:
m2mpat
path Parameters
siteId
required
string <uuid>
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

Responses

Response samples

Content type
application/json
{
  • "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
  • "items": [
    ]
}

Site Scrap Trend

Authorizations:
m2mpat
path Parameters
siteId
required
string <uuid>
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

interval
string
Enum: "minute" "hour" "day"

Responses

Response samples

Content type
application/json
{
  • "interval": "minute",
  • "bucketSeconds": 0,
  • "buckets": [
    ]
}

Site Stops Pareto

Authorizations:
m2mpat
path Parameters
siteId
required
string <uuid>
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

Responses

Response samples

Content type
application/json
{
  • "from": "2019-08-24T14:15:22Z",
  • "to": "2019-08-24T14:15:22Z",
  • "windowSeconds": 0,
  • "totalStops": 0,
  • "totalDowntimeSeconds": 0,
  • "unclassifiedCount": 0,
  • "mttrSeconds": 0,
  • "mtbfSeconds": 0,
  • "reasons": [
    ],
  • "byOeeType": [
    ]
}

Company Oee Trend

Authorizations:
m2mpat
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

interval
string
Enum: "minute" "hour" "day"

Responses

Response samples

Content type
application/json
{
  • "interval": "minute",
  • "bucketSeconds": 0,
  • "buckets": [
    ]
}

Company Oee By Site

Authorizations:
m2mpat
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Company Scrap Trend

Authorizations:
m2mpat
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

interval
string
Enum: "minute" "hour" "day"

Responses

Response samples

Content type
application/json
{
  • "interval": "minute",
  • "bucketSeconds": 0,
  • "buckets": [
    ]
}

Company Stops Pareto

Authorizations:
m2mpat
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

Responses

Response samples

Content type
application/json
{
  • "from": "2019-08-24T14:15:22Z",
  • "to": "2019-08-24T14:15:22Z",
  • "windowSeconds": 0,
  • "totalStops": 0,
  • "totalDowntimeSeconds": 0,
  • "unclassifiedCount": 0,
  • "mttrSeconds": 0,
  • "mtbfSeconds": 0,
  • "reasons": [
    ],
  • "byOeeType": [
    ]
}

Downtime

Stop intervals + reason categories; classify a stop.

List a line's stops

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

onlyUnclassified
boolean
oeeType
string (OeeType)
Enum: "non_scheduled" "planned" "batch_specific" "unplanned"
minSeconds
integer >= 0
cursor
string

Opaque pagination cursor from a previous response's nextCursor.

limit
integer [ 1 .. 1000 ]

Responses

Response samples

Content type
application/json
{
  • "stops": [
    ],
  • "nextCursor": "string"
}

List a line's stop categories

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "categories": [
    ]
}

Create a stop category

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
Request Body schema: application/json
required
name
required
string [ 1 .. 200 ] characters
oeeType
required
string (OeeType)
Enum: "non_scheduled" "planned" "batch_specific" "unplanned"
stageId
string or null <uuid>
externalId
string or null <= 200 characters

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "oeeType": "non_scheduled",
  • "stageId": "4ac83d66-64fa-48da-9505-57df43404af7",
  • "externalId": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "oeeType": "non_scheduled",
  • "stageId": "4ac83d66-64fa-48da-9505-57df43404af7",
  • "externalId": "string"
}

Get a stop

Authorizations:
m2mpat
path Parameters
stopId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "stageId": "4ac83d66-64fa-48da-9505-57df43404af7",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "endedAt": "2019-08-24T14:15:22Z",
  • "durationSeconds": 0,
  • "category": { },
  • "causeText": "string",
  • "classifiedAt": "2019-08-24T14:15:22Z",
  • "isMicro": true,
  • "needsClassification": true
}

Classify a stop

Assign a reason category (and optional cause text) to a stop.

Authorizations:
m2mpat
path Parameters
stopId
required
string <uuid>
Request Body schema: application/json
required
categoryId
required
string <uuid>
causeText
string [ 1 .. 2000 ] characters

Responses

Request samples

Content type
application/json
{
  • "categoryId": "337f5e5d-288b-40d5-be14-901cc3acacc0",
  • "causeText": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "stageId": "4ac83d66-64fa-48da-9505-57df43404af7",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "endedAt": "2019-08-24T14:15:22Z",
  • "durationSeconds": 0,
  • "category": { },
  • "causeText": "string",
  • "classifiedAt": "2019-08-24T14:15:22Z",
  • "isMicro": true,
  • "needsClassification": true
}

Update a stop category

Authorizations:
m2mpat
path Parameters
categoryId
required
string <uuid>
Request Body schema: application/json
required
name
string [ 1 .. 200 ] characters
oeeType
string (OeeType)
Enum: "non_scheduled" "planned" "batch_specific" "unplanned"
stageId
string or null <uuid>
externalId
string or null <= 200 characters

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "oeeType": "non_scheduled",
  • "stageId": "4ac83d66-64fa-48da-9505-57df43404af7",
  • "externalId": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "oeeType": "non_scheduled",
  • "stageId": "4ac83d66-64fa-48da-9505-57df43404af7",
  • "externalId": "string"
}

Delete a stop category

Authorizations:
m2mpat
path Parameters
categoryId
required
string <uuid>

Responses

Response samples

Content type
application/problem+json
{
  • "title": "string",
  • "status": 0,
  • "code": "string",
  • "detail": "string"
}

Bulk-classify stops

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
Request Body schema: application/json
required
stopIds
required
Array of strings <uuid> non-empty [ items <uuid > ]
categoryId
required
string <uuid>
causeText
string [ 1 .. 2000 ] characters

Responses

Request samples

Content type
application/json
{
  • "stopIds": [
    ],
  • "categoryId": "337f5e5d-288b-40d5-be14-901cc3acacc0",
  • "causeText": "string"
}

Response samples

Content type
application/json
{
  • "classified": 0
}

Unclassify a stop

Authorizations:
m2mpat
path Parameters
stopId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "stageId": "4ac83d66-64fa-48da-9505-57df43404af7",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "endedAt": "2019-08-24T14:15:22Z",
  • "durationSeconds": 0,
  • "category": { },
  • "causeText": "string",
  • "classifiedAt": "2019-08-24T14:15:22Z",
  • "isMicro": true,
  • "needsClassification": true
}

Production

Production runs (batches) + scrap.

List a line's production runs

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
query Parameters
from
string <date-time>
to
string <date-time>
status
string (BatchStatus)
Enum: "planned" "running" "held" "completed" "aborted"
cursor
string

Opaque pagination cursor from a previous response's nextCursor.

limit
integer [ 1 .. 1000 ]

Responses

Response samples

Content type
application/json
{
  • "batches": [
    ],
  • "nextCursor": "string"
}

Start (or schedule) a run

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
Request Body schema: application/json
required
productId
string or null <uuid>
name
string or null <= 200 characters
orderRef
string or null <= 200 characters
lotCode
string or null <= 200 characters
startedAt
string <date-time>
capacityPerMinute
number or null
targetCount
integer or null
status
string
Enum: "planned" "running"

Responses

Request samples

Content type
application/json
{
  • "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
  • "name": "string",
  • "orderRef": "string",
  • "lotCode": "string",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "capacityPerMinute": 0,
  • "targetCount": 0,
  • "status": "planned"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
  • "productName": "string",
  • "productSku": "string",
  • "name": "string",
  • "orderRef": "string",
  • "lotCode": "string",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "endedAt": "2019-08-24T14:15:22Z",
  • "status": "planned",
  • "targetCount": 0,
  • "capacityPerMinute": 0
}

Get a production run

Authorizations:
m2mpat
path Parameters
batchId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
  • "productName": "string",
  • "productSku": "string",
  • "name": "string",
  • "orderRef": "string",
  • "lotCode": "string",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "endedAt": "2019-08-24T14:15:22Z",
  • "status": "planned",
  • "targetCount": 0,
  • "capacityPerMinute": 0
}

Edit or close a run

Authorizations:
m2mpat
path Parameters
batchId
required
string <uuid>
Request Body schema: application/json
required
status
string (BatchStatus)
Enum: "planned" "running" "held" "completed" "aborted"
productId
string or null <uuid>
name
string or null <= 200 characters
orderRef
string or null <= 200 characters
lotCode
string or null <= 200 characters
capacityPerMinute
number or null
targetCount
integer or null
endedAt
string or null <date-time>

Responses

Request samples

Content type
application/json
{
  • "status": "planned",
  • "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
  • "name": "string",
  • "orderRef": "string",
  • "lotCode": "string",
  • "capacityPerMinute": 0,
  • "targetCount": 0,
  • "endedAt": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
  • "productName": "string",
  • "productSku": "string",
  • "name": "string",
  • "orderRef": "string",
  • "lotCode": "string",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "endedAt": "2019-08-24T14:15:22Z",
  • "status": "planned",
  • "targetCount": 0,
  • "capacityPerMinute": 0
}

Delete a production run

Authorizations:
m2mpat
path Parameters
batchId
required
string <uuid>

Responses

Response samples

Content type
application/problem+json
{
  • "title": "string",
  • "status": 0,
  • "code": "string",
  • "detail": "string"
}

List a line's scrap entries

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
query Parameters
from
string <date-time>
to
string <date-time>
cursor
string

Opaque pagination cursor from a previous response's nextCursor.

limit
integer [ 1 .. 1000 ]

Responses

Response samples

Content type
application/json
{
  • "scrap": [
    ],
  • "nextCursor": "string"
}

Record scrap

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
Request Body schema: application/json
required
quantity
required
number > 0
shiftStartedAt
string <date-time>
batchId
string or null <uuid>
reasonText
string [ 1 .. 2000 ] characters

Responses

Request samples

Content type
application/json
{
  • "quantity": 0,
  • "shiftStartedAt": "2019-08-24T14:15:22Z",
  • "batchId": "5579c111-9c50-47e2-af92-f16d52e63189",
  • "reasonText": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "batchId": "5579c111-9c50-47e2-af92-f16d52e63189",
  • "shiftStartedAt": "2019-08-24T14:15:22Z",
  • "quantity": 0,
  • "reasonText": "string"
}

Get a scrap entry

Authorizations:
m2mpat
path Parameters
scrapId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "batchId": "5579c111-9c50-47e2-af92-f16d52e63189",
  • "shiftStartedAt": "2019-08-24T14:15:22Z",
  • "quantity": 0,
  • "reasonText": "string"
}

Update a scrap entry

Authorizations:
m2mpat
path Parameters
scrapId
required
string <uuid>
Request Body schema: application/json
required
quantity
number > 0
shiftStartedAt
string <date-time>
batchId
string or null <uuid>
reasonText
string [ 1 .. 2000 ] characters

Responses

Request samples

Content type
application/json
{
  • "quantity": 0,
  • "shiftStartedAt": "2019-08-24T14:15:22Z",
  • "batchId": "5579c111-9c50-47e2-af92-f16d52e63189",
  • "reasonText": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "batchId": "5579c111-9c50-47e2-af92-f16d52e63189",
  • "shiftStartedAt": "2019-08-24T14:15:22Z",
  • "quantity": 0,
  • "reasonText": "string"
}

Delete a scrap entry

Authorizations:
m2mpat
path Parameters
scrapId
required
string <uuid>

Responses

Response samples

Content type
application/problem+json
{
  • "title": "string",
  • "status": 0,
  • "code": "string",
  • "detail": "string"
}

Products

The product catalog, per-line rates and changeovers.

List products

Authorizations:
m2mpat
query Parameters
cursor
string

Opaque pagination cursor from a previous response's nextCursor.

limit
integer [ 1 .. 1000 ]

Responses

Response samples

Content type
application/json
{
  • "products": [
    ],
  • "nextCursor": "string"
}

Create a product

Authorizations:
m2mpat
Request Body schema: application/json
required
name
required
string [ 1 .. 200 ] characters
sku
string or null <= 200 characters
defaultCapacityPerMinute
number or null
units
string or null <= 50 characters
qualityTargetPercent
integer or null [ 0 .. 100 ]
defaultTargetPerDay
integer or null

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "sku": "string",
  • "defaultCapacityPerMinute": 0,
  • "units": "string",
  • "qualityTargetPercent": 100,
  • "defaultTargetPerDay": 0
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "sku": "string",
  • "version": 0,
  • "defaultCapacityPerMinute": 0,
  • "units": "string",
  • "qualityTargetPercent": 0,
  • "defaultTargetPerDay": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Get a product

Authorizations:
m2mpat
path Parameters
productId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "sku": "string",
  • "version": 0,
  • "defaultCapacityPerMinute": 0,
  • "units": "string",
  • "qualityTargetPercent": 0,
  • "defaultTargetPerDay": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a product

Authorizations:
m2mpat
path Parameters
productId
required
string <uuid>
Request Body schema: application/json
required
name
string [ 1 .. 200 ] characters
sku
string or null <= 200 characters
defaultCapacityPerMinute
number or null
units
string or null <= 50 characters
qualityTargetPercent
integer or null [ 0 .. 100 ]
defaultTargetPerDay
integer or null

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "sku": "string",
  • "defaultCapacityPerMinute": 0,
  • "units": "string",
  • "qualityTargetPercent": 100,
  • "defaultTargetPerDay": 0
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "sku": "string",
  • "version": 0,
  • "defaultCapacityPerMinute": 0,
  • "units": "string",
  • "qualityTargetPercent": 0,
  • "defaultTargetPerDay": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a product

Authorizations:
m2mpat
path Parameters
productId
required
string <uuid>

Responses

Response samples

Content type
application/problem+json
{
  • "title": "string",
  • "status": 0,
  • "code": "string",
  • "detail": "string"
}

List a line's product rates

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "rates": [
    ]
}

Set a line product rate

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
Request Body schema: application/json
required
productId
required
string <uuid>
capacityPerMinute
required
number > 0

Responses

Request samples

Content type
application/json
{
  • "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
  • "capacityPerMinute": 0
}

Response samples

Content type
application/json
{
  • "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "capacityPerMinute": 0
}

Delete a line product rate

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
productId
required
string <uuid>

Responses

Response samples

Content type
application/problem+json
{
  • "title": "string",
  • "status": 0,
  • "code": "string",
  • "detail": "string"
}

List changeovers

Authorizations:
m2mpat

Responses

Response samples

Content type
application/json
{
  • "changeovers": [
    ]
}

Upsert a changeover

Authorizations:
m2mpat
Request Body schema: application/json
required
lineId
string or null <uuid>
fromProductId
string or null <uuid>
toProductId
required
string <uuid>
setupSeconds
required
integer >= 0

Responses

Request samples

Content type
application/json
{
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "fromProductId": "3ff89246-4dbf-4a69-8194-09f3557d364d",
  • "toProductId": "be653d6c-56cb-4193-afe6-95067ceac900",
  • "setupSeconds": 0
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "fromProductId": "3ff89246-4dbf-4a69-8194-09f3557d364d",
  • "toProductId": "be653d6c-56cb-4193-afe6-95067ceac900",
  • "setupSeconds": 0
}

Delete a changeover

Authorizations:
m2mpat
path Parameters
changeoverId
required
string <uuid>

Responses

Response samples

Content type
application/problem+json
{
  • "title": "string",
  • "status": 0,
  • "code": "string",
  • "detail": "string"
}

Scheduling

Scheduled runs (ISA-95 Production Requests). Requires the scheduling add-on.

List a line's scheduled runs

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
query Parameters
from
string <date-time>
to
string <date-time>
limit
integer [ 1 .. 1000 ]

Responses

Response samples

Content type
application/json
{
  • "scheduledRuns": [
    ]
}

Plan a scheduled run

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
Request Body schema: application/json
required
productId
string or null <uuid>
name
string or null <= 200 characters
orderRef
string or null <= 200 characters
lotCode
string or null <= 200 characters
externalId
string or null <= 200 characters
plannedStart
string <date-time>
plannedQuantity
required
integer > 0
priority
integer

Responses

Request samples

Content type
application/json
{
  • "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
  • "name": "string",
  • "orderRef": "string",
  • "lotCode": "string",
  • "externalId": "string",
  • "plannedStart": "2019-08-24T14:15:22Z",
  • "plannedQuantity": 0,
  • "priority": 0
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
  • "productName": "string",
  • "productSku": "string",
  • "batchId": "5579c111-9c50-47e2-af92-f16d52e63189",
  • "status": "planned",
  • "plannedStart": "2019-08-24T14:15:22Z",
  • "plannedEnd": "2019-08-24T14:15:22Z",
  • "plannedQuantity": 0,
  • "sequenceNo": 0,
  • "priority": 0,
  • "changeoverSeconds": 0,
  • "productionSeconds": 0,
  • "ratePerMinute": 0,
  • "name": "string",
  • "orderRef": "string",
  • "lotCode": "string",
  • "externalId": "string",
  • "actualStart": "2019-08-24T14:15:22Z",
  • "actualEnd": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Get a scheduled run

Authorizations:
m2mpat
path Parameters
runId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
  • "productName": "string",
  • "productSku": "string",
  • "batchId": "5579c111-9c50-47e2-af92-f16d52e63189",
  • "status": "planned",
  • "plannedStart": "2019-08-24T14:15:22Z",
  • "plannedEnd": "2019-08-24T14:15:22Z",
  • "plannedQuantity": 0,
  • "sequenceNo": 0,
  • "priority": 0,
  • "changeoverSeconds": 0,
  • "productionSeconds": 0,
  • "ratePerMinute": 0,
  • "name": "string",
  • "orderRef": "string",
  • "lotCode": "string",
  • "externalId": "string",
  • "actualStart": "2019-08-24T14:15:22Z",
  • "actualEnd": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a scheduled run

Authorizations:
m2mpat
path Parameters
runId
required
string <uuid>
Request Body schema: application/json
required
productId
string or null <uuid>
name
string or null <= 200 characters
orderRef
string or null <= 200 characters
lotCode
string or null <= 200 characters
externalId
string or null <= 200 characters
plannedStart
string <date-time>
plannedQuantity
integer > 0
priority
integer
status
string (ScheduledRunStatus)
Enum: "planned" "in_progress" "completed" "cancelled"

Responses

Request samples

Content type
application/json
{
  • "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
  • "name": "string",
  • "orderRef": "string",
  • "lotCode": "string",
  • "externalId": "string",
  • "plannedStart": "2019-08-24T14:15:22Z",
  • "plannedQuantity": 0,
  • "priority": 0,
  • "status": "planned"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
  • "productName": "string",
  • "productSku": "string",
  • "batchId": "5579c111-9c50-47e2-af92-f16d52e63189",
  • "status": "planned",
  • "plannedStart": "2019-08-24T14:15:22Z",
  • "plannedEnd": "2019-08-24T14:15:22Z",
  • "plannedQuantity": 0,
  • "sequenceNo": 0,
  • "priority": 0,
  • "changeoverSeconds": 0,
  • "productionSeconds": 0,
  • "ratePerMinute": 0,
  • "name": "string",
  • "orderRef": "string",
  • "lotCode": "string",
  • "externalId": "string",
  • "actualStart": "2019-08-24T14:15:22Z",
  • "actualEnd": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a scheduled run

Authorizations:
m2mpat
path Parameters
runId
required
string <uuid>

Responses

Response samples

Content type
application/problem+json
{
  • "title": "string",
  • "status": 0,
  • "code": "string",
  • "detail": "string"
}

Release a scheduled run

Materialise the ISA-95 Production Response — open a running batch + link it. Idempotent.

Authorizations:
m2mpat
path Parameters
runId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
  • "productName": "string",
  • "productSku": "string",
  • "batchId": "5579c111-9c50-47e2-af92-f16d52e63189",
  • "status": "planned",
  • "plannedStart": "2019-08-24T14:15:22Z",
  • "plannedEnd": "2019-08-24T14:15:22Z",
  • "plannedQuantity": 0,
  • "sequenceNo": 0,
  • "priority": 0,
  • "changeoverSeconds": 0,
  • "productionSeconds": 0,
  • "ratePerMinute": 0,
  • "name": "string",
  • "orderRef": "string",
  • "lotCode": "string",
  • "externalId": "string",
  • "actualStart": "2019-08-24T14:15:22Z",
  • "actualEnd": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Reorder a line's scheduled runs

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
Request Body schema: application/json
required
orderedIds
required
Array of strings <uuid> non-empty [ items <uuid > ]

Responses

Request samples

Content type
application/json
{
  • "orderedIds": [
    ]
}

Response samples

Content type
application/json
{
  • "scheduledRuns": [
    ]
}

Schedule adherence + attainment for a line

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

toleranceSeconds
integer >= 0

Responses

Response samples

Content type
application/json
{
  • "runsPlanned": 0,
  • "runsCompleted": 0,
  • "plannedQuantity": 0,
  • "attainedQuantity": 0,
  • "attainment": 0,
  • "onTimeStart": 0,
  • "onTimeCompletion": 0,
  • "sequenceAdherence": 0,
  • "adherence": 0
}

Site-wide schedule board

Authorizations:
m2mpat
path Parameters
siteId
required
string <uuid>
query Parameters
from
required
string <date-time>

Window start (ISO-8601).

to
required
string <date-time>

Window end (ISO-8601), after from.

Responses

Response samples

Content type
application/json
{
  • "from": "2019-08-24T14:15:22Z",
  • "to": "2019-08-24T14:15:22Z",
  • "lines": [
    ]
}

Events

The real-time event feed (stops, outages, and more).

List recent events

The most recent events for your company, newest first. type narrows to a single event type; limit (1–100, default 25) bounds the page.

Authorizations:
m2mpat
query Parameters
type
string (EventType)
Enum: "stop.opened" "stop.closed" "outage.opened" "outage.closed"
limit
integer [ 1 .. 100 ]
Default: 25

Responses

Response samples

Content type
application/json
{
  • "events": [
    ]
}

Webhooks

Event webhook subscriptions (REST hooks). Register a callback URL to receive events as they happen. Requires the Event Webhooks add-on.

Subscribe to an event (REST hook)

Register a callback URL to receive an event in real time. Idempotent on (event, targetUrl). Requires hooks:write plus the event's read scope.

Authorizations:
m2mpat
Request Body schema: application/json
required
eventType
required
string (EventType)
Enum: "stop.opened" "stop.closed" "outage.opened" "outage.closed"
targetUrl
required
string <uri>

HTTPS callback URL.

lineId
string or null <uuid>
zapId
string <= 128 characters

Responses

Request samples

Content type
application/json
{
  • "eventType": "stop.opened",
  • "targetUrl": "http://example.com",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "zapId": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

Unsubscribe (delete a REST hook)

Stop delivering an event to a callback. Idempotent: an unknown id still returns 204.

Authorizations:
m2mpat
path Parameters
subscriptionId
required
string <uuid>

Responses

Response samples

Content type
application/problem+json
{
  • "title": "string",
  • "status": 0,
  • "code": "string",
  • "detail": "string"
}

Shifts

Named weekly time windows used to slice OEE and stats.

List a line's shifts

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "shifts": [
    ]
}

Create a shift

Authorizations:
m2mpat
path Parameters
lineId
required
string <uuid>
Request Body schema: application/json
required
name
required
string [ 1 .. 200 ] characters
startTime
required
string^([01][0-9]|2[0-3]):[0-5][0-9]$
endTime
required
string^([01][0-9]|2[0-3]):[0-5][0-9]$
daysOfWeek
required
Array of integers[ items [ 0 .. 6 ] ]
color
string or null <= 32 characters

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "startTime": "string",
  • "endTime": "string",
  • "daysOfWeek": [
    ],
  • "color": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "name": "string",
  • "startTime": "string",
  • "endTime": "string",
  • "daysOfWeek": [
    ],
  • "color": "string"
}

Get a shift

Authorizations:
m2mpat
path Parameters
shiftId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "name": "string",
  • "startTime": "string",
  • "endTime": "string",
  • "daysOfWeek": [
    ],
  • "color": "string"
}

Update a shift

Authorizations:
m2mpat
path Parameters
shiftId
required
string <uuid>
Request Body schema: application/json
required
name
string [ 1 .. 200 ] characters
startTime
string^([01][0-9]|2[0-3]):[0-5][0-9]$
endTime
string^([01][0-9]|2[0-3]):[0-5][0-9]$
daysOfWeek
Array of integers[ items [ 0 .. 6 ] ]
color
string or null <= 32 characters

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "startTime": "string",
  • "endTime": "string",
  • "daysOfWeek": [
    ],
  • "color": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "lineId": "e698cdee-c4ef-4d12-b0ea-7c98b2fc64a8",
  • "name": "string",
  • "startTime": "string",
  • "endTime": "string",
  • "daysOfWeek": [
    ],
  • "color": "string"
}

Delete a shift

Authorizations:
m2mpat
path Parameters
shiftId
required
string <uuid>

Responses

Response samples

Content type
application/problem+json
{
  • "title": "string",
  • "status": 0,
  • "code": "string",
  • "detail": "string"
}