<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.miek.nl" -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" ipr="trust200902" docName="draft-authors-datarightplus-resource-set-energy-00" submissionType="independent" category="exp" xml:lang="en" indexInclude="true">

<front>
<title>DataRight+: Energy Resource Set</title><seriesInfo value="draft-authors-datarightplus-resource-set-energy-00" stream="independent" status="experimental" name="Internet-Draft"/>
<author initials="S." surname="Low" fullname="Stuart Low"><organization>Biza.io</organization><address><postal><street/>
</postal><email>stuart@biza.io</email>
</address></author><date/>
<area>Internet</area>
<workgroup>datarightplus</workgroup>

<abstract>
<t>This is the resource set profile outlining the energy sector related endpoints. In addition to outlining Initiator and Provider provisions it also specifies requirements for the Energy Authority (electricity assets and usage) and Energy Plan Website (retail electricity plan information).</t>
</abstract>

<note><name>Notational Conventions</name>
<t>The keywords "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>",  "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described in <xref target="RFC2119"/>.</t>
</note>

</front>

<middle>

<section anchor="scope"><name>Scope</name>
<t>The scope of this document is intended to be limited to the resource server endpoints related to energy, their associated authorisation contexts, the services provided by the Energy Authority and Energy Plan Website.</t>
</section>

<section anchor="terminology"><name>Terminology</name>
<t>This specification utilises the various terms outlined within <xref target="DATARIGHTPLUS-ROSETTA"/>.</t>
</section>

<section anchor="providers"><name>Providers</name>
<t>Providers which manage energy sector information are expected to deliver a number of resource server end points.</t>

<section anchor="authorisation-server"><name>Authorisation Server</name>
<t>In addition to other provisions incorporated within the relevant ecosystem set, the Provider authorisation server <bcp14>SHALL</bcp14>:</t>

<ol spacing="compact">
<li>Support the <xref target="RFC6749"/> <tt>scope</tt> parameter with possible values outlined within <eref target="#name-authorisation-scopes">Authorisation Scopes</eref>;</li>
</ol>

<section anchor="authorisation-scopes"><name>Authorisation Scopes</name>
<t>The Provider authorisation server <bcp14>SHALL</bcp14> utilise the following Data Set Language when seeking Consumer authorisation from a User for specific <tt>scope</tt> values:</t>
<table>
<thead>
<tr>
<th><tt>scope</tt> value</th>
<th>Data Set Language</th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>energy:accounts.basic:read</tt></td>
<td><strong>Accounts and plans</strong></td>
</tr>

<tr>
<td/>
<td>Account and plan information;</td>
</tr>

<tr>
<td><tt>energy:accounts.detail:read</tt></td>
<td><strong>Account and plan details</strong></td>
</tr>

<tr>
<td/>
<td>Account type;</td>
</tr>

<tr>
<td/>
<td>Fees, features, rates, and discounts;</td>
</tr>

<tr>
<td/>
<td>Additional account users;</td>
</tr>

<tr>
<td><tt>energy:accounts.concessions:read</tt></td>
<td><strong>Concessions and assistance</strong></td>
</tr>

<tr>
<td/>
<td>Concession type;</td>
</tr>

<tr>
<td/>
<td>Concession information;</td>
</tr>

<tr>
<td><tt>energy:accounts.paymentschedule:read</tt></td>
<td><strong>Payment preferences</strong></td>
</tr>

<tr>
<td/>
<td>Payment and billing frequency;</td>
</tr>

<tr>
<td/>
<td>Any scheduled payment details;</td>
</tr>

<tr>
<td><tt>energy:billing:read</tt></td>
<td><strong>Billing payments and history</strong></td>
</tr>

<tr>
<td/>
<td>Account balance;</td>
</tr>

<tr>
<td/>
<td>Payment method;</td>
</tr>

<tr>
<td/>
<td>Payment status;</td>
</tr>

<tr>
<td/>
<td>Charges, discounts, credits;</td>
</tr>

