Skip to content

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.

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, hydrogen plant and gin, with 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 on the microgrid. The first round names two: the hydrogen plant and the gin. Sundial sums the series in each interval and treats the total as demand the site must receive before the optimiser trades the remainder. The names let Sundial report by load and let Hiringa add a priority order later.

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 and its intervals.
loads[].name text Yes "hydrogen" or "gin". Sundial rejects other names until they are agreed.
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 per load:

{
  "horizonHours": 24,
  "generatedAt": "2026-09-10T04:02:11Z",
  "targetSocPercentAtEnd": 60,
  "loads": [
    {
      "name": "hydrogen",
      "intervals": [
        { "endsAt": "2026-09-10T04:30:00Z", "energyKwh": 1250 },
        { "endsAt": "2026-09-10T05:00:00Z", "energyKwh": 1250 }
      ]
    },
    {
      "name": "gin",
      "intervals": [
        { "endsAt": "2026-09-10T04:30:00Z", "energyKwh": 400 },
        { "endsAt": "2026-09-10T05:00:00Z", "energyKwh": 400 }
      ]
    }
  ]
}

Sundial replies with the objective as stored, the time it received it, and a feasibility assessment. The assessment says whether the battery and the forecast PV can meet the total demand across the window. When they cannot, it lists each interval with a shortfall and the shortfall in kWh. Sundial also raises an alert to both parties. The objective stays in force either way, so Hiringa sees what Sundial will do with it.

Response field Unit Meaning
receivedAt timestamp When Sundial stored the objective.
feasible true or false Whether the total demand can be met across the window.
shortfalls list Empty when feasible. Otherwise one entry per interval with a shortfall.
shortfalls[].endsAt timestamp End of the interval.
shortfalls[].energyKwh kWh Energy the site will not receive in that interval.

Example response, infeasible in one interval:

{
  "receivedAt": "2026-09-10T04:02:14Z",
  "feasible": false,
  "shortfalls": [
    { "endsAt": "2026-09-10T18:30:00Z", "energyKwh": 310 }
  ]
}

Sundial rejects a request, and keeps the previous objective, when any of these hold:

  • A load name is not one of the agreed names.
  • 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.

Hiringa can read the objective in force, with its latest feasibility assessment, at any time from the same address.

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-10T04:00:00Z",
  "horizonHours": 336,
  "stations": [
    {
      "name": "Central SS10",
      "intervals": [
        { "endsAt": "2026-09-10T04:30:00Z", "energyKwh": 1840 },
        { "endsAt": "2026-09-10T05: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-10T04:00:00Z",
  "horizonHours": 24,
  "intervals": [
    { "endsAt": "2026-09-10T04:30:00Z", "netPriceAudPerMwh": 85.5 },
    { "endsAt": "2026-09-10T05: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.

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
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
An energy objective is not feasible Accepts it, returns the shortfall per interval, and alerts both parties Revises the demand 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.