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 Will produce the following JSON responseThe response lists every keys requested to fill the the payload of the calculation endpoint call. When an
/api/v2/simulation-inputs/bar-th-172/b2bIf you are only interested on MPR calculation data informations,
?aid=mpr query string can be added.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 Will respond with such results:
/api/v2/ceeNote that
eurosMwHCumac was added to the request. It is optional and it is used to fill euros, eurosClassic and eurosModest values/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.