<tr>
<td/>
<td>Billing date;</td>
</tr>

<tr>
<td/>
<td>Usage for billing period;</td>
</tr>

<tr>
<td/>
<td>Payment date;</td>
</tr>

<tr>
<td/>
<td>Invoice number;</td>
</tr>

<tr>
<td><tt>energy:electricity.servicepoints.basic:read</tt></td>
<td><strong>Electricity connection</strong></td>
</tr>

<tr>
<td/>
<td>National Meter Identifier (NMI);</td>
</tr>

<tr>
<td/>
<td>Customer type;</td>
</tr>

<tr>
<td/>
<td>Connection point details;</td>
</tr>

<tr>
<td><tt>energy:electricity.servicepoints.detail:read</tt></td>
<td><strong>Electricity meter</strong></td>
</tr>

<tr>
<td/>
<td>Supply address;</td>
</tr>

<tr>
<td/>
<td>Meter details;</td>
</tr>

<tr>
<td/>
<td>Associated service providers;</td>
</tr>

<tr>
<td><tt>energy:electricity.der:read</tt></td>
<td><strong>Energy generation and storage</strong></td>
</tr>

<tr>
<td/>
<td>Generation information;</td>
</tr>

<tr>
<td/>
<td>Generation or storage device type;</td>
</tr>

<tr>
<td/>
<td>Device characteristics;</td>
</tr>

<tr>
<td/>
<td>Devices that can operate without the grid;</td>
</tr>

<tr>
<td/>
<td>Energy conversion information;</td>
</tr>

<tr>
<td><tt>energy:electricity.usage:read</tt></td>
<td><strong>Electricity usage</strong></td>
</tr>

<tr>
<td/>
<td>Usage;</td>
</tr>

<tr>
<td/>
<td>Meter details;</td>
</tr>
</tbody>
</table>
<section anchor="overlapping-scope-optimisation"><name>Overlapping Scope Optimisation</name>
<t>Alternative Data Cluster Language <bcp14>SHALL</bcp14> be used when pairs of <tt>scope</tt> value are used as follows:</t>
<table>
<thead>
<tr>
<th><tt>scope</tt> pairing</th>
<th>Data Set Language</th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>energy:accounts.basic:read</tt> and</td>
<td><strong>Account and plan details</strong></td>
</tr>

<tr>
<td><tt>energy:accounts.detail:read</tt></td>
<td>Account and plan information;</td>
</tr>

<tr>
<td/>
<td>Account type;</td>
</tr>

<tr>
<td/>
<td>Fees, features, rates, and discounts;</td>
</tr>

<tr>
<td/>
<td>Additional account users;</td>
</tr>

<tr>
<td><tt>energy:electricity.servicepoints.basic:read</tt> and</td>
<td><strong>Electricity connection and meter</strong></td>
</tr>

<tr>
<td><tt>energy:electricity.servicepoints.detail:read</tt></td>
<td>National Meter Identifier (NMI);</td>
</tr>

<tr>
<td/>
<td>Supply address;</td>
</tr>

<tr>
<td/>
<td>Customer type;</td>
</tr>

<tr>
<td/>
<td>Connection point details;</td>
</tr>

<tr>
<td/>
<td>Meter details;</td>
</tr>

<tr>
<td/>
<td>Associated service providers;</td>
</tr>
</tbody>
</table></section>
</section>
</section>

