Table of Contents
Octopus Energy Japan APIs¶
REST API¶
Octopus Energy Japan provides a REST API for customers and partner organisations to interact with our platform. Amongst other things, it provides functionality for:
Browsing energy products, tariffs and their charges.
Retrieving details about a UK electricity meter-point.
Browsing the half-hourly consumption of an electricity of gas meter.
Determining the grid-supply-point (GSP) for a UK postcode.
Creating a quote.
Creating an account.
API basics¶
Base URL¶
All API requests should use a base URL of: https:/api.oejp-kraken.energy
Note, all API requests must be made over HTTPS.
Authentication¶
Authentication is required for some API end-points. This is performed via HTTP Basic Auth.
Provide your API key as the Basic Auth username value. You do not need to provide a password, eg:
curl -u "$API_KEY:" https://api.oejp-kraken.energy/v1/accounts/
Note the colon after $API_KEY
which prevents cURL from asking for a
password.
Parameters¶
Datetimes¶
Some API end-points accept datetime strings as parameters. These should be passed in ISO 8601 format. Eg:
"2018-05-17T16:00:00Z"
We strongly recommend that timezone information is included on all datetime parameters. If no timezone information is included, the “America/Chicago” timezone will be assumed.
GraphQL API¶
Octopus Energy Japan also provides a GraphQL API for customers and partner organisations to interact with our platform. This is documented through the GraphQL Schema.
API basics¶
Base URL¶
All API requests should use a base URL of: https://api.oejp.energy/v1/graphql
Note, all API requests must be made over HTTPS.
Authentication¶
Authentication is required for some queries and mutations. This is performed via setting the Authorization header for requests to be the appropriate token for a user. You can get a token for your user via the obtainKrakenToken mutation, which can be used in several different ways, including email/password, an API key or a pre-signed key.
Here is an example of how to get a Kraken token using the GraphiQL interface.
Once you have your Kraken token, you can set the Authorization header on your requests to be that token and try out some queries. If you are using the GraphiQL interface, you can set the header via the provided header tab.
Here is an example Viewer query to show you the details of the authenticated user.