Insert electricity index prices via API


In this article, you will learn how to visualise cost from a price whose rate changes based on what you insert via API.


Do you have access to the exact price of the electricity (€/kWh) hourly or half-hourly?

Do you want to see the cost based on these prices in the platform?

In this article, we explain how to do that.


  • You need to have a device with Active energy data, so that the price can be applied to something, and then visualised.
  • You will need to have a registered app in the platform. See how to do it in this article.
    • This app needs to have "Read and Write" permission:
    • From this app you will need the permanent token (x-dexcell-token)

Set up

Once you have the app and the permanent token, here there is a step-by step explanation on how to do proceed. We recommend first having the supply and contract configured, so that immediately that you insert the prices, you will be able to see the cost. Follow these steps:

  1. Go to Settings > Supplies and prices
  2. Create a Price in the platform UI. This step cannot be done via API.
    • Write the name and select the Tariff structure, excesses and power that you want, but choose  Based in wholesale market Consumption.
    • Choose the frequency for which the prices will be inserted:


      It does not mean that the prices have to be updated every hour or 30 minutes. All hourly/30min prices can be uploaded at the end of the day or the week, for example.
    • Add other costs and taxes if necessary
  3. Now create a new Supply and an active contract. This step can also be done via the API.
  4. Assign the supply to the device that has the electricity data. You can do this either through the platform UI (process explaned here) or with the inbulk account set up.
  5. The most important step: Insert the prices via API with our call Create Indexed Rates for a Price documented here. You will need the Price_key visible in the Price configuration and the app token as a header. Here's an example from Postman:Screenshot_2023-05-11_at_12.44.18.png
  6. If your device has consumption data on the hours for which you have inserted prices, you can now go to the cost screen and visualise them!



If the API returns a 403 error, remember the requirement to have the Read and Write permission in your app configuration.



Was this article helpful?