Skip to main content
In this example, we’ll take a step-by-step approach to obtaining the results of our energy bonus calculations.
1

Obtain a Bearer token

You ‘ll obtain a Bearer token by following authentication as described in introduction.Then each time an API call is made, use token value in request header.
2

Retrieve FOST calculation data informations

Energy bonus may be calculated for both B2C and B2B contexts. Our API handle both contexts. Before obtaining the results, we need to determine the fost and the context involved.In our example, we’ll use the FOST operation in b2b context.GET /api/v2/simulation-inputs/bar-th-172/b2b
If you are only interested on MPR calculation data informations, ?aid=mpr query string can be added.
Will produce the following JSON response
The response lists every keys requested to fill the the payload of the calculation endpoint call. When an options for a given key is set, it shows the set of accepted values. For example, for the operation.usage key, accepted values are heating and ecs.
3

Calculate FOST Energy Bonus

We use previous results to make the payload.POST /api/v2/cee
Will respond with such results:
Note that eurosMwHCumac was added to the request. It is optional and it is used to fill euros, eurosClassic and eurosModest values
If you are only interested in MPR calculation, POST /api/v2/mpr is also available. In this case, only fields mentioned in the GET /api/v2/simulation-inputs/bar-th-172/b2b?aid=mpr need to be used.