<section anchor="resource-server"><name>Resource Server</name>
<t>The Provider <bcp14>SHALL</bcp14> make available, as described further in <xref target="DATARIGHTPLUS-REDOCLY-ID1"/> endpoints, the following endpoints where the token is granted the <tt>energy:accounts.basic:read</tt> scope value:</t>
<table>
<thead>
<tr>
<th>Resource Server Endpoint</th>
<th>Valid <tt>x-v</tt></th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /energy/accounts</tt></td>
<td><tt>2</tt></td>
</tr>
</tbody>
</table><t>The Provider <bcp14>SHALL</bcp14> make available, as described further in <xref target="DATARIGHTPLUS-REDOCLY-ID1"/> endpoints, the following endpoints where the token is granted the <tt>energy:accounts.detail:read</tt> scope value:</t>
<table>
<thead>
<tr>
<th>Resource Server Endpoint</th>
<th>Valid <tt>x-v</tt></th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /energy/accounts/{accountId}</tt></td>
<td><tt>2</tt>, <tt>3</tt></td>
</tr>
</tbody>
</table><t>The Provider <bcp14>SHALL</bcp14> make available, as described further in <xref target="DATARIGHTPLUS-REDOCLY-ID1"/> endpoints, the following endpoints where the token is granted the <tt>energy:accounts.concessions:read</tt> scope value:</t>
<table>
<thead>
<tr>
<th>Resource Server Endpoint</th>
<th>Valid <tt>x-v</tt></th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /energy/accounts/{accountId}/concessions</tt></td>
<td><tt>1</tt></td>
</tr>
</tbody>
</table><t>The Provider <bcp14>SHALL</bcp14> make available, as described further in <xref target="DATARIGHTPLUS-REDOCLY-ID1"/> endpoints, the following endpoints where the token is granted the <tt>energy:accounts.paymentschedule:read</tt> scope value:</t>
<table>
<thead>
<tr>
<th>Resource Server Endpoint</th>
<th>Valid <tt>x-v</tt></th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /energy/accounts/{accountId}/payment-schedule</tt></td>
<td><tt>1</tt></td>
</tr>
</tbody>
</table><t>The Provider <bcp14>SHALL</bcp14> make available, as described further in <xref target="DATARIGHTPLUS-REDOCLY-ID1"/> endpoints, the following endpoints where the token is granted the <tt>energy:billing:read</tt> scope value:</t>
<table>
<thead>
<tr>
<th>Resource Server Endpoint</th>
<th>Valid <tt>x-v</tt></th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /energy/accounts/balances</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>GET /energy/accounts/{accountId}/balance</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>POST /banking/accounts/balances</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>GET /energy/accounts/{accountId}/invoices</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>GET /energy/accounts/invoices</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>POST /energy/accounts/invoices</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>GET /energy/accounts/{accountId}/billing</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>GET /energy/accounts/billing</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>POST /energy/accounts/billing</tt></td>
<td><tt>1</tt></td>
</tr>
</tbody>
</table><t>The Provider <bcp14>SHALL</bcp14> make available, as described further in <xref target="DATARIGHTPLUS-REDOCLY-ID1"/> endpoints, the following endpoints where the token is granted the <tt>energy:electricity.usage:read</tt> scope value:</t>
<table>
<thead>
<tr>
<th>Resource Server Endpoint</th>
<th>Valid <tt>x-v</tt></th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /energy/electricity/servicepoints/{servicePointId}/usage</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>GET /energy/electricity/servicepoints/usage</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>POST /energy/electricity/servicepoints/usage</tt></td>
<td><tt>1</tt></td>
</tr>
</tbody>
</table><t>The Provider <bcp14>SHALL</bcp14> make available, as described further in <xref target="DATARIGHTPLUS-REDOCLY-ID1"/> endpoints, the following endpoints where the token is granted the <tt>energy:electricity.servicepoints.basic:read</tt> scope value:</t>
<table>
<thead>
<tr>
<th>Resource Server Endpoint</th>
<th>Valid <tt>x-v</tt></th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /energy/electricity/servicepoints</tt></td>
<td><tt>1</tt></td>
</tr>
</tbody>
</table><t>The Provider <bcp14>SHALL</bcp14> make available, as described further in <xref target="DATARIGHTPLUS-REDOCLY-ID1"/> endpoints, the following endpoints where the token is granted the <tt>energy:electricity.servicepoints.detail:read</tt> scope value:</t>
<table>
<thead>
<tr>
<th>Resource Server Endpoint</th>
<th>Valid <tt>x-v</tt></th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /energy/electricity/servicepoints/{servicePointId}</tt></td>
<td><tt>1</tt></td>
</tr>
</tbody>
</table><t>The Provider <bcp14>SHALL</bcp14> make available, as described further in <xref target="DATARIGHTPLUS-REDOCLY-ID1"/> endpoints, the following endpoints where the token is granted the <tt>energy:electricity.der.basic:read</tt> scope value:</t>
<table>
<thead>
<tr>
<th>Resource Server Endpoint</th>
<th>Valid <tt>x-v</tt></th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /energy/electricity/servicepoints/der</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>POST /energy/electricity/servicepoints/der</tt></td>
<td><tt>1</tt></td>
</tr>
</tbody>
</table><t>In addition, the Provider <bcp14>MAY</bcp14> deliver the following unauthenticated and generally available endpoints, in accordance with <xref target="DATARIGHTPLUS-REDOCLY-ID1"/>:</t>
<table>
<thead>
<tr>
<th>Resource Server Endpoint</th>
<th><tt>x-v</tt></th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /energy/plans</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>GET /energy/plans/{planId}</tt></td>
<td><tt>1</tt></td>
</tr>
</tbody>
</table>
<section anchor="electricity-authority-resource-bridge"><name>Electricity Authority Resource Bridge</name>
<t>In order to deliver information requested by the Initiator the Provider <bcp14>SHALL</bcp14> provide a back-to-back relay of resource server requests between the Provider and Electricity Authority as follows:</t>
<table>
<thead>
<tr>
<th>Provider Resource Server Endpoint</th>
<th>Electricity Authority Resource Server Endpoint</th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /energy/electricity/servicepoints/{servicePointId}/usage</tt></td>
<td><tt>GET /secondary/energy/electricity/servicepoints/{servicePointId}/usage</tt></td>
</tr>

