Points de terminaison

Points de terminaison des tarifs

Points de terminaison pour récupérer les données tarifaires d'électricité des fournisseurs d'énergie suisses.

Lister tous les tarifs

Récupérez une liste paginée de tous les tarifs d'électricité avec filtrage et tri optionnels.

GET/api/v1/tariffs

Paramètres de requête

ParamètreTypeDescription
pageOptionnel
integer(Par défaut: 1)Numéro de page pour la pagination
limitOptionnel
integer(Par défaut: 50)Nombre de résultats par page (max: 100)
organization_idOptionnel
uuidFiltrer par UUID d'organisation
tariff_typeOptionnel
stringFiltrer par type de tarif
searchOptionnel
stringRechercher par nom de tarif
sort_byOptionnel
string(Par défaut: updated_at)Champ de tri: created_at, tariff_name, valid_from, updated_at
sort_orderOptionnel
string(Par défaut: desc)Direction du tri: asc ou desc

Exemple

Requêtebash
curl -X GET "https://www.strompreise-schweiz.ch/api/v1/tariffs?page=1&limit=10&sort_by=updated_at&sort_order=desc" \
  -H "x-api-key: YOUR_API_KEY"

Exemple de réponse

Réponsejson
{
  "success": true,
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-20T14:45:00Z",
      "tariff_data": {
        "tariff_name": "Basic Household Tariff 2024",
        "tariff_type": "standard",
        "valid_from": "2024-01-01",
        "valid_to": "2024-12-31",
        "currency": "CHF",
        "components": {
          "energy": {
            "high_tariff": 0.2456,
            "low_tariff": 0.1834
          },
          "grid_usage": {
            "high_tariff": 0.0892,
            "low_tariff": 0.0654
          },
          "fees": {
            "base_fee_monthly": 8.50,
            "meter_fee_monthly": 2.00
          }
        }
      },
      "organization": {
        "name": "Example Energy Provider AG",
        "dso_number": "CH-123"
      }
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 156,
    "total_pages": 16
  }
}

Obtenir un tarif unique

Récupérez des informations détaillées sur un tarif spécifique par son ID.

GET/api/v1/tariffs/:id

Paramètres de chemin

ParamètreTypeDescription
idObligatoire
uuidL'UUID unique du tarif

Exemple

Requêtebash
curl -X GET "https://www.strompreise-schweiz.ch/api/v1/tariffs/550e8400-e29b-41d4-a716-446655440000" \
  -H "x-api-key: YOUR_API_KEY"

Exemple de réponse

Réponsejson
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "tariff_data": {
      "tariff_name": "Basic Household Tariff 2024",
      "tariff_type": "standard",
      "valid_from": "2024-01-01",
      "valid_to": "2024-12-31",
      "currency": "CHF",
      "components": {
        "energy": {
          "high_tariff": 0.2456,
          "low_tariff": 0.1834,
          "unit": "CHF/kWh"
        },
        "grid_usage": {
          "high_tariff": 0.0892,
          "low_tariff": 0.0654,
          "unit": "CHF/kWh"
        },
        "fees": {
          "base_fee_monthly": 8.50,
          "meter_fee_monthly": 2.00,
          "unit": "CHF"
        }
      }
    },
    "organization": {
      "name": "Example Energy Provider AG",
      "dso_number": "CH-123"
    },
    "source": {
      "url": "https://example-provider.ch/tariffs/2024",
      "description": "Official tariff document"
    }
  }
}

Structure des données tarifaires

L'objet tariff_data contient des informations de prix détaillées dans un format structuré. Cela inclut les taux de consommation, la tarification horaire et les frais réglementaires.

tariff_nameNom affiché du tarif
tariff_typeType de tarif (par ex. standard, dynamique, solaire)
valid_from / valid_toPériode de validité du tarif (format de date ISO 8601)
componentsComposants de tarification comprenant les tarifs énergétiques, les frais de réseau et les charges fixes
Points de terminaison des tarifs | Strompreise Schweiz