API-Materials
Preliminary: subject to change
The Materials API exposes the master-data list of materials, their coils currently in inventory, and an aggregated production-consumption summary per material. It is read-only — the public API does not yet support creating or updating materials.
See API-Getting Connected for the Authorization: ApiKey ... header.
Endpoints
GET /api/v1/materials (list materials)
Parameters
name type data type description materialCodeoptional string Exact match on the material code. coloroptional string Exact match on color. typeoptional string Exact match on material type. gaugeoptional int Exact match on gauge. skipoptional int Items to skip. Default 0.takeoptional int Items to take. Default 1000, max1000.
Responses
http code content-type response 200application/jsonArray of materials (possibly empty). 401application/jsonMissing or invalid API key.
Response shape
[
{
"materialCode": "26GA-FG",
"description": "26GA FOREST GREEN",
"gauge": 26,
"color": "FOREST GREEN",
"widthIn": 36.0,
"thicknessIn": 0.018,
"type": "STEEL",
"lbsPerFt": 2.616
}
]
Example cURL
curl -H "Authorization: ApiKey YOUR_KEY" \"http://localhost:8080/api/v1/materials?gauge=26&color=FOREST%20GREEN"
GET /api/v1/materials/{materialCode} (get one material)
Parameters
name location data type description materialCodepath string The material code.
Responses
http code content-type response 200application/jsonMaterial object. 404application/json{ "errors": ["No material with code ..."] }.401application/jsonMissing or invalid API key.
Example cURL
curl -H "Authorization: ApiKey YOUR_KEY" \"http://localhost:8080/api/v1/materials/26GA-FG"
GET /api/v1/materials/{materialCode}/coils (coils for a material)
Returns the coils in inventory for the given material. Same shape as GET /api/v1/coils, scoped to one material. Completed coils are excluded by default.
Parameters
name location data type description materialCodepath string The material code. includeCompletequery bool When true, include coils marked complete. Defaultfalse.skipquery int Items to skip. Default 0.takequery int Items to take. Default 100, max1000.
Responses
http code content-type response 200application/jsonArray of coils (possibly empty if no coils for the material). 401application/jsonMissing or invalid API key.
See API-Coils for the coil response shape.
Example cURL
curl -H "Authorization: ApiKey YOUR_KEY" \"http://localhost:8080/api/v1/materials/26GA-FG/coils?includeComplete=false"
GET /api/v1/materials/{materialCode}/consumptionSummary (production rollup for a material)
Aggregated rollup of every production-consumption row for the given material, optionally bounded by a production-date range. Useful for reporting integrations that need totals (good feet, scrap feet, run minutes, average FPM, scrap percentage) for a specific material across a window.
Parameters
name location data type description materialCodepath string The material code. startDatequery datetime Optional inclusive lower bound on production date (ISO 8601 / UTC). endDatequery datetime Optional inclusive upper bound on production date (ISO 8601 / UTC).
Responses
http code content-type response 200application/jsonSummary object. Returns zeroed fields with startDate/endDatenullif no rows match (not 404).401application/jsonMissing or invalid API key.
Response shape
{
"materialCode": "26GA-FG",
"startDate": "2026-04-01T00:00:00",
"endDate": "2026-04-30T23:59:59",
"recordCount": 1284,
"goodPieceCount": 8412,
"scrapPieceCount": 137,
"totalFeet": 152340.0,
"goodFeet": 147800.0,
"scrapFeet": 3420.0,
"reclaimedScrapFeet": 1120.0,
"scrapPct": 0.022,
"totalMinutes": 14520.0,
"runMinutes": 9810.0,
"nonExemptMinutes": 2110.0,
"exemptMinutes": 1840.0,
"avgFPM": 15
}
| field | description |
|---|---|
recordCount | Number of underlying rows aggregated. |
totalFeet | Total consumed feet (good + scrap + reclaimed). |
scrapPct | scrapFeet / (goodFeet + scrapFeet + reclaimedScrapFeet). 0 when total is 0. |
avgFPM | (goodFeet + reclaimedScrapFeet) / runMinutes, rounded. 0 when runMinutes == 0. |
Example cURL
curl -H "Authorization: ApiKey YOUR_KEY" \"http://localhost:8080/api/v1/materials/26GA-FG/consumptionSummary?startDate=2026-04-01&endDate=2026-04-30"