Endpoints
Tariff Endpoints
Endpoints for retrieving electricity tariff data from Swiss energy providers.
List All Tariffs
Retrieve a paginated list of all electricity tariffs with optional filtering and sorting.
GET
/api/v1/tariffsQuery Parameters
| Parameter | Type | Description |
|---|---|---|
pageOptional | integer(Default: 1) | Page number for pagination |
limitOptional | integer(Default: 50) | Number of results per page (max: 100) |
organization_idOptional | uuid | Filter by organization UUID |
tariff_typeOptional | string | Filter by tariff type |
searchOptional | string | Search by tariff name |
sort_byOptional | string(Default: updated_at) | Sort field: created_at, tariff_name, valid_from, updated_at |
sort_orderOptional | string(Default: desc) | Sort direction: asc or desc |
Example
Requestbash
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"Example Response
Responsejson
{
"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
}
}Get Single Tariff
Retrieve detailed information about a specific tariff by its ID.
GET
/api/v1/tariffs/:idPath Parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | uuid | The unique UUID of the tariff |
Example
Requestbash
curl -X GET "https://www.strompreise-schweiz.ch/api/v1/tariffs/550e8400-e29b-41d4-a716-446655440000" \
-H "x-api-key: YOUR_API_KEY"Example Response
Responsejson
{
"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"
}
}
}Tariff Data Structure
The tariff_data object contains detailed pricing information in a structured format. This includes consumption rates, time-of-use pricing, and regulatory fees.
tariff_nameThe display name of the tarifftariff_typeType of tariff (e.g., standard, dynamic, solar)valid_from / valid_toThe validity period of the tariff (ISO 8601 date format)componentsPricing components including energy rates, grid usage fees, and fixed charges