Introduction
The Energy Bonus OPX API is structured following REST principles and utilizes JSON-encoded data payloads.
The API must be used server-to-server and requires the use of an Oauth key and secret.
URL
The production URL is https://api.opx.co/energy-bonus/
Authentication
Energy Bonus API can be used after issuing an access token. It can be obtained with you client credentials key and secret.
POST /oauth/token
You’ll get an access token in the json response:
The expires_in value is expressed in seconds. So it is not necessary to request a new access token each time it is needed to perform other requests. It can be cached and reused many times.
Core principles
OPX provides a single endpoint to get , and amounts when they are availabe.
The request must be sent with a payload represented by a json object. The json object must respect the following structure:
The general.*
keys are mandatory. They are dedicated to specify the properties of simulation representing generic housing or building data.
The operation.*
keys are also mandatory. They are used to expose the operation to compute and its very specific properties.
How to fill in and define these keys are expressed by calling another endpoint (see example).