Retrieve a location status
curl --request GET \
--url https://api.flatpeak.com/locations/{id}/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flatpeak.com/locations/{id}/status"
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/locations/{id}/status', 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/locations/{id}/status",
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/locations/{id}/status"
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/locations/{id}/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flatpeak.com/locations/{id}/status")
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": "loc_641b90b758fb8e6293716e40",
"object": "location_status",
"live_mode": true,
"time_created": "2023-11-07T05:31:56Z",
"account_id": "acc_661677911f2197045e6cf1b1",
"tariff_status": {
"commodity_import": {
"status": "CONNECTED",
"connection_type": "DIRECT",
"provider": {
"id": "prv_63a6087272921ef075a8fd3e",
"display_name": "Octopus Energy",
"logo_url": "https://s.flatpeak.com/83b06a60e38c2.png"
},
"tariff": {
"id": "trf_66ba584eb6923d7c3b942ef6",
"display_name": "Flexible Go 2023",
"structure_type": "FIXED",
"contract_end_date": "2024-01-01T00:00:00Z"
}
},
"commodity_export": {
"status": "CONNECTED ",
"connection_type": "MANUAL",
"provider": {
"id": "prv_63374fb151ea87296cd39ced",
"display_name": "E.ON Next",
"logo_url": "https://s.flatpeak.com/83b06a60e38c2.png"
},
"tariff": {
"id": "trf_66ba584eb6923d7c3b942ef6",
"display_name": "Export 2023",
"structure_type": "TIME_OF_DAY",
"contract_end_date": "2024-01-01T00:00:00Z"
}
},
"non_commodity_import": {
"status": "ERROR",
"connection_type": "DIRECT",
"provider": {
"id": "prv_63a6087272921ef075a8fd3e",
"display_name": "Octopus Energy",
"logo_url": "https://s.flatpeak.com/83b06a60e38c2.png"
},
"tariff": {
"id": "trf_6728b0e6b6e6106dd5a88f8d",
"display_name": "Grid Fee",
"structure_type": "FIXED",
"contract_end_date": "2024-01-01T00:00:00Z"
}
},
"non_commodity_export": {
"status": "NOT_SUPPORTED"
},
"local": {
"status": "NOT_SUPPORTED"
}
}
}{
"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"
}Locations
Retrieve a location status
Retrieves the current status of a location.
This endpoint supports one of each tariff (commodity+import, commodity+export, non_commodity+import), matching all use cases supported by Connect.
GET
/
locations
/
{id}
/
status
Retrieve a location status
curl --request GET \
--url https://api.flatpeak.com/locations/{id}/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flatpeak.com/locations/{id}/status"
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/locations/{id}/status', 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/locations/{id}/status",
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/locations/{id}/status"
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/locations/{id}/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flatpeak.com/locations/{id}/status")
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": "loc_641b90b758fb8e6293716e40",
"object": "location_status",
"live_mode": true,
"time_created": "2023-11-07T05:31:56Z",
"account_id": "acc_661677911f2197045e6cf1b1",
"tariff_status": {
"commodity_import": {
"status": "CONNECTED",
"connection_type": "DIRECT",
"provider": {
"id": "prv_63a6087272921ef075a8fd3e",
"display_name": "Octopus Energy",
"logo_url": "https://s.flatpeak.com/83b06a60e38c2.png"
},
"tariff": {
"id": "trf_66ba584eb6923d7c3b942ef6",
"display_name": "Flexible Go 2023",
"structure_type": "FIXED",
"contract_end_date": "2024-01-01T00:00:00Z"
}
},
"commodity_export": {
"status": "CONNECTED ",
"connection_type": "MANUAL",
"provider": {
"id": "prv_63374fb151ea87296cd39ced",
"display_name": "E.ON Next",
"logo_url": "https://s.flatpeak.com/83b06a60e38c2.png"
},
"tariff": {
"id": "trf_66ba584eb6923d7c3b942ef6",
"display_name": "Export 2023",
"structure_type": "TIME_OF_DAY",
"contract_end_date": "2024-01-01T00:00:00Z"
}
},
"non_commodity_import": {
"status": "ERROR",
"connection_type": "DIRECT",
"provider": {
"id": "prv_63a6087272921ef075a8fd3e",
"display_name": "Octopus Energy",
"logo_url": "https://s.flatpeak.com/83b06a60e38c2.png"
},
"tariff": {
"id": "trf_6728b0e6b6e6106dd5a88f8d",
"display_name": "Grid Fee",
"structure_type": "FIXED",
"contract_end_date": "2024-01-01T00:00:00Z"
}
},
"non_commodity_export": {
"status": "NOT_SUPPORTED"
},
"local": {
"status": "NOT_SUPPORTED"
}
}
}{
"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.
Path Parameters
Flatpeak location_id
Response
Response example
Flatpeak unique location ID
Example:
"loc_641b90b758fb8e6293716e40"
Represents the object’s type. I.e. location_status.
Example:
"location_status"
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
Indicates time when this location was created.
Example:
"2023-11-07T05:31:56Z"
Flatpeak account ID.
Example:
"acc_661677911f2197045e6cf1b1"
Tariff status object.
Show child attributes
Show child attributes
Was this page helpful?
⌘I

