> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev.prezio.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# API Overview

> Essential concepts and workflow for using the Prezio API

The Prezio API provides comprehensive electricity pricing data across European markets, enabling you to build powerful energy applications with accurate, location-specific pricing information.

## API Workflow

The diagram below shows the typical workflow for retrieving electricity pricing data with the Prezio API:

```mermaid
flowchart LR
    A("Starting Point: Location<br>(address/coordinates)") --> B("**/organizations/**<br>Find applicable orgs.<br>for the location")
    B --> D("**/tariffs/**<br>Find appllicable tariffs<br>for the location<br>and selected org.")
    D --> E1("**/live/**<br>Get current prices")
    D --> E2("**/calculate/**<br>Calculate cost for<br>specific consumption")
    
    style A fill:#f8f9f7,stroke:#00211b,color:00211b,rx:10,ry:10
    style B fill:#83b5ab,stroke:#00211b,color:white
    style D fill:#c7beff,stroke:#00211b,color:#00211b
    style E1 fill:#ffb07c,stroke:#00211b,color:white
    style E2 fill:#ffb07c,stroke:#00211b,color:white
```

<Note>
  The `/countries/` endpoint is available to discover supported countries but is not required for most workflows. You can proceed directly with country codes (e.g., "DK", "SE", "NO") if you already know which country you're working with.
</Note>

This workflow reflects how you'll typically interact with the API:

1. **Start with a location** - The end-user's address or coordinates
2. **Find applicable organizations** - Discover which DSOs, retailers, etc. serve that location
3. **Get relevant tariffs** - Retrieve tariffs from the organization you select (repeat for all organizations contributing to the end-user's total price)
4. **Get pricing information** - Use either the `/live/` endpoint for current prices or `/calculate/` for specific consumption

## Key Concepts

<CardGroup cols={3}>
  <Card title="Organizations" icon="building" href="/essentials/organizations" color="#83b5ab">
    Entities in the electricity market (DSOs, retailers, authorities) that provide pricing components
  </Card>

  <Card title="Tariffs" icon="file-invoice-dollar" href="/essentials/tariffs" color="#3f8376">
    Pricing structures that define how electricity usage is billed by different organizations
  </Card>

  <Card title="Tariff Elements" icon="layer-group" href="/essentials/tariff-elements" color="#c7beff">
    Individual price components that make up the total electricity cost
  </Card>

  <Card title="Location" icon="location-dot" href="/essentials/location" color="#ffb07c">
    Geographic information that determines which organizations and tariffs apply
  </Card>

  <Card title="Data Availability" icon="database" href="/essentials/data-availability" color="#8099a8">
    Understanding which regions and data are available in sandbox vs. production
  </Card>
</CardGroup>

## Core API Endpoints

<AccordionGroup>
  <Accordion title="GET /countries/" icon="globe" defaultOpen>
    Returns available country codes and supported time intervals to use in subsequent requests

    ```bash
    GET /countries/
    ```

    Response includes:

    * Country codes and names
    * `available_interval_minutes`: Supported time resolutions (15, 30, 60 minutes) for each country

    ```json
    [
      {
        "id": 1,
        "name": "Denmark",
        "code": "DK",
        "available_interval_minutes": [15, 30, 60]
      },
      {
        "id": 2,
        "name": "Sweden", 
        "code": "SE",
        "available_interval_minutes": [60]
      }
    ]
    ```

    Essential first step to determine which markets and time intervals you can access
  </Accordion>

  <Accordion title="GET /local-consumer-types/" icon="id-card">
    Lists local consumer types for a given country (e.g. "Residential", "Professional aggregated" in GB), and retrieves details for one.

    ```bash
    # List local consumer types for a country
    GET /local-consumer-types/?country=DK

    # Retrieve a specific local consumer type (by id, lct_ id or key)
    GET /local-consumer-types/lct_3/?country=DK
    ```

    Responses include local\_consumer\_type's key information: `id`, `key`, `name`, `consumer_type`, `description`.

    It is recommended to use the `local_consumer_types` endpoint to build selection UIs that need the granular, country-specific labeling.

    <Note>
      The `local_consumer_types` endpoint is currently in beta.
    </Note>
  </Accordion>

  <Accordion title="GET /organizations/" icon="building">
    Finds organizations serving a specific location

    ```bash
    GET /organizations/?country=DK&address=Rådhuspladsen 1, Copenhagen
    ```

    Returns DSOs, retailers, and other organizations relevant to the location
  </Accordion>

  <Accordion title="GET /tariffs/" icon="file-invoice-dollar">
    Retrieves tariffs from specified organizations

    ```bash
    GET /tariffs/?country=DK&organization=org_123
    ```

    Returns available pricing structures that can be used for calculations
  </Accordion>

  <Accordion title="GET /live/" icon="bolt">
    Gets current electricity prices for specified tariffs

    ```bash
    GET /live/?country=DK&tariff_id=tar_123&tariff_id=tar_456&address=Copenhagen
    ```

    Returns pricing information for the current time period
  </Accordion>

  <Accordion title="POST /calculate/" icon="calculator">
    Calculates costs based on consumption data

    ```bash
    POST /calculate/
    {
      "country": "DK",
      "tariff_id": ["tar_123", "tar_456"],
      "address": "Copenhagen",
      "kwh": [
        {"interval_start": "2023-10-15T14:00:00Z", "amount": "1.5"}
      ]
    }
    ```

    Returns calculated costs for specific consumption amounts
  </Accordion>
</AccordionGroup>

## Beta Features

<Warning>
  **Beta Endpoints Available**: Some API endpoints are currently in beta and subject to changes and errors.
</Warning>

For detailed information about beta endpoints, see the [API Reference](/api-reference).

## API Value

The Prezio API solves critical challenges in the energy industry by providing:

<CardGroup cols={2}>
  <Card title="Single Integration" icon="plug" color="#83b5ab">
    Access comprehensive pricing data through one API instead of connecting to dozens of providers, significantly reducing development time.
  </Card>

  <Card title="Standardized Format" icon="code" color="#3f8376">
    Consistent data structure across all markets and providers, making it easy to expand to new regions.
  </Card>

  <Card title="Location Intelligence" icon="map" color="#c7beff">
    Automatically determine applicable tariffs based on geographic location without needing to understand complex market structures.
  </Card>

  <Card title="Complete Price Picture" icon="chart-pie" color="#ffb07c">
    All price components in one place - grid costs, energy costs, taxes, and fees - giving you the full electricity cost.
  </Card>
</CardGroup>

<Tip>
  New to the Prezio API? Head to our [Quickstart Guide](/quickstart) to make your first API call, or try out [Environment Setup](/get-started/environments) to understand sandbox testing.
</Tip>