<tr>
<td><tt>GET /energy/electricity/servicepoints/usage</tt></td>
<td><tt>GET /secondary/energy/electricity/servicepoints/usage</tt></td>
</tr>

<tr>
<td><tt>POST /energy/electricity/servicepoints/usage</tt></td>
<td><tt>POST /secondary/energy/electricity/servicepoints/usage</tt></td>
</tr>

<tr>
<td><tt>GET /energy/electricity/servicepoints</tt></td>
<td><tt>GET /secondary/energy/electricity/servicepoints</tt></td>
</tr>

<tr>
<td><tt>GET /energy/electricity/servicepoints/{servicePointId}</tt></td>
<td><tt>GET /secondary/energy/electricity/servicepoints/{servicePointId}</tt></td>
</tr>

<tr>
<td><tt>GET /energy/electricity/servicepoints/der</tt></td>
<td><tt>GET /secondary/energy/electricity/servicepoints/der</tt></td>
</tr>

<tr>
<td><tt>POST /energy/electricity/servicepoints/der</tt></td>
<td><tt>POST /secondary/energy/electricity/servicepoints/der</tt></td>
</tr>
</tbody>
</table><t><em>Note:</em> Refer to the Provider <eref target="#resource-server">Resource Server</eref> and Electricity Authority <eref target="#resource-server-1">Resource Server</eref> sections for the appropriate API mappings.</t>
</section>
</section>
</section>

<section anchor="initiators"><name>Initiators</name>
<t>Initiators <bcp14>SHALL</bcp14> describe the requested <tt>scope</tt> values using the same Data Set Language as Providers, as outlined in <eref target="#name-authorisation-scopes">Authorisation Scopes</eref>.</t>
</section>

<section anchor="electricity-authority"><name>Electricity Authority</name>
<t>The Electricity Authority <bcp14>SHALL</bcp14> deliver the electricity asset and usage information to the Provider.</t>

<section anchor="authorisation-server-1"><name>Authorisation Server</name>
<t>The Electricity Authority <bcp14>SHALL</bcp14> authorise Providers using existing information security protocols. The specific details of this are outside the scope of this document.</t>
</section>

