Cancel a VPP event
curl --request POST \
--url https://fleet-api.flatpeak.com/vpp-events/{vpp_event_id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://fleet-api.flatpeak.com/vpp-events/{vpp_event_id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://fleet-api.flatpeak.com/vpp-events/{vpp_event_id}/cancel', 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/vpp-events/{vpp_event_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/vpp-events/{vpp_event_id}/cancel"
req, _ := http.NewRequest("POST", 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.post("https://fleet-api.flatpeak.com/vpp-events/{vpp_event_id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://fleet-api.flatpeak.com/vpp-events/{vpp_event_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "vpe_7d2a4c6e9b1f3a5c8e0d2f4b",
"object": "vpp_event",
"live_mode": true,
"reference_id": "NG-DFS-2026-08-04-EV17",
"event_type": "ECONOMIC",
"group_id": "grp_2f6a9c1d8e3b5a7c4d0e9f1a",
"intervals": [
{
"start_time": "2026-08-04T20:00:00Z",
"end_time": "2026-08-04T22:00:00Z",
"power_kw": -4800
}
],
"start_time": "2026-08-04T20:00:00Z",
"end_time": "2026-08-04T22:00:00Z",
"status": "COMPLETE",
"time_allocation_locks": "2026-08-04T18:00:00Z",
"device_count": 1930,
"delivery": {
"requested_power_kw": -4800,
"requested_energy_kwh": -9600,
"committed_power_kw": -4620,
"committed_energy_kwh": -9240,
"delivered_power_kw": -4390,
"delivered_energy_kwh": -8780,
"fulfillment": 0.95,
"status": "PARTIAL"
},
"time_created": "2026-08-03T11:20:00Z",
"time_updated": "2026-08-04T22:40:00Z",
"account_id": "acc_63e2f1b9a4c8d05f7e3a9b1c"
}{
"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"
}VPP events
Cancel a VPP event
Calls the event off. An ALLOCATION_OPEN or LOCKED event is canceled whole, while an ACTIVE event ends its commitments at cancel time, with delivery scored pro-rata up to that point. A COMPLETE or already canceled event returns 422 vpp_event_finished. Fires vpp_event.update.
POST
/
vpp-events
/
{vpp_event_id}
/
cancel
Cancel a VPP event
curl --request POST \
--url https://fleet-api.flatpeak.com/vpp-events/{vpp_event_id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://fleet-api.flatpeak.com/vpp-events/{vpp_event_id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://fleet-api.flatpeak.com/vpp-events/{vpp_event_id}/cancel', 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/vpp-events/{vpp_event_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/vpp-events/{vpp_event_id}/cancel"
req, _ := http.NewRequest("POST", 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.post("https://fleet-api.flatpeak.com/vpp-events/{vpp_event_id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://fleet-api.flatpeak.com/vpp-events/{vpp_event_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "vpe_7d2a4c6e9b1f3a5c8e0d2f4b",
"object": "vpp_event",
"live_mode": true,
"reference_id": "NG-DFS-2026-08-04-EV17",
"event_type": "ECONOMIC",
"group_id": "grp_2f6a9c1d8e3b5a7c4d0e9f1a",
"intervals": [
{
"start_time": "2026-08-04T20:00:00Z",
"end_time": "2026-08-04T22:00:00Z",
"power_kw": -4800
}
],
"start_time": "2026-08-04T20:00:00Z",
"end_time": "2026-08-04T22:00:00Z",
"status": "COMPLETE",
"time_allocation_locks": "2026-08-04T18:00:00Z",
"device_count": 1930,
"delivery": {
"requested_power_kw": -4800,
"requested_energy_kwh": -9600,
"committed_power_kw": -4620,
"committed_energy_kwh": -9240,
"delivered_power_kw": -4390,
"delivered_energy_kwh": -8780,
"fulfillment": 0.95,
"status": "PARTIAL"
},
"time_created": "2026-08-03T11:20:00Z",
"time_updated": "2026-08-04T22:40:00Z",
"account_id": "acc_63e2f1b9a4c8d05f7e3a9b1c"
}{
"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.
Response
VPP event response.
One market activation: a power target per interval for one group. The event takes every device in the group at creation and records each one in its device list. Plans are separate: they run devices under a managed tariff.
Lifecycle status, the same values the Energy API reports to OEMs. Changes fire vpp_event.update.
| Value | Meaning |
|---|---|
ALLOCATION_OPEN | Until time_allocation_locks. Device shares can still change |
LOCKED | Shares fixed and sent to the OEMs |
ACTIVE | During the window |
COMPLETE | After the window |
CANCELED | Called off by you |
Available options:
ALLOCATION_OPEN, LOCKED, ACTIVE, COMPLETE, CANCELED Example:
"ALLOCATION_OPEN"
Was this page helpful?

