{"openapi":"3.1.0","info":{"title":"NZ Electricity Stats API","version":"1","description":"New Zealand's electricity market: real-time and historical dispatch and prices by node, energy aggregated by day, week, month and year back to 1997, generators' offers, generation outages, the HVDC, and the stations, substations and transmission lines.\n\nThe data is republished from the Electricity Authority's EMI, Transpower and em6. `GET /v1/attribution` lists each source and the credit to give it, and every `/v1` response links to it with a `Link: </v1/attribution>; rel=\"license\"` header. There's no authentication.\n\nAgents can also use the MCP server at `/mcp`, whose tools answer questions from these routes."},"tags":[{"name":"Reference","description":"Stations, substations, transmission lines and where the data comes from"},{"name":"Dispatch","description":"Each node's generation, load and price, by interval"},{"name":"Aggregates","description":"Each node's energy by day, week, month or year"},{"name":"Offers","description":"Generators' energy offers"},{"name":"Outages","description":"Generation outages from Transpower's POCP"}],"components":{"schemas":{"Attribution":{"type":"object","properties":{"sources":{"type":"array","items":{"type":"object","properties":{"data":{"type":"string","description":"The data that comes from the source"},"endpoints":{"type":"array","items":{"type":"string"},"description":"The routes that return it","example":["/v1/dispatch","/v1/offers"]},"source":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"}},"required":["name","url"]},"copyright":{"type":"object","properties":{"holder":{"type":"string"},"url":{"type":"string","format":"uri"}},"required":["holder","url"]},"licence":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"}},"required":["name","url"]},"credit":{"type":"string","description":"The credit to give it"}},"required":["data","endpoints","source","credit"]}},"disclaimer":{"type":"string"}},"required":["sources","disclaimer"]},"Generator":{"type":"object","properties":{"site":{"type":"string","description":"Site code","example":"ATI"},"name":{"type":"string","example":"Ātiamuri"},"units":{"type":"array","items":{"$ref":"#/components/schemas/Unit"}},"location":{"type":"object","properties":{"lat":{"type":"number"},"long":{"type":"number"}},"required":["lat","long"]},"gridZone":{"type":"string","enum":["UNI","CNI","LNI","USI","LSI"],"description":"The upper, central or lower North Island, or upper or lower South Island"},"island":{"type":"string","enum":["NI","SI"]},"operator":{"type":"string","example":"Mercury"},"secondaryOperator":{"type":"string","description":"Who else operates or owns it","example":"Tuaropaki Power Company"},"scheme":{"type":"string","example":"Waikato River Hydro Scheme"},"alias":{"type":"string","description":"Another site code it's known by, e.g. in POCP's outage blocks","example":"TCC"}},"required":["site","name","units","location","gridZone","island","operator"],"description":"A generating station"},"Unit":{"type":"object","properties":{"name":{"type":"string","example":"Ātiamuri"},"unitCode":{"type":"string","example":"ATI0"},"node":{"type":"string","description":"Its node in the dispatch data: point of connection and unit code","example":"ATI2201 ATI0"},"capacity":{"type":"number","description":"MW"},"installedCapacity":{"type":"number","description":"MW installed, where it's more than it can generate (e.g. Manapōuri)"},"outageBlock":{"type":"string","description":"Its outage block in POCP, where that doesn't follow from its unit code"},"fuel":{"type":"string","enum":["Hydro","Geothermal","Gas","Coal/Gas","Wind","Solar","Diesel","Battery (Charging)","Battery (Discharging)"]},"fuelCode":{"type":"string","enum":["HYD","GEO","GAS","CLG","WIN","SOL","DIE","BESS","BESS-C"]},"commissioned":{"type":"string","format":"date-time","description":"When it began generating. Absent while it's still being commissioned"},"decomissioned":{"type":"string","format":"date-time","description":"When it stopped. Absent while it's in service"},"combines":{"type":"array","items":{"type":"string"},"description":"The nodes of the units it stands in for in metered data from before the dispatch data, where the metered data doesn't separate them (e.g. Huntly's Rankine units before 2000)"}},"required":["name","unitCode","node","capacity","fuel","fuelCode"]},"Substation":{"type":"object","properties":{"lat":{"type":"number"},"long":{"type":"number"},"siteId":{"type":"string","example":"ALB"},"description":{"type":"string","example":"Albany"},"type":{"type":"string","enum":["ACSTN","TEE"],"description":"An AC station, or a tee where lines join"},"gridZone":{"type":"integer","minimum":1,"maximum":14},"island":{"type":"string","enum":["north","south"]}},"required":["lat","long","siteId","description","type","gridZone","island"]},"AggregatesStatus":{"type":"object","properties":{"latestDate":{"type":["string","null"],"format":"date","description":"The last day aggregated"},"latestHvdcDate":{"type":["string","null"],"format":"date","description":"The last day of EMI's metered HVDC flows. The HVDC's days after it come from em6 until EMI publishes them"}},"required":["latestDate","latestHvdcDate"]},"AggregateTimeseries":{"type":"object","properties":{"series":{"type":"array","items":{"type":"string"},"description":"The nodes, in the order of each row's values: units by point of connection and unit code (e.g. `HLY2201 HLY5`), and points of connection's load (e.g. `ABY0111`)","example":["ABY0111","HLY2201 HLY5"]},"data":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string","format":"date","example":"2026-10-14"}],"items":{"type":"number"}},"description":"A row for each period: its first day, then each node's generation less load (MWh). A node with no data in a period is 0","example":[["2026-10-01",-812.5,4920.1]]},"hvdc":{"type":"object","properties":{"series":{"type":"array","items":{"type":"string","enum":["northFlow","southFlow"]}},"data":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string","format":"date","example":"2026-10-14"}],"items":{"type":"number"}}}},"required":["series","data"],"description":"The energy the HVDC sent north and south in each period (MWh)"}},"required":["series","data","hvdc"]},"Message":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"DispatchDelta":{"type":"object","properties":{"lastUpdated":{"type":"string","description":"An NZ time, without an offset","example":"2026-10-14T21:55:00"},"missingUnits":{"type":"object","properties":{"generation":{"type":"object","properties":{"notInDispatchList":{"type":"array","items":{"type":"string"},"description":"Units in service that aren't in the dispatch"},"notInGeneratorList":{"type":"array","items":{"type":"string"},"description":"Units in the dispatch that aren't in /v1/generators"}},"required":["notInDispatchList","notInGeneratorList"]},"substations":{"type":"object","properties":{"notInDispatchList":{"type":"array","items":{"type":"string"},"description":"Substations with no points of connection in the dispatch"},"notInSubstationList":{"type":"array","items":{"type":"string"},"description":"Points of connection in the dispatch whose substation isn't in /v1/substations"}},"required":["notInDispatchList","notInSubstationList"]}},"required":["generation","substations"]}},"required":["lastUpdated","missingUnits"]},"RealTimeDispatch":{"type":"object","properties":{"PointOfConnectionCode":{"type":"string","example":"ATI2201 ATI0"},"FiveMinuteIntervalDatetime":{"type":"string","description":"An NZ time, without an offset","example":"2026-10-14T21:55:00"},"SPDLoadMegawatt":{"type":"number"},"SPDGenerationMegawatt":{"type":"number"},"DollarsPerMegawattHour":{"type":"number"}},"required":["PointOfConnectionCode","FiveMinuteIntervalDatetime","SPDLoadMegawatt","SPDGenerationMegawatt","DollarsPerMegawattHour"]},"RecentDispatch":{"type":"object","properties":{"series":{"type":"array","items":{"type":"string"},"description":"The nodes, in the order of each row's values: units by point of connection and unit code (e.g. `HLY2201 HLY5`), and points of connection's load (e.g. `ABY0111`)","example":["ABY0111","HLY2201 HLY5"]},"data":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string","description":"An NZ time, without an offset","example":"2026-10-14T21:55:00"}],"items":{"type":"number"}},"description":"A row for each interval: its NZ time, then each node's generation less load (MW)","example":[["2026-10-14T21:55:00",-21.4,230]]},"pricing":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string","description":"An NZ time, without an offset","example":"2026-10-14T21:55:00"}],"items":{"type":"number"}},"description":"A row for each interval: its NZ time, then each node's price ($/MWh)","example":[["2026-10-14T21:55:00",152.3,141.9]]},"hvdc":{"$ref":"#/components/schemas/HvdcTimeseries"}},"required":["series","data","pricing","hvdc"]},"HvdcTimeseries":{"type":"object","properties":{"series":{"type":"array","items":{"type":"string","enum":["northFlow","southFlow","northLimit","southLimit"]}},"data":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string","description":"An NZ time, without an offset","example":"2026-10-14T21:55:00"}],"items":{"type":["number","null"]}},"example":[["2026-10-14T21:30:00",410,0,1200,-850]]}},"required":["series","data"],"description":"The HVDC's flows and transfer limits in each half hour (MW). em6 gives the south limit as negative. Empty when there's no data for the day"},"LatestDispatch":{"type":"object","properties":{"lastUpdated":{"type":"string","description":"An NZ time, without an offset","example":"2026-10-14T21:55:00"},"substations":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Substation"},{"type":"object","properties":{"pointsOfConnection":{"type":"array","items":{"type":"object","properties":{"pointOfConnectionCode":{"type":"string","example":"ALB0331"},"load":{"type":"number","description":"MW"},"generation":{"type":"number","description":"MW"},"price":{"type":"number","description":"$/MWh"}},"required":["pointOfConnectionCode","load","generation","price"]},"description":"Absent when the dispatch has none at the substation"}}}]}},"generators":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Generator"},{"type":"object","properties":{"units":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Unit"},{"type":"object","properties":{"dispatch":{"type":"object","properties":{"load":{"type":"number","description":"MW"},"generation":{"type":"number","description":"MW"},"price":{"type":"number","description":"$/MWh"}},"required":["load","generation","price"],"description":"Absent when the unit isn't in the dispatch"},"outages":{"type":"array","items":{"type":"object","properties":{"outageBlock":{"type":"string"},"mwLost":{"type":"number"},"mwRemain":{"type":"number"},"from":{"type":"string","format":"date-time"},"until":{"type":"string","format":"date-time"}},"required":["outageBlock","mwLost","mwRemain","from","until"]}}},"required":["outages"]}]}}}}],"description":"A generating station"}}},"required":["lastUpdated","substations","generators"]},"DayDispatch":{"type":"object","properties":{"series":{"type":"array","items":{"type":"string"},"description":"The nodes, in the order of each row's values: units by point of connection and unit code (e.g. `HLY2201 HLY5`), and points of connection's load (e.g. `ABY0111`)","example":["ABY0111","HLY2201 HLY5"]},"data":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string","description":"An NZ time, without an offset","example":"2026-10-14T21:55:00"}],"items":{"type":"number"}},"description":"A row for each interval (or trading period, before 11 September 2020): its NZ time, then each node's generation less load (MW)"},"pricing":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string","description":"An NZ time, without an offset","example":"2026-10-14T21:55:00"}],"items":{"type":["number","null"]}},"description":"A row for each interval: its NZ time, then each node's price ($/MWh), or null where there's none (the metered data before 11 September 2020)"},"hvdc":{"$ref":"#/components/schemas/HvdcTimeseries"},"live":{"type":"boolean","description":"Whether it's the live dispatch's intervals so far, as EMI hasn't published the day's file yet (today, and yesterday until it does). Those are cached until the next interval is due, rather than for a day"}},"required":["series","data","pricing","hvdc","live"]},"Offers":{"type":"object","properties":{"date":{"type":"string","example":"20261014"},"data":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"tranche":{"type":"integer"},"megawatts":{"type":"number"},"price":{"type":"number","description":"$/MWh"}},"required":["tranche","megawatts","price"]}}},"description":"By trading period (1-50) then unit node, the tranches offering more than 0 MW. Each is what was offered in it, so a unit's can add up to more than its forecast","example":{"37":{"WWD1102 WWD1":[{"tranche":1,"megawatts":30,"price":0.01}]}}},"fogp":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"number"}},"description":"Intermittent units' forecast of generation potential (MW), by trading period then unit node. Empty before 24 October 2019, and for older days that haven't been backfilled yet","example":{"37":{"WWD1102 WWD1":42.5}}}},"required":["date","data","fogp"]},"OutagesByUnit":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"outageBlock":{"type":"string","example":"HLY_1"},"timeStart":{"type":"string","format":"date-time"},"timeEnd":{"type":"string","format":"date-time"},"mwattLost":{"type":"number"}},"required":["outageBlock","timeStart","timeEnd","mwattLost"]}},"description":"By unit node"},"TransmissionLines":{"type":"object","properties":{"type":{"type":"string","enum":["FeatureCollection"]},"features":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["Feature"]},"geometry":{"type":["object","null"],"properties":{"type":{"type":"string","enum":["LineString","MultiLineString"]},"coordinates":{"type":"array","items":{}}},"required":["type","coordinates"],"description":"A LineString or MultiLineString, in WGS 84"},"properties":{"type":"object","properties":{"MXLOCATION":{"type":"string","example":"AHA-DOB-A"},"designvolt":{"type":"string","description":"kV","example":"66"},"status":{"type":"string","example":"COMMISSIONED"},"description":{"type":"string","example":"Arahura - Dobson A"},"type":{"type":"string","example":"TRANSLINE"}},"required":["MXLOCATION","designvolt","status","description","type"]}},"required":["type","geometry","properties"]}}},"required":["type","features"]}},"parameters":{}},"paths":{"/v1/attribution":{"get":{"tags":["Reference"],"operationId":"getAttribution","summary":"Where the data comes from","description":"Each data source, which routes use it, and the credit to give it when re-using its data.","responses":{"200":{"description":"The sources","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attribution"}}}}}}},"/v1/definitions":{"get":{"tags":["Reference"],"operationId":"getDefinitions","summary":"Generators and substations","description":"`/v1/generators` and `/v1/substations` in one response.","responses":{"200":{"description":"The generators and substations","content":{"application/json":{"schema":{"type":"object","properties":{"generators":{"type":"array","items":{"$ref":"#/components/schemas/Generator"}},"substations":{"type":"array","items":{"$ref":"#/components/schemas/Substation"}}},"required":["generators","substations"]}}}}}}},"/v1/generators":{"get":{"tags":["Reference"],"operationId":"listGenerators","summary":"Generating stations and their units","description":"Every station, including decommissioned ones, with each unit's node in the dispatch data, capacity and fuel.","responses":{"200":{"description":"The stations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Generator"}}}}}}}},"/v1/substations":{"get":{"tags":["Reference"],"operationId":"listSubstations","summary":"Grid substations","responses":{"200":{"description":"The substations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Substation"}}}}}}}},"/v1/dispatch/aggregates":{"get":{"tags":["Aggregates"],"operationId":"getAggregatesStatus","summary":"How far the aggregates go","responses":{"200":{"description":"The latest days","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatesStatus"}}}}}}},"/v1/dispatch/aggregates/{year}/weekly":{"get":{"tags":["Aggregates"],"operationId":"getWeeklyAggregates","summary":"Each ISO week in a year","description":"Each node's net energy in each ISO week (Monday to Sunday) of the ISO week year, so it can include the first few days of the next year.","parameters":[{"schema":{"type":"string","pattern":"^[0-9]{4}$","example":"2026"},"required":true,"name":"year","in":"path"},{"schema":{"type":"string","description":"Only the nodes starting with one of these, comma separated, e.g. `HLY2201,ABY0111`. It doesn't apply to `hvdc`"},"required":false,"description":"Only the nodes starting with one of these, comma separated, e.g. `HLY2201,ABY0111`. It doesn't apply to `hvdc`","name":"nodes","in":"query"}],"responses":{"200":{"description":"The period's data points. Periods that have ended are cached for a long time, ones with days from the live dispatch for a few minutes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregateTimeseries"}}}},"400":{"description":"The year or month isn't valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"404":{"description":"Nothing has been aggregated for the period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}}}}},"/v1/dispatch/aggregates/{year}/monthly":{"get":{"tags":["Aggregates"],"operationId":"getMonthlyAggregates","summary":"Each month in a year","parameters":[{"schema":{"type":"string","pattern":"^[0-9]{4}$","example":"2026"},"required":true,"name":"year","in":"path"},{"schema":{"type":"string","description":"Only the nodes starting with one of these, comma separated, e.g. `HLY2201,ABY0111`. It doesn't apply to `hvdc`"},"required":false,"description":"Only the nodes starting with one of these, comma separated, e.g. `HLY2201,ABY0111`. It doesn't apply to `hvdc`","name":"nodes","in":"query"}],"responses":{"200":{"description":"The period's data points. Periods that have ended are cached for a long time, ones with days from the live dispatch for a few minutes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregateTimeseries"}}}},"400":{"description":"The year or month isn't valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"404":{"description":"Nothing has been aggregated for the period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}}}}},"/v1/dispatch/aggregates/{year}/{month}":{"get":{"tags":["Aggregates"],"operationId":"getDailyAggregates","summary":"Each day in a month","description":"Each node's net energy on each day of the month. The days EMI hasn't published yet (e.g. today so far) come from the live dispatch.","parameters":[{"schema":{"type":"string","pattern":"^[0-9]{4}$","example":"2026"},"required":true,"name":"year","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":12,"example":10},"required":true,"name":"month","in":"path"},{"schema":{"type":"string","description":"Only the nodes starting with one of these, comma separated, e.g. `HLY2201,ABY0111`. It doesn't apply to `hvdc`"},"required":false,"description":"Only the nodes starting with one of these, comma separated, e.g. `HLY2201,ABY0111`. It doesn't apply to `hvdc`","name":"nodes","in":"query"}],"responses":{"200":{"description":"The period's data points. Periods that have ended are cached for a long time, ones with days from the live dispatch for a few minutes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregateTimeseries"}}}},"400":{"description":"The year or month isn't valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"404":{"description":"Nothing has been aggregated for the period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}}}}},"/v1/dispatch/aggregates/annual":{"get":{"tags":["Aggregates"],"operationId":"getAnnualAggregates","summary":"Each year","description":"Each node's net energy in each year since 1997.","parameters":[{"schema":{"type":"string","description":"Only the nodes starting with one of these, comma separated, e.g. `HLY2201,ABY0111`. It doesn't apply to `hvdc`"},"required":false,"description":"Only the nodes starting with one of these, comma separated, e.g. `HLY2201,ABY0111`. It doesn't apply to `hvdc`","name":"nodes","in":"query"}],"responses":{"200":{"description":"The period's data points. Periods that have ended are cached for a long time, ones with days from the live dispatch for a few minutes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregateTimeseries"}}}},"400":{"description":"The year or month isn't valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"404":{"description":"Nothing has been aggregated for the period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}}}}},"/v1/dispatch/delta":{"get":{"tags":["Dispatch"],"operationId":"getDispatchDelta","summary":"Nodes missing from the definitions or the dispatch","description":"Compares the latest interval with `/v1/generators` and `/v1/substations`, to find units and substations that need adding to them, or that the dispatch no longer has.","responses":{"200":{"description":"What's missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispatchDelta"}}}},"503":{"description":"The dispatch hasn't been synced yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}}}}},"/v1/dispatch/rtd":{"get":{"tags":["Dispatch"],"operationId":"getRealTimeDispatch","summary":"EMI's real-time dispatch, as is","description":"A proxy to EMI's real-time dispatch API, which it caches for a minute. `/v1/dispatch/recent` and `/v1/dispatch/latest` are usually more useful.","responses":{"200":{"description":"EMI's response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RealTimeDispatch"}}}}}}}},"/v1/dispatch/recent":{"get":{"tags":["Dispatch"],"operationId":"getRecentDispatch","summary":"The last 3 days' dispatch","description":"Each node's generation less load and price in each 5-minute interval over the last 3 days, from EMI's real-time dispatch, and the HVDC's half hours over the same days. It's cached until the next interval is due.","parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$","description":"Only the intervals after this NZ time, e.g. the latest one a client already has. `hvdc` still has all its half hours","example":"2026-10-14T21:55:00"},"required":false,"description":"Only the intervals after this NZ time, e.g. the latest one a client already has. `hvdc` still has all its half hours","name":"since","in":"query"}],"responses":{"200":{"description":"The intervals, empty until the first sync","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecentDispatch"}}}},"400":{"description":"since isn't an NZ time like 2026-10-14T21:55:00","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}}}}},"/v1/dispatch/latest":{"get":{"tags":["Dispatch"],"operationId":"getLatestDispatch","summary":"The latest interval, by station and substation","description":"The generators and substations, with each unit's dispatch and current outages, and each substation's points of connection, in the latest 5-minute interval.","responses":{"200":{"description":"The latest interval","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LatestDispatch"}}}},"503":{"description":"The dispatch hasn't been synced yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}}}}},"/v1/dispatch/{date}":{"get":{"tags":["Dispatch"],"operationId":"getDayDispatch","summary":"A day's dispatch","description":"Each node's generation less load and price in each 5-minute interval of an NZ day, from EMI's daily dispatch files, and the HVDC's half hours. EMI publishes each day's file the day after, so until then it's the intervals so far from the real-time dispatch, as in `/v1/dispatch/recent`. Before 11 September 2020 (back to August 1997) it's each unit's average metered generation and each point of connection's load in each half-hour trading period instead, without prices.","parameters":[{"schema":{"type":"string","description":"An NZ day, as YYYY-MM-DD or YYYYMMDD","example":"2026-10-14"},"required":true,"description":"An NZ day, as YYYY-MM-DD or YYYYMMDD","name":"date","in":"path"}],"responses":{"200":{"description":"The day's intervals","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DayDispatch"}}}},"404":{"description":"No data for this date","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}}}}},"/v1/offers/{date}":{"get":{"tags":["Offers"],"operationId":"getOffers","summary":"A day's energy offers","description":"Each unit's energy offers in each trading period, and intermittent units' forecasts of generation potential (FOGP). EMI publishes them about a day after.","parameters":[{"schema":{"type":"string","description":"An NZ day, as YYYY-MM-DD or YYYYMMDD, or `latest` for the latest one synced","example":"latest"},"required":true,"description":"An NZ day, as YYYY-MM-DD or YYYYMMDD, or `latest` for the latest one synced","name":"date","in":"path"}],"responses":{"200":{"description":"The day's offers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Offers"}}}},"404":{"description":"No data for this date","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"503":{"description":"Offers have not been synced yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}}}}},"/v1/outages":{"get":{"tags":["Outages"],"operationId":"listOutages","summary":"Current generation outages","description":"The outages going on from 14 days ago to 3 days ahead, by unit.","responses":{"200":{"description":"The outages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutagesByUnit"}}}}}}},"/v1/outages/{date}":{"get":{"tags":["Outages"],"operationId":"getDayOutages","summary":"A day's generation outages","description":"The outages going on at any time in an NZ day, by unit, back to at least 2012. Each is mapped to the units in service as the day ends.","parameters":[{"schema":{"type":"string","format":"date","description":"An NZ day","example":"2024-03-10"},"required":true,"description":"An NZ day","name":"date","in":"path"}],"responses":{"200":{"description":"The outages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutagesByUnit"}}}},"400":{"description":"Invalid date, expected an NZ date like 2026-10-14","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"503":{"description":"POCP is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}}}}},"/v1/transmission-lines":{"get":{"tags":["Reference"],"operationId":"getTransmissionLines","summary":"The grid's transmission lines","description":"Transpower's lines and cables as GeoJSON, simplified to within about 5m. They rarely change, so are cached for a day.","responses":{"200":{"description":"The lines","content":{"application/geo+json":{"schema":{"$ref":"#/components/schemas/TransmissionLines"}}}},"502":{"description":"ArcGIS is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}}},"webhooks":{},"servers":[{"url":"https://api.electricitymap.frenchsta.gg"}]}