<section anchor="resource-server-1"><name>Resource Server</name>
<t>The Electricity Authority <bcp14>SHALL</bcp14> make the following restricted endpoints available to Providers, using existing authentication and authorisation channels, and in accordance with <xref target="DATARIGHTPLUS-REDOCLY-ID1"/>:</t>
<table>
<thead>
<tr>
<th>Resource Server Endpoint</th>
<th>Valid <tt>x-v</tt></th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /secondary/energy/electricity/servicepoints/{nationalMeteringId}/usage</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>POST /secondary/energy/electricity/servicepoints/usage</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>POST /secondary/energy/electricity/servicepoints</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>GET /secondary/energy/electricity/servicepoints/{nationalMeteringId}</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>GET /secondary/energy/electricity/servicepoints/{nationalMeteringId}/der</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>POST /secondary/energy/electricity/servicepoints</tt></td>
<td><tt>1</tt></td>
</tr>
</tbody>
</table></section>
</section>

<section anchor="electricity-plan-website"><name>Electricity Plan Website</name>
<t>The Electricity Plan Website <bcp14>SHALL</bcp14> deliver the following unauthenticated and generally available endpoints, in accordance with <xref target="DATARIGHTPLUS-REDOCLY-ID1"/>:</t>
<table>
<thead>
<tr>
<th>Resource Server Endpoint</th>
<th>Valid <tt>x-v</tt></th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /energy/plans</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>GET /energy/plans/{planId}</tt></td>
<td><tt>1</tt></td>
</tr>
</tbody>
</table></section>

<section anchor="acknowledgement"><name>Acknowledgement</name>
<t>The following people contributed to this document:</t>

<ul spacing="compact">
<li>Stuart Low (Biza.io) - Editor</li>
</ul>
<t>We acknowledge the contribution to the <xref target="CDS"/> of the following individuals:</t>

<ul spacing="compact">
<li>James Bligh (Data Standards Body) - Lead Architect for the Consumer Data Right</li>
<li>Mark Verstege (Data Standards Body) - Lead Architect, Banking &amp; Information Security for the Consumer Data Right</li>
<li>Ivan Hosgood (formerly Data Standards Body &amp; ACCC) - Solutions Architect</li>
</ul>
</section>

</middle>

<back>
<references><name>Normative References</name>
<reference anchor="CDS" target="https://consumerdatastandardsaustralia.github.io/standards">
  <front>
    <title>Consumer Data Standards (CDS)</title>
    <author>
      <organization>Data Standards Body (Treasury)</organization>
    </author>
  </front>
</reference>
<reference anchor="DATARIGHTPLUS-REDOCLY-ID1" target="https://datarightplus.github.io/datarightplus-redocly/?v=ID1">
  <front>
    <title>DataRight+: Redocly (ID1)</title>
    <author fullname="Stuart Low" initials="S." surname="Low">
      <organization>Biza.io</organization>
    </author>
    <author fullname="Ben Kolera" initials="B." surname="Kolera">
      <organization>Biza.io</organization>
    </author>
    <author fullname="Wei Cai" initials="W." surname="Cai">
      <organization>Biza.io</organization>
    </author>
  </front>
</reference>
<reference anchor="DATARIGHTPLUS-ROSETTA" target="https://datarightplus.github.io/datarightplus-specs/main/datarightplus-rosetta.html">
  <front>
    <title>DataRight+ Rosetta Stone</title>
    <author fullname="Stuart Low" initials="S." surname="Low">
      <organization>Biza.io</organization>
    </author>
  </front>
</reference>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<reference anchor="RFC6749" target="https://datatracker.ietf.org/doc/html/rfc6749">
  <front>
    <title>The OAuth 2.0 Authorization Framework</title>
    <author fullname="D. Hardt">
      <organization>Microsoft</organization>
    </author>
    <date year="2012" month="Oct"/>
  </front>
</reference>
</references>

</back>

</rfc>
