Skip to main content

API-Materials

note

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
nametypedata typedescription
materialCodeoptionalstringExact match on the material code.
coloroptionalstringExact match on color.
typeoptionalstringExact match on material type.
gaugeoptionalintExact match on gauge.
skipoptionalintItems to skip. Default 0.
takeoptionalintItems to take. Default 1000, max 1000.
Responses
http codecontent-typeresponse
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
namelocationdata typedescription
materialCodepathstringThe material code.
Responses
http codecontent-typeresponse
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
namelocationdata typedescription
materialCodepathstringThe material code.
includeCompletequeryboolWhen true, include coils marked complete. Default false.
skipqueryintItems to skip. Default 0.
takequeryintItems to take. Default 100, max 1000.
Responses
http codecontent-typeresponse
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
namelocationdata typedescription
materialCodepathstringThe material code.
startDatequerydatetimeOptional inclusive lower bound on production date (ISO 8601 / UTC).
endDatequerydatetimeOptional inclusive upper bound on production date (ISO 8601 / UTC).
Responses
http codecontent-typeresponse
200application/jsonSummary object. Returns zeroed fields with startDate/endDate null if 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
}
fielddescription
recordCountNumber of underlying rows aggregated.
totalFeetTotal consumed feet (good + scrap + reclaimed).
scrapPctscrapFeet / (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"