GEGHA cloud API specification
This document describes the cloud API through which Hiringa and Sundial exchange optimiser data for GEGHA. Hiringa reviews this version. A machine-readable version for developers will follow once Hiringa confirms the fields and cadence. Revision 3 applies the three changes agreed on the call of 10 September 2026. Section 10 lists them.
1. What the API carries
| Resource | Direction | Content | Cadence |
|---|---|---|---|
| Energy objective | Hiringa sends | The site's energy demand per 30-minute interval as named load series, each with a shortfall cost, and a target state of charge at the end of the window | Every 30 minutes, rolling |
| PV forecast | Hiringa reads | Forecast PV energy per 30-minute interval, per inverter station | Refreshed every 30 minutes, up to 14 days ahead |
| Price forecast | Hiringa reads | Net price per 30-minute interval | Refreshed every 30 minutes, 24 hours ahead |
| Parameters | Hiringa reads | The optimiser parameter values in force for the plant | On request |
2. How Hiringa connects
Sundial issues Hiringa a service account and a token for the GEGHA plant. Every request carries the token in the Authorization header. The token grants access to the GEGHA plant only. Requests go to the Sundial API over HTTPS at api.sundial.energy. Every resource sits under the plant's address, which Sundial supplies with the token.
3. Conventions
These match the conventions already agreed for the data exchange.
- All timestamps are UTC in ISO 8601 form, for example 2026-09-10T04:30:00Z.
- Every interval is 30 minutes long. The end time identifies each interval.
- Energy is in kilowatt-hours. Price is in Australian dollars per megawatt-hour and may be negative.
- Sundial matches intervals by end time, not by position in the list.
4. Energy objective
Hiringa sends the full set of intervals for the window in one request. Each request replaces the previous objective in full. The objective holds one series per load that Hiringa schedules. The first round names one load: the hydrogen plant. The gin stays outside the API for now. Section 4.3 explains why.
Each load carries a shortfall cost in AUD per MWh. The cost tells Sundial what it costs Hiringa when the site does not receive the energy the load asked for. The optimiser treats the demand as a soft constraint. It meets the demand unless the market value of the energy in an interval exceeds the shortfall cost. Hiringa sets the cost high when a contract binds production and low when production is opportunistic. Hiringa can change the cost with every objective.
4.1 Request
| Field | Unit | Required | Meaning |
|---|---|---|---|
| horizonHours | hours | Yes | 24 or 48. The window the intervals cover. |
| generatedAt | timestamp | Yes | When Hiringa produced this objective. |
| targetSocPercentAtEnd | % | No | The state of charge the battery must hold at the end of the window. Omit it when there is no requirement. |
| loads | list | Yes | One entry per load. Each has a name, a shortfall cost, and its intervals. |
| loads[].name | text | Yes | "hydrogen". Sundial rejects other names until they are agreed. |
| loads[].shortfallCostAudPerMwh | AUD/MWh | Yes | The cost to Hiringa of each MWh the load asked for and did not receive. Zero or positive. |
| loads[].intervals | list | Yes | 48 entries for 24 hours or 96 for 48 hours. Each has an end time and an energy value. |
| loads[].intervals[].endsAt | timestamp | Yes | End of the interval. |
| loads[].intervals[].energyKwh | kWh | Yes | Energy the load requires in the interval. Zero or positive. |
Example request, shortened to 2 intervals:
{
"horizonHours": 24,
"generatedAt": "2026-09-24T04:02:11Z",
"targetSocPercentAtEnd": 60,
"loads": [
{
"name": "hydrogen",
"shortfallCostAudPerMwh": 450,
"intervals": [
{ "endsAt": "2026-09-24T04:30:00Z", "energyKwh": 1250 },
{ "endsAt": "2026-09-24T05:00:00Z", "energyKwh": 1250 }
]
}
]
}
4.2 Response
Sundial replies with the time it received the objective and a plan assessment. The assessment lists every interval in which Sundial plans to deliver less than the load asked for, with the shortfall in kWh and the reason. There are two reasons.
- capacity: the battery and the forecast PV cannot supply the energy. Sundial raises an alert to both parties.
- price: the battery and the PV can supply the energy, but the forecast market value of the energy exceeds the shortfall cost. Sundial plans to export instead. Sundial raises no alert, because Hiringa priced this outcome.
The objective stays in force either way, so Hiringa sees what Sundial will do with it. Sundial re-solves every 5 minutes, so the assessment can change between objectives. Hiringa can read the objective in force, with its latest assessment, at any time from the same address.
| Response field | Unit | Meaning |
|---|---|---|
| receivedAt | timestamp | When Sundial stored the objective. |
| feasible | true or false | False when any interval has a capacity shortfall. |
| shortfalls | list | Empty when Sundial plans to meet every interval in full. Otherwise one entry per load and interval with a shortfall. |
| shortfalls[].load | text | The load name. |
| shortfalls[].endsAt | timestamp | End of the interval. |
| shortfalls[].energyKwh | kWh | Energy the load will not receive in that interval. |
| shortfalls[].reason | text | "capacity" or "price". |
Example response, with one interval short on capacity and one short on price:
{
"receivedAt": "2026-09-24T04:02:14Z",
"feasible": false,
"shortfalls": [
{
"load": "hydrogen",
"endsAt": "2026-09-24T07:30:00Z",
"energyKwh": 1250,
"reason": "price"
},
{
"load": "hydrogen",
"endsAt": "2026-09-24T18:30:00Z",
"energyKwh": 310,
"reason": "capacity"
}
]
}
Sundial rejects a request, and keeps the previous objective, when any of these hold:
- A load name is not one of the agreed names.
- A shortfall cost is missing or negative.
- The interval count does not match the horizon, in any load.
- An interval does not end on a 30-minute boundary, or the intervals are not contiguous.
- An energy value is negative, or the total across loads exceeds the plant's capacity for one interval.
- The target state of charge is outside the plant's configured band.
4.3 The gin
The gin does not appear in the API in the first round. Sundial keeps the current arrangement from Stage 1. The site operator sets the ginning season and the daily windows on the Sundial dashboard. The optimiser models the gin as a constant load inside those windows. The optimiser reserves that load before the hydrogen plant demand and before any trade. Ginning for 2026 has finished. The next season starts around March 2027, so the gin has no effect on the first round of commissioning.
Later, Hiringa will receive the gin operator's schedule in its own systems. Hiringa and Sundial will then add a second named load, "gin", with the same fields as the hydrogen load. That is a future change to this specification.
5. PV forecast
Sundial's forecast of PV energy available per interval, for each inverter station and for the whole site.
| Field | Unit | Meaning |
|---|---|---|
| generatedAt | timestamp | When Sundial produced the forecast. |
| horizonHours | hours | How far ahead the forecast runs, up to 336. |
| stations | list | One entry per inverter station, plus one for the whole site. |
| stations[].name | text | The station name, for example "Central SS10", or "Site". |
| stations[].intervals[].endsAt | timestamp | End of the interval. |
| stations[].intervals[].energyKwh | kWh | Forecast PV energy available in the interval. |
Example response, shortened to one station and 2 intervals:
{
"generatedAt": "2026-09-24T04:00:00Z",
"horizonHours": 336,
"stations": [
{
"name": "Central SS10",
"intervals": [
{ "endsAt": "2026-09-24T04:30:00Z", "energyKwh": 1840 },
{ "endsAt": "2026-09-24T05:00:00Z", "energyKwh": 2010 }
]
}
]
}
6. Price forecast
Sundial's forecast of the net value of energy per interval, 24 hours ahead.
| Field | Unit | Meaning |
|---|---|---|
| generatedAt | timestamp | When Sundial produced the forecast. |
| horizonHours | hours | 24. |
| intervals[].endsAt | timestamp | End of the interval. |
| intervals[].netPriceAudPerMwh | AUD/MWh | Forecast net price. May be negative. |
Example response, shortened to 2 intervals:
{
"generatedAt": "2026-09-24T04:00:00Z",
"horizonHours": 24,
"intervals": [
{ "endsAt": "2026-09-24T04:30:00Z", "netPriceAudPerMwh": 85.5 },
{ "endsAt": "2026-09-24T05:00:00Z", "netPriceAudPerMwh": -12.0 }
]
}
7. Parameters
The optimiser parameter values in force for the plant. The companion document lists the parameters and their update channels: GEGHA optimisation model and configurable parameters. This resource is read only. Changes go through the channels in that document. The shortfall cost is not a parameter. It travels with each energy objective.
| Field | Unit |
|---|---|
| batteryDegradationCostAudPerMwh | AUD per MWh cycled |
| minSocPercent | % |
| maxSocPercent | % |
| targetSocPercentAtEnd | %, from the current energy objective |
| roundTripEfficiency | fraction |
| rampRateMwPerMin | MW per minute |
| gridImportLimitMw | MW |
| exportLimitMw | MW |
| ginLoadKw | kW, the constant gin load the optimiser reserves while the gin runs. Zero outside the ginning season |
| updatedAt | timestamp of the last change to any value |
8. When something goes wrong
| Situation | What Sundial does | What Hiringa does |
|---|---|---|
| The token is missing, expired, or for another plant | Refuses the request and says why | Requests a new token from Sundial |
| An energy objective fails validation | Refuses it, names the first failing rule, and keeps the previous objective in force | Corrects and resends |
| The plant cannot supply the demand | Accepts the objective, returns the capacity shortfall per interval, and alerts both parties | Revises the demand or accepts the shortfall |
| The market value of energy exceeds the shortfall cost | Accepts the objective, plans to export in those intervals, and returns the price shortfall per interval | Raises the shortfall cost if the demand must be met, or accepts the shortfall |
| No objective has arrived for more than 60 minutes | Keeps using the last valid objective and alerts both parties. The optimiser does not stop | Investigates the sending side |
| A forecast is stale | The generatedAt field shows its age | Applies its own tolerance |
| Sundial is unavailable | Requests fail with a clear service error. The on-site devices continue to follow the last curve | Retries at the next 30-minute cycle |
9. Cadence and limits
- Hiringa sends the energy objective once per 30-minute cycle, within 5 minutes of the half hour.
- Hiringa reads the forecasts once per cycle.
- Sundial accepts up to 60 requests per minute from the Hiringa account. That is far above the expected 6 to 10 per half hour.
10. Changes in revision 3
Graham Connell asked for these changes on the Hiringa and Sundial call of 10 September 2026.
| Sections | Change |
|---|---|
| 1, 4, 7, 8 | Demand becomes a soft constraint with a shortfall cost per load, sent with each objective. |
| 4.2 | The plan assessment reports every planned shortfall with a reason, capacity or price, and the load it affects. |
| 4.1, 4.3, 7 | The gin stays on the Stage 1 dashboard control and leaves the API. A gin load series is a future change. |