Skip to main content
This quickstart guide will help you start using the Prezio API to access electricity pricing data across European markets.

Authentication

Prezio uses Bearer token authentication as the standard method for production and sandbox environments:
1

Get Bearer Token

Obtain Bearer tokens via the authentication endpoint:
# Production
curl -X POST "https://api.prezio.eu/api/auth/token/" \
  -H "Content-Type: application/json" \
  -d '{"username": "your_username", "password": "your_password"}'
  
# Sandbox
curl -X POST "https://sandbox.prezio.eu/api/auth/token/" \
  -H "Content-Type: application/json" \
  -d '{"username": "your_username", "password": "your_password"}'
2

Use Bearer Token

Include your Bearer token in the Authorization header for all requests:
Authorization: Bearer YOUR_ACCESS_TOKEN
Sandbox convenience: API keys are also available in sandbox for quick testing (Authorization: Token YOUR_API_KEY). Get them from dashboard.prezio.eu or support.

API Workflow

Starting point: Before making API calls, you need a specific location (address or coordinates) for the end-user’s price you’re looking for. By providing a precise location, the API will be able to return the correct prices applicable to that specific area.
The diagram below shows the typical workflow for retrieving electricity pricing data with the Prezio API:

API Request Flow

Follow this step-by-step process to retrieve accurate pricing data:
1

Find Applicable Organizations

First, determine which organizations (grid operators, retailers, authorities) serve your location:
curl -X GET "https://sandbox.prezio.eu/api/organizations/?country=DK&address=Rådhuspladsen 1, Copenhagen" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
This returns organizations applicable to the address, including their IDs which you’ll need for the next step.
{
  "count": 3,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": "org_70",
      "name": "Andel Energi A/S",
      "type": "RETAILER",
      "website_url": "https://andelenergi.dk",
      "logo": "https://api.prezio.eu/media/logos/andel.png",
      "main_tariffs": [...]
    },
    {
      "id": "org_123",
      "name": "Radius Elnet",
      "type": "DSO",
      "website_url": "https://radiuselnet.dk",
      "logo": "https://api.prezio.eu/media/logos/radius.png",
      "main_tariffs": [...]
    }
  ]
}
Select the organization IDs you’re interested in (e.g., a specific retailer and the local grid operator).
2

Get Applicable Tariffs

Next, retrieve the applicable tariffs for each selected organization:
curl -X GET "https://sandbox.prezio.eu/api/tariffs/?country=DK&address=Rådhuspladsen 1, Copenhagen&organization_id=org_70" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
  "count": 3,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": "tar_456",
      "name": "Flex El",
      "description": "Variable rate electricity plan",
      "organization": {
        "id": "org_70",
        "name": "Andel Energi A/S"
      },
      "filters": {
        "consumer_type": "RESIDENTIAL",
        "consumption_minimum": null,
        "consumption_maximum": null
      }
    }
  ]
}
Select the tariff IDs that match your criteria (e.g., residential customer type, consumption range).
3

Get Current Prices or Calculate Costs

Finally, use the selected tariff IDs to either get current prices or calculate costs:
  • Get Current Prices
  • Calculate Costs
curl -X GET "https://sandbox.prezio.eu/api/live/?country=DK&tariff_id=tar_456&tariff_id=tar_789&address=Rådhuspladsen 1, Copenhagen" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
This returns current electricity prices for all components of the selected tariffs.

Next Steps