Skip to main content

Aggregation Rules

How DHA 0.4.0 combines the data of its two Delegates and limits time-dependent data.

Historical Retrieval Window​

DHA limits time-dependent data to the Historical Retrieval Window. The window starts at the beginning of the same calendar date two years before the date of the request, and ends at the time of the request. Dates are taken in Coordinated Universal Time (UTC), and the start date is inside the window.

Request timeWindow starts
10:00 UTC on 29 February 202800:00 UTC on 28 February 2026 (there is no 29 February in 2026)
09:30 on 15 November 2026 in Sydney (22:30 UTC on 14 November)00:00 UTC on 14 November 2024

The length of the window is fixed and cannot be configured. DHA does not decide whether any data is required or voluntary consumer data; the window is a technical parameter, and your CDR obligations remain yours.

In DHA 0.4.0 the window applies to the data of both Delegates:

DataHow the window applies
InvoicesThe date range DHA sends to each Delegate starts no earlier than the window, by issue date.
Billing transactionsThe time range DHA sends to each Delegate starts no earlier than the window, by execution time.
Plans of an open accountA plan whose end date is before the window is left out, whichever Delegate holds it. A plan with no end date has not ended.
Concessions of an open accountA concession whose end date is before the window is left out. A concession with no end date has not ended.
FRMP detailsThe oldest date DHA sends to each Delegate is no earlier than the window. When the request names no oldest date, DHA sends the start of the window.
BalancesNo window: a balance is the account's current balance.
Customer, user, authentication and notification dataNo window.

Closed accounts have rules of their own, set out in Closed accounts.

Date ranges​

List Energy Account Billing Transactions and List Energy Account Invoices take a date range. DHA works out the range before it reads either Delegate:

  1. Billing transactions are bounded by times. DHA converts each time to UTC before comparing it, including a bound you send in another offset, and sends the times to the Delegates in UTC. An omitted newest time is the time of the request, to the whole second. An omitted oldest time is 12 months before the newest time.
  2. Invoices are bounded by dates. An omitted newest date is the date of the request in UTC. An omitted oldest date is 24 months before the newest date.
  3. DHA then moves the oldest bound forward to the start of the Historical Retrieval Window if it is earlier.
  4. DHA sends the same range to every Delegate, for every page it reads.

A request whose oldest bound is later than its newest bound is refused with HTTP 400 and an invalid date-time error. A request whose range ends before the window starts returns an empty page: DHA first asks the Primary Delegate for the start of the window only, so that an unknown Principal or account still receives the Primary Delegate's HTTP 404, and does not ask the Historical Delegate.

Accounts and plans​

List Energy Accounts reads both Delegates and returns one copy of each account:

  • DHA returns only the accounts the Primary Delegate holds. An account that only the Historical Delegate holds is not returned.
  • When the Primary Delegate reports the Principal unknown, its HTTP 404 is the answer, even when the Historical Delegate holds records for that Principal.
  • For an open account that both Delegates hold, every field but the plans is the Primary Delegate's. The plans are those of both Delegates. A plan with the same service points, start date and end date in both is one plan, and the Primary Delegate's copy is kept. Plans are ordered by start date, with a plan that has no overview first.
  • Whether an account is open is taken from the Primary Delegate. The account status held by the Historical Delegate is not used.
  • Accounts are ordered by creation date, with an account that has none first.
  • Plans that ended before the window are left out, as set out in Historical Retrieval Window.

Closed accounts​

Whether an account is closed is as the Primary Delegate reports it.

  • List Energy Accounts returns a closed account exactly as the Primary Delegate holds it: it is not combined with the Historical Delegate's copy, and its plans are not filtered.
  • List Energy Account Concessions and Get Energy Account Agreed Payment Schedule are answered with HTTP 404 (invalid resource) for a closed account, or for an account the Primary Delegate does not hold. These responses carry no account status, so DHA asks the Primary Delegate for the account alongside the data request and discards the data it read. If that lookup fails, its failure is the answer.
  • List Energy Account Balances returns a closed account's balance.
  • List Energy Account Billing Transactions and List Energy Account Invoices serve a closed account's records inside the window as for an open account. DHA does not check the account's status for them.

FRMP details​

Retrieve FRMP Details reads both Delegates and returns the details of both for each NMI, ordered by start date. Details that both Delegates hold identically, such as an FRMP period that began before the migration and continues, are returned once. Different details of one NMI whose periods overlap are all returned.

Unknown Principals and accounts​

For every operation served from both Delegates other than List Energy Accounts, a Delegate that reports the Principal or account unknown (HTTP 404) contributes no records. DHA answers HTTP 404 only when both Delegates report it, and returns the Primary Delegate's response.

Duplicate records​

DHA does not change the records a Delegate returns, other than to combine, order and paginate them and to translate them between versions of the Data Adapter Specification. It treats every identifier as opaque and does not translate identifiers between the Delegates.

Record held by both DelegatesReturned
An accountOnce, combined as set out in Accounts and plans
An FRMP detail, identical in bothOnce
A billing transaction with every field equal in bothTwice, and counted twice in the totals
An invoice with the same account and invoice number in bothTwice, and counted twice in the totals

The billing transaction and invoice duplicates are listed in DHA known bugs.