Create a tariff
curl --request POST \
--url https://fleet-api.flatpeak.com/tariffs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"location_id": "loc_641b90b758fb8e6293716e40",
"tariff_type": "COMMODITY",
"direction": "IMPORT",
"display_name": "Flexible Go 2023",
"contract_start_date": "2026-01-24T00:00:00Z",
"contract_end_date": "2026-01-24T00:00:00Z",
"schedule": [
{
"months": [
"All"
],
"dates": [
24
],
"days_and_hours": [
{
"days": [
"All"
],
"hours": [
{
"valid_from": "05:00:00",
"valid_to": "23:30:00",
"rate": {
"vat_included": "YES",
"variables": {
"index": "BELPEX",
"spread": 1.25,
"fees": 2.1,
"unit_scale": 0.01
},
"expression": "(($index + $spread + $fees) * $unit_scale)",
"vat_percentage": 0.12
}
}
]
}
]
}
],
"device_id": "dev_63a6087272941ef077a8fd3e"
}
'import requests
url = "https://fleet-api.flatpeak.com/tariffs"
payload = {
"location_id": "loc_641b90b758fb8e6293716e40",
"tariff_type": "COMMODITY",
"direction": "IMPORT",
"display_name": "Flexible Go 2023",
"contract_start_date": "2026-01-24T00:00:00Z",
"contract_end_date": "2026-01-24T00:00:00Z",
"schedule": [
{
"months": ["All"],
"dates": [24],
"days_and_hours": [
{
"days": ["All"],
"hours": [
{
"valid_from": "05:00:00",
"valid_to": "23:30:00",
"rate": {
"vat_included": "YES",
"variables": {
"index": "BELPEX",
"spread": 1.25,
"fees": 2.1,
"unit_scale": 0.01
},
"expression": "(($index + $spread + $fees) * $unit_scale)",
"vat_percentage": 0.12
}
}
]
}
]
}
],
"device_id": "dev_63a6087272941ef077a8fd3e"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
location_id: 'loc_641b90b758fb8e6293716e40',
tariff_type: 'COMMODITY',
direction: 'IMPORT',
display_name: 'Flexible Go 2023',
contract_start_date: '2026-01-24T00:00:00Z',
contract_end_date: '2026-01-24T00:00:00Z',
schedule: [
{
months: ['All'],
dates: [24],
days_and_hours: [
{
days: ['All'],
hours: [
{
valid_from: '05:00:00',
valid_to: '23:30:00',
rate: {
vat_included: 'YES',
variables: {index: 'BELPEX', spread: 1.25, fees: 2.1, unit_scale: 0.01},
expression: '(($index + $spread + $fees) * $unit_scale)',
vat_percentage: 0.12
}
}
]
}
]
}
],
device_id: 'dev_63a6087272941ef077a8fd3e'
})
};
fetch('https://fleet-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://fleet-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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'location_id' => 'loc_641b90b758fb8e6293716e40',
'tariff_type' => 'COMMODITY',
'direction' => 'IMPORT',
'display_name' => 'Flexible Go 2023',
'contract_start_date' => '2026-01-24T00:00:00Z',
'contract_end_date' => '2026-01-24T00:00:00Z',
'schedule' => [
[
'months' => [
'All'
],
'dates' => [
24
],
'days_and_hours' => [
[
'days' => [
'All'
],
'hours' => [
[
'valid_from' => '05:00:00',
'valid_to' => '23:30:00',
'rate' => [
'vat_included' => 'YES',
'variables' => [
'index' => 'BELPEX',
'spread' => 1.25,
'fees' => 2.1,
'unit_scale' => 0.01
],
'expression' => '(($index + $spread + $fees) * $unit_scale)',
'vat_percentage' => 0.12
]
]
]
]
]
]
],
'device_id' => 'dev_63a6087272941ef077a8fd3e'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://fleet-api.flatpeak.com/tariffs"
payload := strings.NewReader("{\n \"location_id\": \"loc_641b90b758fb8e6293716e40\",\n \"tariff_type\": \"COMMODITY\",\n \"direction\": \"IMPORT\",\n \"display_name\": \"Flexible Go 2023\",\n \"contract_start_date\": \"2026-01-24T00:00:00Z\",\n \"contract_end_date\": \"2026-01-24T00:00:00Z\",\n \"schedule\": [\n {\n \"months\": [\n \"All\"\n ],\n \"dates\": [\n 24\n ],\n \"days_and_hours\": [\n {\n \"days\": [\n \"All\"\n ],\n \"hours\": [\n {\n \"valid_from\": \"05:00:00\",\n \"valid_to\": \"23:30:00\",\n \"rate\": {\n \"vat_included\": \"YES\",\n \"variables\": {\n \"index\": \"BELPEX\",\n \"spread\": 1.25,\n \"fees\": 2.1,\n \"unit_scale\": 0.01\n },\n \"expression\": \"(($index + $spread + $fees) * $unit_scale)\",\n \"vat_percentage\": 0.12\n }\n }\n ]\n }\n ]\n }\n ],\n \"device_id\": \"dev_63a6087272941ef077a8fd3e\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://fleet-api.flatpeak.com/tariffs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"location_id\": \"loc_641b90b758fb8e6293716e40\",\n \"tariff_type\": \"COMMODITY\",\n \"direction\": \"IMPORT\",\n \"display_name\": \"Flexible Go 2023\",\n \"contract_start_date\": \"2026-01-24T00:00:00Z\",\n \"contract_end_date\": \"2026-01-24T00:00:00Z\",\n \"schedule\": [\n {\n \"months\": [\n \"All\"\n ],\n \"dates\": [\n 24\n ],\n \"days_and_hours\": [\n {\n \"days\": [\n \"All\"\n ],\n \"hours\": [\n {\n \"valid_from\": \"05:00:00\",\n \"valid_to\": \"23:30:00\",\n \"rate\": {\n \"vat_included\": \"YES\",\n \"variables\": {\n \"index\": \"BELPEX\",\n \"spread\": 1.25,\n \"fees\": 2.1,\n \"unit_scale\": 0.01\n },\n \"expression\": \"(($index + $spread + $fees) * $unit_scale)\",\n \"vat_percentage\": 0.12\n }\n }\n ]\n }\n ]\n }\n ],\n \"device_id\": \"dev_63a6087272941ef077a8fd3e\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fleet-api.flatpeak.com/tariffs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"location_id\": \"loc_641b90b758fb8e6293716e40\",\n \"tariff_type\": \"COMMODITY\",\n \"direction\": \"IMPORT\",\n \"display_name\": \"Flexible Go 2023\",\n \"contract_start_date\": \"2026-01-24T00:00:00Z\",\n \"contract_end_date\": \"2026-01-24T00:00:00Z\",\n \"schedule\": [\n {\n \"months\": [\n \"All\"\n ],\n \"dates\": [\n 24\n ],\n \"days_and_hours\": [\n {\n \"days\": [\n \"All\"\n ],\n \"hours\": [\n {\n \"valid_from\": \"05:00:00\",\n \"valid_to\": \"23:30:00\",\n \"rate\": {\n \"vat_included\": \"YES\",\n \"variables\": {\n \"index\": \"BELPEX\",\n \"spread\": 1.25,\n \"fees\": 2.1,\n \"unit_scale\": 0.01\n },\n \"expression\": \"(($index + $spread + $fees) * $unit_scale)\",\n \"vat_percentage\": 0.12\n }\n }\n ]\n }\n ]\n }\n ],\n \"device_id\": \"dev_63a6087272941ef077a8fd3e\"\n}"
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"
}{
"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
Create a tariff
Creates a tariff at a location, one per direction of energy flow. A device needs a connected tariff at its location to enroll. Only accounts that supply energy can call it; other accounts receive 403.
POST
/
tariffs
Create a tariff
curl --request POST \
--url https://fleet-api.flatpeak.com/tariffs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"location_id": "loc_641b90b758fb8e6293716e40",
"tariff_type": "COMMODITY",
"direction": "IMPORT",
"display_name": "Flexible Go 2023",
"contract_start_date": "2026-01-24T00:00:00Z",
"contract_end_date": "2026-01-24T00:00:00Z",
"schedule": [
{
"months": [
"All"
],
"dates": [
24
],
"days_and_hours": [
{
"days": [
"All"
],
"hours": [
{
"valid_from": "05:00:00",
"valid_to": "23:30:00",
"rate": {
"vat_included": "YES",
"variables": {
"index": "BELPEX",
"spread": 1.25,
"fees": 2.1,
"unit_scale": 0.01
},
"expression": "(($index + $spread + $fees) * $unit_scale)",
"vat_percentage": 0.12
}
}
]
}
]
}
],
"device_id": "dev_63a6087272941ef077a8fd3e"
}
'import requests
url = "https://fleet-api.flatpeak.com/tariffs"
payload = {
"location_id": "loc_641b90b758fb8e6293716e40",
"tariff_type": "COMMODITY",
"direction": "IMPORT",
"display_name": "Flexible Go 2023",
"contract_start_date": "2026-01-24T00:00:00Z",
"contract_end_date": "2026-01-24T00:00:00Z",
"schedule": [
{
"months": ["All"],
"dates": [24],
"days_and_hours": [
{
"days": ["All"],
"hours": [
{
"valid_from": "05:00:00",
"valid_to": "23:30:00",
"rate": {
"vat_included": "YES",
"variables": {
"index": "BELPEX",
"spread": 1.25,
"fees": 2.1,
"unit_scale": 0.01
},
"expression": "(($index + $spread + $fees) * $unit_scale)",
"vat_percentage": 0.12
}
}
]
}
]
}
],
"device_id": "dev_63a6087272941ef077a8fd3e"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
location_id: 'loc_641b90b758fb8e6293716e40',
tariff_type: 'COMMODITY',
direction: 'IMPORT',
display_name: 'Flexible Go 2023',
contract_start_date: '2026-01-24T00:00:00Z',
contract_end_date: '2026-01-24T00:00:00Z',
schedule: [
{
months: ['All'],
dates: [24],
days_and_hours: [
{
days: ['All'],
hours: [
{
valid_from: '05:00:00',
valid_to: '23:30:00',
rate: {
vat_included: 'YES',
variables: {index: 'BELPEX', spread: 1.25, fees: 2.1, unit_scale: 0.01},
expression: '(($index + $spread + $fees) * $unit_scale)',
vat_percentage: 0.12
}
}
]
}
]
}
],
device_id: 'dev_63a6087272941ef077a8fd3e'
})
};
fetch('https://fleet-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://fleet-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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'location_id' => 'loc_641b90b758fb8e6293716e40',
'tariff_type' => 'COMMODITY',
'direction' => 'IMPORT',
'display_name' => 'Flexible Go 2023',
'contract_start_date' => '2026-01-24T00:00:00Z',
'contract_end_date' => '2026-01-24T00:00:00Z',
'schedule' => [
[
'months' => [
'All'
],
'dates' => [
24
],
'days_and_hours' => [
[
'days' => [
'All'
],
'hours' => [
[
'valid_from' => '05:00:00',
'valid_to' => '23:30:00',
'rate' => [
'vat_included' => 'YES',
'variables' => [
'index' => 'BELPEX',
'spread' => 1.25,
'fees' => 2.1,
'unit_scale' => 0.01
],
'expression' => '(($index + $spread + $fees) * $unit_scale)',
'vat_percentage' => 0.12
]
]
]
]
]
]
],
'device_id' => 'dev_63a6087272941ef077a8fd3e'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://fleet-api.flatpeak.com/tariffs"
payload := strings.NewReader("{\n \"location_id\": \"loc_641b90b758fb8e6293716e40\",\n \"tariff_type\": \"COMMODITY\",\n \"direction\": \"IMPORT\",\n \"display_name\": \"Flexible Go 2023\",\n \"contract_start_date\": \"2026-01-24T00:00:00Z\",\n \"contract_end_date\": \"2026-01-24T00:00:00Z\",\n \"schedule\": [\n {\n \"months\": [\n \"All\"\n ],\n \"dates\": [\n 24\n ],\n \"days_and_hours\": [\n {\n \"days\": [\n \"All\"\n ],\n \"hours\": [\n {\n \"valid_from\": \"05:00:00\",\n \"valid_to\": \"23:30:00\",\n \"rate\": {\n \"vat_included\": \"YES\",\n \"variables\": {\n \"index\": \"BELPEX\",\n \"spread\": 1.25,\n \"fees\": 2.1,\n \"unit_scale\": 0.01\n },\n \"expression\": \"(($index + $spread + $fees) * $unit_scale)\",\n \"vat_percentage\": 0.12\n }\n }\n ]\n }\n ]\n }\n ],\n \"device_id\": \"dev_63a6087272941ef077a8fd3e\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://fleet-api.flatpeak.com/tariffs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"location_id\": \"loc_641b90b758fb8e6293716e40\",\n \"tariff_type\": \"COMMODITY\",\n \"direction\": \"IMPORT\",\n \"display_name\": \"Flexible Go 2023\",\n \"contract_start_date\": \"2026-01-24T00:00:00Z\",\n \"contract_end_date\": \"2026-01-24T00:00:00Z\",\n \"schedule\": [\n {\n \"months\": [\n \"All\"\n ],\n \"dates\": [\n 24\n ],\n \"days_and_hours\": [\n {\n \"days\": [\n \"All\"\n ],\n \"hours\": [\n {\n \"valid_from\": \"05:00:00\",\n \"valid_to\": \"23:30:00\",\n \"rate\": {\n \"vat_included\": \"YES\",\n \"variables\": {\n \"index\": \"BELPEX\",\n \"spread\": 1.25,\n \"fees\": 2.1,\n \"unit_scale\": 0.01\n },\n \"expression\": \"(($index + $spread + $fees) * $unit_scale)\",\n \"vat_percentage\": 0.12\n }\n }\n ]\n }\n ]\n }\n ],\n \"device_id\": \"dev_63a6087272941ef077a8fd3e\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fleet-api.flatpeak.com/tariffs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"location_id\": \"loc_641b90b758fb8e6293716e40\",\n \"tariff_type\": \"COMMODITY\",\n \"direction\": \"IMPORT\",\n \"display_name\": \"Flexible Go 2023\",\n \"contract_start_date\": \"2026-01-24T00:00:00Z\",\n \"contract_end_date\": \"2026-01-24T00:00:00Z\",\n \"schedule\": [\n {\n \"months\": [\n \"All\"\n ],\n \"dates\": [\n 24\n ],\n \"days_and_hours\": [\n {\n \"days\": [\n \"All\"\n ],\n \"hours\": [\n {\n \"valid_from\": \"05:00:00\",\n \"valid_to\": \"23:30:00\",\n \"rate\": {\n \"vat_included\": \"YES\",\n \"variables\": {\n \"index\": \"BELPEX\",\n \"spread\": 1.25,\n \"fees\": 2.1,\n \"unit_scale\": 0.01\n },\n \"expression\": \"(($index + $spread + $fees) * $unit_scale)\",\n \"vat_percentage\": 0.12\n }\n }\n ]\n }\n ]\n }\n ],\n \"device_id\": \"dev_63a6087272941ef077a8fd3e\"\n}"
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"
}{
"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.
Body
application/json
Creates a tariff at a location. Available to accounts that supply energy, which Flatpeak records at onboarding.
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?

