All /api/* requests require an API key passed as the X-API-Key header. Per-client rate limits are configured at key issuance.
curl -H "X-API-Key: YOUR_KEY" "https://strata-intel.uk/api/score?postcode=SW1A+1AA"
GET /api/score?postcode={postcode} or /api/score?session={token}
Score a GB postcode or polygon session for grid reinforcement probability. Returns JSON.
GET /api/report?postcode={postcode} or /api/report?session={token}
Branded 4-page A4 PDF report (cover with site map · network context · constraint detail with DFES chart · methodology). Returns application/pdf.
POST /api/session
Create a polygon-based scoring session. Body must be JSON with a polygon key containing a GeoJSON Polygon geometry (or Feature wrapping one). Optional: postcode (display label only), source (free-form, e.g. "upload").
curl -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"polygon": {"type":"Polygon","coordinates":[[[-1.5,52.4],[-1.49,52.4],[-1.49,52.41],[-1.5,52.41],[-1.5,52.4]]]}}' \
https://strata-intel.uk/api/session
Returns {session_token, polygon_area_m2, centroid_lon, centroid_lat, expires_at}. Sessions expire after 24h. Pass the token to /api/score or /api/report as ?session=TOKEN.
GET /health
Health check. No authentication. Returns {"status":"ok","version":"v1.4"}
/api/score)| Field | Type | Description |
|---|---|---|
status | string | "ok", "not_yet_covered", "geocode_failed", "no_substation" |
postcode | string | Formatted postcode (display label only for session-based requests) |
lon, lat | float | Site coordinates (centroid for polygon sessions) |
dno | object | parent_group, licence_area, dno_code, description |
substation | object | name, level, key, match_method, distance_m |
rag | string | GREEN AMBER RED |
rag_reason | string | Human-readable explanation |
scheme | object|null | DNOA constraint scheme details if matched |
dfes | object | DFES forecast (matched: bool, scenarios, sample, peak_demand) |
confidence | string | "high" (polygon + DNOA), "moderate" (nearest + data), "indicative" |
data_vintage | object | Publication dates and sources per data type |
constraint_methodology | string | How the constraint was derived for this DNO |
disclaimer | string | Legal disclaimer |
session | object | (only when ?session= was used) token, polygon_area_m2, centroid_lon, centroid_lat |
| RAG | Canonical decision | Meaning |
|---|---|---|
| RED | ASSET_SOLUTION | Substation requires reinforcement; new connections likely delayed or expensive |
| AMBER | MANAGE_WITH_FLEX / REINFORCE_WITH_FLEX | Constraint exists; managed via flexibility or reinforcement planned |
| GREEN | OPERATIONAL_ONLY | No active constraint; connections expected to proceed normally |
| DNO | Substations | Match | DNOA | DFES |
|---|---|---|---|---|
| SPEN (SPD+SPM) | 992 | Polygon | 49 published | 681K rows |
| NGED (4 regions) | 1,153 | Nearest | 142 published | 104K rows |
| UKPN (EPN+LPN+SPN) | 982 | Nearest | 982 headroom-derived | 177K rows |
| NPg | 668 | Nearest | 668 utilisation-derived | 884K rows |
| SSEN (SEPD+SHEPD) | 753 | Polygon+Nearest | 686 headroom-derived | 41K rows |
| ENWL | 402 | Nearest | 360 demand-derived | 62K rows |
Contact rod.adkins@terradatum.io for pricing and API key provisioning.
Per-client, configured at key issuance. Default 30 requests/minute. Session creation limited to 10/minute/IP on the UI endpoint. Higher limits available on request.