Get work order materials
GET/work-orders/:workOrderId/materials
Returns per-material cost and usage detail for a work order. Each material entry shows the expected vs. actual quantity consumed, expected vs. actual unit cost and total cost, quantity and cost variances, and waste metrics (waste quantity and waste as a percentage of expected). If waste is tracked at the lot level, a lotDetails array breaks down exactly which inventory lots were consumed and at what cost. Use this to pinpoint which ingredients drove cost overruns or generated excessive waste in a production run.
Request
Response
- 200
- 401
- 404
Material cost breakdown
Unauthorized — missing or invalid API key
Resource not found
Response
{
"workOrderId": null,
"workOrderNumber": null,
"materials": [
{
"itemId": "2087",
"itemName": "Organic Tahini",
"inventoryCode": "INV-000312",
"unit": "lbs",
"expectedQuantity": 12.5,
"expectedUnitCost": 3.25,
"expectedTotalCost": 40.63,
"actualQuantity": 13.1,
"actualUnitCost": 3.25,
"actualTotalCost": 42.58,
"quantityVariance": 0.6,
"costVariance": 1.95,
"costVariancePercentage": 4.8,
"wasteQuantity": 0.6,
"wastePercentage": 4.8,
"lotDetails": [
{
"lotId": null,
"quantity": null,
"unit": null,
"cost": null
}
]
}
]
}