API-Coils
Preliminary: subject to change
The Coils API exposes the coils currently in inventory and provides a synchronous move endpoint. The move endpoint writes through to Classic (the legacy coils.dbf STORELOC column) so the legacy operator screen and Eclipse Pro stay in sync.
See API-Getting Connected for the Authorization: ApiKey ... header.
Conventions
- Location values are bare codes like
"MACH01"or"WHSE00", not Raven document ids. The internal"Location/"prefix is never returned and is not accepted in requests. - Completed coils (
isComplete == true) are excluded by default from list/search results. UseincludeComplete=trueto include them.
Endpoints
GET /api/v1/coils (list coils)
A flat list of coils. For richer filters, sort, and a total-count envelope, use GET /api/v1/coils/search instead.
Parameters
name type data type description materialCodeoptional string Exact match on material code. locationoptional string Exact match on the coil's current storage location code. includeCompleteoptional bool When true, include coils marked complete. Defaultfalse.skipoptional int Items to skip. Default 0.takeoptional int Items to take. Default 100, max1000.
Responses
http code content-type response 200application/jsonArray of coils (possibly empty). 401application/jsonMissing or invalid API key.
Response shape
[
{
"coilId": "1006779584",
"materialCode": "26GA-FG",
"description": "26GA FOREST GREEN",
"materialType": "STEEL",
"color": "FOREST GREEN",
"gauge": 26,
"widthIn": 36.0,
"lengthStartFt": 2500.0,
"lengthRemainingFt": 1842.0,
"currentWeightLbs": 4818.7,
"isComplete": false,
"isStarted": true,
"location": "MACH01",
"dateIn": "2026-03-14T00:00:00",
"vendorName": "MetalCo",
"heatNumber": "H12345",
"purchaseOrder": "PO-9876"
}
]
Example cURL
curl -H "Authorization: ApiKey YOUR_KEY" \"http://localhost:8080/api/v1/coils?materialCode=26GA-FG&location=MACH01"
GET /api/v1/coils/{coilId} (get one coil)
Parameters
name location data type description coilIdpath string The coil id.
Responses
http code content-type response 200application/jsonCoil object (same shape as the list endpoint). 404application/json{ "errors": ["No coil with id ..."] }.401application/jsonMissing or invalid API key.
Example cURL
curl -H "Authorization: ApiKey YOUR_KEY" \"http://localhost:8080/api/v1/coils/1006779584"
GET /api/v1/coils/search (faceted search + sort + total-count envelope)
Richer search with material- and coil-attribute filters, sortable, and returns a paged envelope with a total count that ignores skip/take. Filters compose with AND semantics.
Material attributes (materialType, color, gauge, widthIn) and coil attributes (vendorName, heatNumber, purchaseOrder) are resolved through Material and Coil lookups respectively, then narrowed against the CoilState index — so paging stays accurate.
Parameters
name type data type description materialCodeoptional string Exact match on material code. materialTypeoptional string Material type (resolved via material lookup). coloroptional string Material color (resolved via material lookup). gaugeoptional int Material gauge (resolved via material lookup). widthInoptional decimal Material width in inches (resolved via material lookup). locationoptional string Current storage location code. includeCompleteoptional bool When true, include coils marked complete. Defaultfalse.minRemainingFtoptional decimal Inclusive lower bound on remaining length in feet. maxRemainingFtoptional decimal Inclusive upper bound on remaining length in feet. isStartedoptional bool When set, filters by whether production has started on the coil. vendorNameoptional string Exact match on vendor name (resolved via coil lookup). heatNumberoptional string Exact match on heat number (resolved via coil lookup). purchaseOrderoptional string Exact match on purchase order (resolved via coil lookup). sortoptional enum One of CoilId(default),LengthRemainingFt,LengthStartFt,DateIn.descendingoptional bool When true, sort descending. Default ascending.skipoptional int Items to skip. Default 0.takeoptional int Items to take. Default 100, max1000.
Responses
http code content-type response 200application/jsonPaged result envelope. itemsmay be empty;totalreflects the unpaged count.401application/jsonMissing or invalid API key.
Response shape
{
"total": 42,
"skip": 0,
"take": 100,
"items": [
{ "coilId": "1006779584", "materialCode": "26GA-FG", "location": "MACH01", "lengthRemainingFt": 1842.0, "isComplete": false /* … */ }
]
}
Example cURL
curl -H "Authorization: ApiKey YOUR_KEY" \"http://localhost:8080/api/v1/coils/search?color=FOREST%20GREEN&gauge=26&minRemainingFt=100&sort=LengthRemainingFt&descending=true"
POST /api/v1/coils/{coilId}/location (move a coil to a different location)
Moves a single coil. The move is synchronous — when this returns 200 OK, both Classic and Eclipse Pro have been updated.
Order of operations:
- The Eclipse Agent is called to update
coils.dbf STORELOCin Classic. - If the Agent succeeds, Eclipse Pro's
CoilExt.LocationIdis updated to match.
If the Agent is offline or rejects the update, no Eclipse Pro state is changed — the two stores cannot half-apply. The Classic operator screen will reflect the new location on its next refresh.
Parameters
name location data type description coilIdpath string The coil id.
Body
{
"location": "MACH01"
}
| field | required | description |
|---|---|---|
location | yes | Destination location code. Must match an existing LocationV1.code. |
Responses
http code content-type response 200The move was applied in both Classic and Eclipse Pro. 400application/json{ "errors": [...] }.locationmissing, destination unknown, coil has noCoilExt, or the Agent rejected.404application/json{ "errors": ["No coil with id ..."] }.503application/json{ "errors": ["AgentNotAvailable"] }. The Classic agent is offline; nothing changed.401application/jsonMissing or invalid API key.
Example cURL
curl -X POST \-H "Authorization: ApiKey YOUR_KEY" \-H "Content-Type: application/json" \-d '{"location":"MACH01"}' \"http://localhost:8080/api/v1/coils/1006779584/location"