curl --request POST \
--url https://fleet-api.flatpeak.com/devices/{device_id}/plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"intervals": [
{
"start_time": "2026-02-02T02:00:00Z",
"end_time": "2026-02-02T04:30:00Z",
"power_kw": -4.3
}
],
"reference_id": "d1f0c2a4-plan-2026-07-08T11:00"
}
'import requests
url = "https://fleet-api.flatpeak.com/devices/{device_id}/plans"
payload = {
"intervals": [
{
"start_time": "2026-02-02T02:00:00Z",
"end_time": "2026-02-02T04:30:00Z",
"power_kw": -4.3
}
],
"reference_id": "d1f0c2a4-plan-2026-07-08T11:00"
}
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({
intervals: [
{
start_time: '2026-02-02T02:00:00Z',
end_time: '2026-02-02T04:30:00Z',
power_kw: -4.3
}
],
reference_id: 'd1f0c2a4-plan-2026-07-08T11:00'
})
};
fetch('https://fleet-api.flatpeak.com/devices/{device_id}/plans', 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/devices/{device_id}/plans",
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([
'intervals' => [
[
'start_time' => '2026-02-02T02:00:00Z',
'end_time' => '2026-02-02T04:30:00Z',
'power_kw' => -4.3
]
],
'reference_id' => 'd1f0c2a4-plan-2026-07-08T11:00'
]),
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/devices/{device_id}/plans"
payload := strings.NewReader("{\n \"intervals\": [\n {\n \"start_time\": \"2026-02-02T02:00:00Z\",\n \"end_time\": \"2026-02-02T04:30:00Z\",\n \"power_kw\": -4.3\n }\n ],\n \"reference_id\": \"d1f0c2a4-plan-2026-07-08T11:00\"\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/devices/{device_id}/plans")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"intervals\": [\n {\n \"start_time\": \"2026-02-02T02:00:00Z\",\n \"end_time\": \"2026-02-02T04:30:00Z\",\n \"power_kw\": -4.3\n }\n ],\n \"reference_id\": \"d1f0c2a4-plan-2026-07-08T11:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fleet-api.flatpeak.com/devices/{device_id}/plans")
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 \"intervals\": [\n {\n \"start_time\": \"2026-02-02T02:00:00Z\",\n \"end_time\": \"2026-02-02T04:30:00Z\",\n \"power_kw\": -4.3\n }\n ],\n \"reference_id\": \"d1f0c2a4-plan-2026-07-08T11:00\"\n}"
response = http.request(request)
puts response.read_body{
"id": "pln_7e1c2b9a4d0f8a3b6c2e5d41",
"object": "plan",
"live_mode": true,
"device_id": "dev_63a6087272941ef077a8fd3e",
"reference_id": "d1f0c2a4-plan-2026-07-08T11:00",
"intervals": [
{
"start_time": "2026-07-13T20:14:00Z",
"end_time": "2026-07-13T22:00:00Z",
"power_kw": -4.3
},
{
"start_time": "2026-07-14T02:00:00Z",
"end_time": "2026-07-14T06:00:00Z",
"power_kw": 7.4
}
],
"time_created": "2026-07-13T17:45:12Z",
"account_id": "acc_6a5e504c3b98d0d6739b5f72"
}{
"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"
}Submit a dispatch plan
Submits a plan, replacing any plan over the same period. Plans are for managed tariffs: the device must have an ACTIVE enrollment in one of your managed programs, or the call returns 422 plan_not_allowed. Every interval is binding on the OEM. Cap: 12 plans per device per hour, then 429 plan_rate_limited with retry_after in seconds. Pass reference_id to make a retry safe: resubmitting the same value returns the stored plan.
curl --request POST \
--url https://fleet-api.flatpeak.com/devices/{device_id}/plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"intervals": [
{
"start_time": "2026-02-02T02:00:00Z",
"end_time": "2026-02-02T04:30:00Z",
"power_kw": -4.3
}
],
"reference_id": "d1f0c2a4-plan-2026-07-08T11:00"
}
'import requests
url = "https://fleet-api.flatpeak.com/devices/{device_id}/plans"
payload = {
"intervals": [
{
"start_time": "2026-02-02T02:00:00Z",
"end_time": "2026-02-02T04:30:00Z",
"power_kw": -4.3
}
],
"reference_id": "d1f0c2a4-plan-2026-07-08T11:00"
}
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({
intervals: [
{
start_time: '2026-02-02T02:00:00Z',
end_time: '2026-02-02T04:30:00Z',
power_kw: -4.3
}
],
reference_id: 'd1f0c2a4-plan-2026-07-08T11:00'
})
};
fetch('https://fleet-api.flatpeak.com/devices/{device_id}/plans', 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/devices/{device_id}/plans",
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([
'intervals' => [
[
'start_time' => '2026-02-02T02:00:00Z',
'end_time' => '2026-02-02T04:30:00Z',
'power_kw' => -4.3
]
],
'reference_id' => 'd1f0c2a4-plan-2026-07-08T11:00'
]),
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/devices/{device_id}/plans"
payload := strings.NewReader("{\n \"intervals\": [\n {\n \"start_time\": \"2026-02-02T02:00:00Z\",\n \"end_time\": \"2026-02-02T04:30:00Z\",\n \"power_kw\": -4.3\n }\n ],\n \"reference_id\": \"d1f0c2a4-plan-2026-07-08T11:00\"\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/devices/{device_id}/plans")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"intervals\": [\n {\n \"start_time\": \"2026-02-02T02:00:00Z\",\n \"end_time\": \"2026-02-02T04:30:00Z\",\n \"power_kw\": -4.3\n }\n ],\n \"reference_id\": \"d1f0c2a4-plan-2026-07-08T11:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fleet-api.flatpeak.com/devices/{device_id}/plans")
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 \"intervals\": [\n {\n \"start_time\": \"2026-02-02T02:00:00Z\",\n \"end_time\": \"2026-02-02T04:30:00Z\",\n \"power_kw\": -4.3\n }\n ],\n \"reference_id\": \"d1f0c2a4-plan-2026-07-08T11:00\"\n}"
response = http.request(request)
puts response.read_body{
"id": "pln_7e1c2b9a4d0f8a3b6c2e5d41",
"object": "plan",
"live_mode": true,
"device_id": "dev_63a6087272941ef077a8fd3e",
"reference_id": "d1f0c2a4-plan-2026-07-08T11:00",
"intervals": [
{
"start_time": "2026-07-13T20:14:00Z",
"end_time": "2026-07-13T22:00:00Z",
"power_kw": -4.3
},
{
"start_time": "2026-07-14T02:00:00Z",
"end_time": "2026-07-14T06:00:00Z",
"power_kw": 7.4
}
],
"time_created": "2026-07-13T17:45:12Z",
"account_id": "acc_6a5e504c3b98d0d6739b5f72"
}{
"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
A plan for a device enrolled in one of your managed tariff programs. Every interval is binding on the OEM. Market activations are committed separately, with VPP events.
Response
Plan response.
A plan submitted to a device enrolled in a managed tariff program. It replaces overlapping intervals of earlier plans, and every interval is binding on the OEM. Market activations are committed separately as VPP events.
Was this page helpful?

