List all tariffs
curl --request GET \
--url https://api.flatpeak.com/tariffs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flatpeak.com/tariffs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.flatpeak.com/tariffs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flatpeak.com/tariffs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.flatpeak.com/tariffs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.flatpeak.com/tariffs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flatpeak.com/tariffs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"url": "/tariffs",
"has_more": false,
"data": [
{
"id": "trf_66ba584eb6923d7c3b942ef6",
"object": "tariff",
"location_id": "loc_641b90b758fb8e6293716e40",
"live_mode": true,
"is_linked": false,
"connection_type": "MANUAL",
"type": "COMMODITY",
"status": "CONNECTED",
"timezone": "Europe/London",
"market_rates": false,
"contract_start_date": "2023-01-24T00:00:00Z",
"contract_end_date": "2024-01-24T00:00:00Z",
"time_created": "2023-05-05T05:37:27Z",
"account_id": "acc_661677911f2197045e6cf1b1",
"direction": "IMPORT",
"display_name": "Flexible Go 2023",
"provider_id": "prv_63a6087272921ef075a8fd3e",
"schedule": [
{
"months": [
"All"
],
"dates": [
24
],
"days_and_hours": [
{
"days": [
"All"
],
"hours": [
{
"valid_from": "05:00:00",
"valid_to": "23:30:00",
"rate": [
{
"fixed": 0.23431,
"to_kwh": 30.5,
"surcharge_fixed": 0.12,
"surcharge_percentage": 0.05,
"expression": "(((0.03 * $index) - 3) * $unitScale) * $vat",
"variables": {
"index": "BELPEX",
"unitsScale": 0.01,
"vat": 0.12
}
}
]
}
]
}
]
}
]
}
]
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"time_created": "2025-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "not_found",
"time_created": "2025-01-01T00:00:00Z"
}{
"object": "error",
"type": "rate_limit",
"code": "too_many_requests",
"message": "Too many requests. Please retry after a short delay.",
"time_created": "2026-01-29T17:11:52Z"
}Tariffs
List all tariffs
Returns all tariff objects, sorted by creation date (newest first). If no parameters are provided, results are paginated in pages of 30.
GET
/
tariffs
List all tariffs
curl --request GET \
--url https://api.flatpeak.com/tariffs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flatpeak.com/tariffs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.flatpeak.com/tariffs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flatpeak.com/tariffs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.flatpeak.com/tariffs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.flatpeak.com/tariffs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flatpeak.com/tariffs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"url": "/tariffs",
"has_more": false,
"data": [
{
"id": "trf_66ba584eb6923d7c3b942ef6",
"object": "tariff",
"location_id": "loc_641b90b758fb8e6293716e40",
"live_mode": true,
"is_linked": false,
"connection_type": "MANUAL",
"type": "COMMODITY",
"status": "CONNECTED",
"timezone": "Europe/London",
"market_rates": false,
"contract_start_date": "2023-01-24T00:00:00Z",
"contract_end_date": "2024-01-24T00:00:00Z",
"time_created": "2023-05-05T05:37:27Z",
"account_id": "acc_661677911f2197045e6cf1b1",
"direction": "IMPORT",
"display_name": "Flexible Go 2023",
"provider_id": "prv_63a6087272921ef075a8fd3e",
"schedule": [
{
"months": [
"All"
],
"dates": [
24
],
"days_and_hours": [
{
"days": [
"All"
],
"hours": [
{
"valid_from": "05:00:00",
"valid_to": "23:30:00",
"rate": [
{
"fixed": 0.23431,
"to_kwh": 30.5,
"surcharge_fixed": 0.12,
"surcharge_percentage": 0.05,
"expression": "(((0.03 * $index) - 3) * $unitScale) * $vat",
"variables": {
"index": "BELPEX",
"unitsScale": 0.01,
"vat": 0.12
}
}
]
}
]
}
]
}
]
}
]
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"time_created": "2025-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "not_found",
"time_created": "2025-01-01T00:00:00Z"
}{
"object": "error",
"type": "rate_limit",
"code": "too_many_requests",
"message": "Too many requests. Please retry after a short delay.",
"time_created": "2026-01-29T17:11:52Z"
}Authorizations
Authenticate with bearer you obtained from authentication endpoint.
Query Parameters
Filter by tariff type, supported values are COMMODITY and NON_COMMODITY.
Example:
"COMMODITY"
Filter by Flatpeak Location ID.
Example:
"loc_641b90b758fb8e6293716e40"
Was this page helpful?
⌘I

