Skip to main content

OEE

Overall Equipment Effectiveness (OEE) records capture a machine's production for a shift. Haltless computes availability, performance, quality, and the combined OEE percentage from the inputs you submit, and rolls them up into summaries. All endpoints require a bearer JWT.

Endpoints

MethodPathDescription
POST/api/v1/oee/recordsCreate an OEE record
GET/api/v1/oee/recordsList OEE records for a machine
GET/api/v1/oee/summaryAveraged OEE summary for a machine

Create a record

POST /api/v1/oee/records

Requires an operator or administrator role. Availability, performance, quality, and OEE percentages are computed from the inputs and returned in the response.

FieldTypeRequiredDescription
machine_iduuidYesMachine the record applies to
shift_datedateYesShift date (YYYY-MM-DD)
shift_definition_iduuidNoShift this record belongs to
planned_production_minutesintegerYesPlanned production time (> 0)
downtime_minutesintegerNoDowntime minutes (≥ 0, default 0)
ideal_cycle_time_secondsnumberYesIdeal seconds per piece (> 0)
total_countintegerYesTotal pieces produced (≥ 0)
good_countintegerYesGood pieces (≥ 0, no more than total_count)
notesstringNoFree-text notes
{
"machine_id": "550e8400-e29b-41d4-a716-446655440000",
"shift_date": "2026-08-07",
"planned_production_minutes": 480,
"downtime_minutes": 36,
"ideal_cycle_time_seconds": 22.0,
"total_count": 1200,
"good_count": 1189
}

Response201 Created

{
"id": "c4d5...",
"machine_id": "550e8400-e29b-41d4-a716-446655440000",
"shift_date": "2026-08-07",
"shift_definition_id": null,
"planned_production_minutes": 480,
"downtime_minutes": 36,
"ideal_cycle_time_seconds": 22.0,
"total_count": 1200,
"good_count": 1189,
"notes": null,
"availability_pct": 92.5,
"performance_pct": 87.3,
"quality_pct": 99.08,
"oee_pct": 80.01,
"created_at": "2026-08-07T16:00:00Z"
}

List records

GET /api/v1/oee/records

ParameterTypeRequiredDescription
machine_iduuidYesMachine to list records for
from_datedateNoStart date (YYYY-MM-DD)
to_datedateNoEnd date (YYYY-MM-DD)

Returns an array of OEE records.

Summary

GET /api/v1/oee/summary

ParameterTypeRequiredDescription
machine_iduuidYesMachine to summarize
daysintegerNoLookback window (1365, default 30)

Response200 OK

{
"machine_id": "550e8400-e29b-41d4-a716-446655440000",
"period_days": 30,
"avg_availability_pct": 91.2,
"avg_performance_pct": 88.5,
"avg_quality_pct": 98.9,
"avg_oee_pct": 79.83,
"record_count": 28,
"daily_points": [
{
"shift_date": "2026-08-07",
"oee_pct": 80.01,
"availability_pct": 92.5,
"performance_pct": 87.3,
"quality_pct": 99.08
}
]
}

The OEE calculation

OEE is the product of its three factors:

OEE = Availability x Performance x Quality
FactorDriven by
AvailabilityPlanned production time versus downtime
PerformanceActual output versus the ideal cycle time
QualityGood pieces versus total pieces