In addition to our JSON API we offer a Green Button REST API (technically called OpenESPI) for downloading the utility data you've been authorized by utility customers. This API is how you download Green Button XML formatted data, so you generally want to use this if you already have the ability to ingest that type of xml format.
The Green Button standard specifies three levels of access_tokens that are used to access various parts of the API.
registration_access_token
-
This type of access token lets you access
Registration Endpoints
(e.g. your third party registration information). You are assigned
one of these tokens when your registration gets approved and it doesn't
expire unless your rotate it. You can see your current registration_acccess_token
for each utility where you are registered as a third party in your
Green Button Hosting settings.
client_access_token
-
This type of access token lets you access
Authorization Endpoints and
Bulk Endpoints
(e.g. your list of authorizations and bulk payloads from notifications).
You can get one of these tokens using
OAuth Token endpoint
with grant_type=client_credentials
and use it until it expires (you can get another one using the same process).
access_token
-
This type of access token lets you access
Resource Endpoints and
Batch Endpoints
(e.g. the data shared by a individual authorization).
You can get one of these types of tokens for each authorization using
OAuth Token endpoint
with grant_type=authorization_code
using the code coming back to your redirect_uri as part of the OAuth process
(see Step 4 of our OAuth guide).
To make an authenticated API request with one of these access tokens, simply
add it as an Authorization: Bearer <token_here>
header in
the API request. For example, below is an example curl request with an access
token in the header.
curl \ -H "Authorization: Bearer a2e7fd6a0c2f474c9a63ec18321c9989f805868237b14d1e9029948a2d797121" \ https://utilityapi.com/DataCustodian/espi/1_1/resource/ReadServiceStatus
/ApplicationInformation/{app_uid}
Get your third party ApplicationInformation.
/Authorization
Get your list of Authorizations from customers.
/Authorization/{auth_uid}
Get a specific customer Authorization.
/LocalTimeParameters/{tz_uid}
Get information on a specific set of LocalTimeParameters.
/ReadingType/{type_uid}
Get information on a specific ReadingType.
/Subscription/{auth_uid}/UsagePoint
Get the list of UsagePoints (e.g. meters) for an authorization.
/Subscription/{auth_uid}/UsagePoint/{meter_uid}
Get a specific UsagePoint (e.g. meter).
/Subscription/{auth_uid}/UsagePoint/{meter_uid}/MeterReading
Get the list of MeterReadings for a specific meter.
/Subscription/{auth_uid}/UsagePoint/{meter_uid}/MeterReading/{reading_uid}
Get a specific MeterReading for a meter.
/Subscription/{auth_uid}/UsagePoint/{meter_uid}/MeterReading/{reading_uid}/IntervalBlock
Get the list of IntervalBlocks for a specific meter reading.
/Subscription/{auth_uid}/UsagePoint/{meter_uid}/MeterReading/{reading_uid}/IntervalBlock/{block_uid}
Get a specific IntervalBlock for a meter reading.
/Subscription/{auth_uid}/UsagePoint/{meter_uid}/UsageSummary
Get the list of UsageSummaries (e.g. bills) for a meter.
/Subscription/{auth_uid}/UsagePoint/{meter_uid}/UsageSummary/{summary_uid}
Get a specific UsageSummary (e.g. bill) for a meter.
/Subscription/{auth_uid}/UsagePoint/{meter_uid}/ElectricPowerQualitySummary
Get the list of ElectricPowerQualitySummaries for a meter.
/Subscription/{auth_uid}/UsagePoint/{meter_uid}/ElectricPowerQualitySummary/{power_uid}
Get a specific ElectricPowerQualitySummary for a meter.
/RetailCustomer/{auth_uid}/Customer
Get a list of available Customers.
/RetailCustomer/{auth_uid}/Customer/{customer_uid}
Get information on a specific Customer.
/RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount
Get a list of CustomerAccounts for a customer.
/RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}
Get information on a specific CustomerAccount.
/RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement
Get a list of CustomerAgreements related to a customer account.
/RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{meter_uid}
Get information on a specific CustomerAgreement.
/RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{meter_uid}/ServiceSupplier
Get a list of ServiceSuppliers related to a CustomerAgreement.
/RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{meter_uid}/ServiceSupplier/{supplier_uid}
Get information on a specific ServiceSupplier.
/RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{meter_uid}/ProgramDateIdMappings
Get a list of ProgramDateIdMappings related to a CustomerAgreement.
/RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{meter_uid}/ProgramDateIdMappings/{mappings_uid}
Get information on a specific ProgramDateIdMappings.
/RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{meter_uid}/ServiceLocation
Get a list of ServiceLocations related to a CustomerAgreement.
/RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{meter_uid}/ServiceLocation/{location_uid}
Get information on a specific ServiceLocation.
/RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{meter_uid}/ServiceLocation/{location_uid}/Meter
Get a list of Meters related to a location.
/RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{meter_uid}/ServiceLocation/{location_uid}/Meter/{device_uid}
Get information on a specific Meter.
/RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{meter_uid}/ServiceLocation/{location_uid}/EndDevice
Get a list of EndDevices related to a location.
/RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{meter_uid}/ServiceLocation/{location_uid}/EndDevice/{device_uid}
Get information on a specific EndDevice.
/Non-ESPI
This is an open-ended endpoint that is not part of the ESPI specification used for raw files and downloads
that are linked to from other API endpoints. Files under this endpoint must be accessed directly (e.g. you
can't list files visible to you).
/Batch/Subscription/{auth_uid}
Get a feed with all data (usage points, usage summaries, interval blocks, etc.) for a specific Authorization.
/Batch/Subscription/{auth_uid}/UsagePoint/{meter_uid}
Get a feed with all data (usage summaries, interval blocks, etc.) for a specific UsagePoint.
/Batch/RetailCustomer/{auth_uid}
Get a feed with all customer account details (account numbers, addresses, etc.) for a specific Authorization.
/Bulk/{bulk_uid}
Bulk feeds you get linked to from notifications.
/ReadServiceStatus
Check the status of the Green Button API.
GET /ApplicationInformation/{app_uid}
<entry>
containing an
ApplicationInformation object.
GET /Authorization
<feed>
containing
Authorization entries (could be empty feed if no authorizations).
GET /Authorization/{auth_uid}
<entry>
containing an
Authorization object.
GET /LocalTimeParameters/{tz_uid}
<entry>
containing a
LocalTimeParameters object.
GET /ReadingType/{type_uid}
<entry>
containing a
ReadingType object.
GET /Subscription/{auth_uid}/UsagePoint
<feed>
containing
UsagePoint entries (could be empty feed if no usage points).
GET /Subscription/{auth_uid}/UsagePoint/{meter_uid}
<entry>
containing a
UsagePoint object.
GET /Subscription/{auth_uid}/UsagePoint/{meter_uid}/MeterReading
<feed>
containing
MeterReading entries (could be empty feed if no readings).
GET /Subscription/{auth_uid}/UsagePoint/{meter_uid}/MeterReading/{reading_uid}
<entry>
containing a
MeterReading object.
GET /Subscription/{auth_uid}/UsagePoint/{meter_uid}/MeterReading/{reading_uid}/IntervalBlock
<feed>
containing
IntervalBlock entries (could be empty feed if no intervals).
GET /Subscription/{auth_uid}/UsagePoint/{meter_uid}/MeterReading/{reading_uid}/IntervalBlock/{block_uid}
<entry>
containing a
IntervalBlock object.
GET /Subscription/{auth_uid}/UsagePoint/{meter_uid}/UsageSummary
<feed>
containing
UsageSummary entries (could be empty feed if no bills).
GET /Subscription/{auth_uid}/UsagePoint/{meter_uid}/UsageSummary/{summary_uid}
<entry>
containing a
UsageSummary object.
GET /Subscription/{auth_uid}/UsagePoint/{meter_uid}/ElectricPowerQualitySummary
<feed>
containing
ElectricPowerQualitySummary entries (could be empty feed if no power quality summaries).
GET /Subscription/{auth_uid}/UsagePoint/{meter_uid}/ElectricPowerQualitySummary/{power_uid}
<entry>
containing a
ElectricPowerQualitySummary object.
GET /RetailCustomer/{auth_uid}/Customer
<feed>
containing
Customer entries (could be empty feed if no customers).
GET /RetailCustomer/{auth_uid}/Customer/{customer_uid}
<entry>
containing a
Customer object.
GET /RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount
<feed>
containing
CustomerAccount entries (could be empty feed if no accounts).
GET /RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}
<entry>
containing a
CustomerAccount object.
GET /RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement
<feed>
containing
CustomerAgreement entries (could be empty feed if no customer agreements).
GET /RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{agreement_uid}
<entry>
containing a
CustomerAgreement object.
GET /RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{agreement_uid}/ServiceSupplier
<feed>
containing
ServiceSupplier entries (could be empty feed if no suppliers).
GET /RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{agreement_uid}/ServiceSupplier/{supplier_uid}
<entry>
containing a
ServiceSupplier object.
GET /RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{agreement_uid}/ProgramDateIdMappings
<feed>
containing
ProgramDateIdMappings entries (could be empty feed if no mappings).
GET /RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{agreement_uid}/ProgramDateIdMappings/{mappings_uid}
<entry>
containing a
ProgramDateIdMappings object.
GET /RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{agreement_uid}/ServiceLocation
<feed>
containing
ServiceLocation entries (could be empty feed if no locations).
GET /RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{agreement_uid}/ServiceLocation/{location_uid}
<entry>
containing a
ServiceLocation object.
GET /RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{agreement_uid}/ServiceLocation/{location_uid}/Meter
<feed>
containing
Meter entries (could be empty feed if no meters).
GET /RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{agreement_uid}/ServiceLocation/{location_uid}/Meter/{meter_number}
<entry>
containing a
Meter object.
GET /RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{agreement_uid}/ServiceLocation/{location_uid}/EndDevice
<feed>
containing
EndDevice entries (could be empty feed if no end devices).
GET /RetailCustomer/{auth_uid}/Customer/{customer_uid}/CustomerAccount/{account_uid}/CustomerAgreement/{agreement_uid}/ServiceLocation/{location_uid}/EndDevice/{device_uid}
<entry>
containing a
EndDevice object.
/Batch/Subscription/{auth_uid}
published-min=YYYY-MM-DDTHH:MM:SSZ
-
Only include data after a specific time.
published-max=YYYY-MM-DDTHH:MM:SSZ
-
Only include data before a specific time.
updated-min=YYYY-MM-DDTHH:MM:SSZ
-
Only include data added to the API after a specific time.
updated-max=YYYY-MM-DDTHH:MM:SSZ
-
Only include data added to the API before a specific time.
<feed>
containing
UsagePoint,
LocalTimeParameters,
MeterReading,
ReadingType,
IntervalBlock,
UsageSummary, and
ElectricPowerQualitySummary
entries.
https://.../Batch/Subscription/11111?published-min=2018-08-01T00:00:00Z
Retry-After
header
in the 202 response and we'll eventually return a 200 HTTP response
with the feed data.
/Batch/Subscription/{auth_uid}/UsagePoint/{meter_uid}
published-min=YYYY-MM-DDTHH:MM:SSZ
-
Only include data after a specific time.
published-max=YYYY-MM-DDTHH:MM:SSZ
-
Only include data before a specific time.
updated-min=YYYY-MM-DDTHH:MM:SSZ
-
Only include data added to the API after a specific time.
updated-max=YYYY-MM-DDTHH:MM:SSZ
-
Only include data added to the API before a specific time.
<feed>
containing the
UsagePoint,
LocalTimeParameters,
MeterReading,
ReadingType,
IntervalBlock,
UsageSummary, and
ElectricPowerQualitySummary
entries.
https://.../Batch/Subscription/11111/UsagePoint/22222?published-min=2018-08-01T00:00:00Z
Retry-After
header
in the 202 response and we'll eventually return a 200 HTTP response
with the feed data.
/Batch/Subscription/{auth_uid}
<feed>
containing
Customer,
CustomerAccount,
CustomerAgreement,
ServiceSupplier,
ProgramDateIdMappings,
ServiceLocation,
Meter,
EndDevice, and
LocalTimeParameters
entries.
https://.../Batch/RetailCustomer/11111
GET /Bulk/{bulk_uid}
<feed>
containing the entries intended to be delivered to the third party.
This is usually a mix of new authorizations and new usage summaries
and interval blocks for usage points with updated data.
GET /ReadServiceStatus
Code | Response Format | Description |
---|---|---|
200 |
Atom XML |
Successful request. If a single resource endpoint (i.e. the url
ends with a uid), will be an Atom XML <entry> .
If listing multiple objects (e.g. the url doesn't end with a uid),
will be an Atom XML <feed> .
|
202 |
Empty |
Request is too large to be synchronous, so building a cache asynchronously.
See Retry-After header for how long to wait before trying again.
|
400 |
Error |
The query parameters included are malformed. Check the error
in the response for the type of error:
|
401 |
Error | Invalid, expired, or missing access token. See our docs on Authentication for which types of access tokens to use where. |
403 |
Error | The access token you are using is not the correct type for this endpoint. See our docs on Authentication for which types of access tokens to use where. |
404 |
Error | This endpoint doesn't exist or you don't have permissions to see it. |
429 |
N/A |
The request was rate limited.
Check the Retry-After response header for how long to wait
until retrying the request. Do not expect any specific response format for
this error (could be html, json, or nothing).
|
500 |
N/A | Internal server error. Do not expect any specific response format for this error (could be html, json, or nothing). This error is logged and will be fixed by our engineers. |
503 |
N/A | Site is currently down for maintenance. Do not expect any specific response format for this error (could be html, json, or nothing). |
504 |
N/A | We tried to build this request but timed out. Please try again later. Do not expect any specific response format for this error (could be html, json, or nothing). |