Retrieve a tariff
curl --request GET \
--url https://fleet-api.flatpeak.com/tariffs/{tariff_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://fleet-api.flatpeak.com/tariffs/{tariff_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://fleet-api.flatpeak.com/tariffs/{tariff_id}', 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://fleet-api.flatpeak.com/tariffs/{tariff_id}",
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://fleet-api.flatpeak.com/tariffs/{tariff_id}"
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://fleet-api.flatpeak.com/tariffs/{tariff_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://fleet-api.flatpeak.com/tariffs/{tariff_id}")
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{
"id": "trf_66ba584eb6923d7c3b942ef6",
"object": "tariff",
"live_mode": true,
"fallback": false,
"location_id": "loc_641b90b758fb8e6293716e40",
"device_id": null,
"connection_type": "MANUAL",
"connection_status": "CONNECTED",
"meter_records_required": false,
"tariff_type": "COMMODITY",
"direction": "IMPORT",
"display_name": "Two-rate home tariff",
"timezone": "America/Los_Angeles",
"contract_start_date": "2026-07-01T00:00:00Z",
"contract_end_date": "2027-06-30T23:59:59Z",
"supplier": {
"id": "sup_63a6087272921ef075a8fd3e",
"display_name": "Phase Energy",
"logo_url": "https://static.flatpeak.com/suppliers/phase-energy.png"
},
"schedule": [
{
"months": [
"All"
],
"dates": [],
"days_and_hours": [
{
"days": [
"All"
],
"hours": [
{
"valid_from": "00:00:00",
"valid_to": "07:00:00",
"rate": {
"vat_included": "YES",
"vat_percentage": 0.05,
"variables": {
"price": 0.12
},
"expression": "$price"
}
},
{
"valid_from": "07:00:00",
"valid_to": "00:00:00",
"rate": {
"vat_included": "YES",
"vat_percentage": 0.05,
"variables": {
"price": 0.29
},
"expression": "$price"
}
}
]
}
]
}
],
"time_created": "2026-07-01T09:12:00Z",
"oem_id": "oem_6a3a8dada72cd0a249ff9528"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}Tariffs
Retrieve a tariff
Retrieves a tariff.
GET
/
tariffs
/
{tariff_id}
Retrieve a tariff
curl --request GET \
--url https://fleet-api.flatpeak.com/tariffs/{tariff_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://fleet-api.flatpeak.com/tariffs/{tariff_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://fleet-api.flatpeak.com/tariffs/{tariff_id}', 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://fleet-api.flatpeak.com/tariffs/{tariff_id}",
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://fleet-api.flatpeak.com/tariffs/{tariff_id}"
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://fleet-api.flatpeak.com/tariffs/{tariff_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://fleet-api.flatpeak.com/tariffs/{tariff_id}")
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{
"id": "trf_66ba584eb6923d7c3b942ef6",
"object": "tariff",
"live_mode": true,
"fallback": false,
"location_id": "loc_641b90b758fb8e6293716e40",
"device_id": null,
"connection_type": "MANUAL",
"connection_status": "CONNECTED",
"meter_records_required": false,
"tariff_type": "COMMODITY",
"direction": "IMPORT",
"display_name": "Two-rate home tariff",
"timezone": "America/Los_Angeles",
"contract_start_date": "2026-07-01T00:00:00Z",
"contract_end_date": "2027-06-30T23:59:59Z",
"supplier": {
"id": "sup_63a6087272921ef075a8fd3e",
"display_name": "Phase Energy",
"logo_url": "https://static.flatpeak.com/suppliers/phase-energy.png"
},
"schedule": [
{
"months": [
"All"
],
"dates": [],
"days_and_hours": [
{
"days": [
"All"
],
"hours": [
{
"valid_from": "00:00:00",
"valid_to": "07:00:00",
"rate": {
"vat_included": "YES",
"vat_percentage": 0.05,
"variables": {
"price": 0.12
},
"expression": "$price"
}
},
{
"valid_from": "07:00:00",
"valid_to": "00:00:00",
"rate": {
"vat_included": "YES",
"vat_percentage": 0.05,
"variables": {
"price": 0.29
},
"expression": "$price"
}
}
]
}
]
}
],
"time_created": "2026-07-01T09:12:00Z",
"oem_id": "oem_6a3a8dada72cd0a249ff9528"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}Authorizations
Authenticate with the bearer_token obtained from the authentication endpoint.
Response
Tariff response.
Tariff connection status, as on the Connect tariffs summary.
| Value | Meaning |
|---|---|
CONNECTED | Live. A fallback tariff also reports CONNECTED, with fallback true |
NOT_CONNECTED | No tariff connected |
ERROR_REPORTED | The user reported an incorrect tariff; the report is open |
ERROR | The tariff could not be retrieved, for example a failing supplier connection |
EXPIRED | The connection expired; the user must reconnect |
UPGRADE | A better connection is available, usually a direct integration. Live until the user reconnects through Connect |
Available options:
CONNECTED, NOT_CONNECTED, ERROR_REPORTED, ERROR, EXPIRED, UPGRADE Example:
"CONNECTED"
Was this page helpful?

