Update Energy Profile
curl --request PATCH \
--url https://api.plugchoice.com/v3/sites/{site}/energy-profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"has_solar_panels": true,
"has_home_battery": true,
"contract_type": "<string>",
"supplier": "<string>",
"price_per_kwh": 123,
"off_peak_price_per_kwh": 123,
"feed_in_price_per_kwh": 123,
"dynamic_markup_per_kwh": 123,
"completed": true
}
'import requests
url = "https://api.plugchoice.com/v3/sites/{site}/energy-profile"
payload = {
"has_solar_panels": True,
"has_home_battery": True,
"contract_type": "<string>",
"supplier": "<string>",
"price_per_kwh": 123,
"off_peak_price_per_kwh": 123,
"feed_in_price_per_kwh": 123,
"dynamic_markup_per_kwh": 123,
"completed": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
has_solar_panels: true,
has_home_battery: true,
contract_type: '<string>',
supplier: '<string>',
price_per_kwh: 123,
off_peak_price_per_kwh: 123,
feed_in_price_per_kwh: 123,
dynamic_markup_per_kwh: 123,
completed: true
})
};
fetch('https://api.plugchoice.com/v3/sites/{site}/energy-profile', 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.plugchoice.com/v3/sites/{site}/energy-profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'has_solar_panels' => true,
'has_home_battery' => true,
'contract_type' => '<string>',
'supplier' => '<string>',
'price_per_kwh' => 123,
'off_peak_price_per_kwh' => 123,
'feed_in_price_per_kwh' => 123,
'dynamic_markup_per_kwh' => 123,
'completed' => true
]),
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://api.plugchoice.com/v3/sites/{site}/energy-profile"
payload := strings.NewReader("{\n \"has_solar_panels\": true,\n \"has_home_battery\": true,\n \"contract_type\": \"<string>\",\n \"supplier\": \"<string>\",\n \"price_per_kwh\": 123,\n \"off_peak_price_per_kwh\": 123,\n \"feed_in_price_per_kwh\": 123,\n \"dynamic_markup_per_kwh\": 123,\n \"completed\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.plugchoice.com/v3/sites/{site}/energy-profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"has_solar_panels\": true,\n \"has_home_battery\": true,\n \"contract_type\": \"<string>\",\n \"supplier\": \"<string>\",\n \"price_per_kwh\": 123,\n \"off_peak_price_per_kwh\": 123,\n \"feed_in_price_per_kwh\": 123,\n \"dynamic_markup_per_kwh\": 123,\n \"completed\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.plugchoice.com/v3/sites/{site}/energy-profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"has_solar_panels\": true,\n \"has_home_battery\": true,\n \"contract_type\": \"<string>\",\n \"supplier\": \"<string>\",\n \"price_per_kwh\": 123,\n \"off_peak_price_per_kwh\": 123,\n \"feed_in_price_per_kwh\": 123,\n \"dynamic_markup_per_kwh\": 123,\n \"completed\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"has_solar_panels": true,
"has_home_battery": true,
"contract_type": "<string>",
"supplier": "<string>",
"price_per_kwh": 123,
"off_peak_price_per_kwh": 123,
"feed_in_price_per_kwh": 123,
"dynamic_markup_per_kwh": 123,
"completed_at": "<string>",
"updated_at": "<string>"
}
}Energy Profile
Update Energy Profile
PATCH
/
v3
/
sites
/
{site}
/
energy-profile
Update Energy Profile
curl --request PATCH \
--url https://api.plugchoice.com/v3/sites/{site}/energy-profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"has_solar_panels": true,
"has_home_battery": true,
"contract_type": "<string>",
"supplier": "<string>",
"price_per_kwh": 123,
"off_peak_price_per_kwh": 123,
"feed_in_price_per_kwh": 123,
"dynamic_markup_per_kwh": 123,
"completed": true
}
'import requests
url = "https://api.plugchoice.com/v3/sites/{site}/energy-profile"
payload = {
"has_solar_panels": True,
"has_home_battery": True,
"contract_type": "<string>",
"supplier": "<string>",
"price_per_kwh": 123,
"off_peak_price_per_kwh": 123,
"feed_in_price_per_kwh": 123,
"dynamic_markup_per_kwh": 123,
"completed": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
has_solar_panels: true,
has_home_battery: true,
contract_type: '<string>',
supplier: '<string>',
price_per_kwh: 123,
off_peak_price_per_kwh: 123,
feed_in_price_per_kwh: 123,
dynamic_markup_per_kwh: 123,
completed: true
})
};
fetch('https://api.plugchoice.com/v3/sites/{site}/energy-profile', 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.plugchoice.com/v3/sites/{site}/energy-profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'has_solar_panels' => true,
'has_home_battery' => true,
'contract_type' => '<string>',
'supplier' => '<string>',
'price_per_kwh' => 123,
'off_peak_price_per_kwh' => 123,
'feed_in_price_per_kwh' => 123,
'dynamic_markup_per_kwh' => 123,
'completed' => true
]),
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://api.plugchoice.com/v3/sites/{site}/energy-profile"
payload := strings.NewReader("{\n \"has_solar_panels\": true,\n \"has_home_battery\": true,\n \"contract_type\": \"<string>\",\n \"supplier\": \"<string>\",\n \"price_per_kwh\": 123,\n \"off_peak_price_per_kwh\": 123,\n \"feed_in_price_per_kwh\": 123,\n \"dynamic_markup_per_kwh\": 123,\n \"completed\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.plugchoice.com/v3/sites/{site}/energy-profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"has_solar_panels\": true,\n \"has_home_battery\": true,\n \"contract_type\": \"<string>\",\n \"supplier\": \"<string>\",\n \"price_per_kwh\": 123,\n \"off_peak_price_per_kwh\": 123,\n \"feed_in_price_per_kwh\": 123,\n \"dynamic_markup_per_kwh\": 123,\n \"completed\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.plugchoice.com/v3/sites/{site}/energy-profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"has_solar_panels\": true,\n \"has_home_battery\": true,\n \"contract_type\": \"<string>\",\n \"supplier\": \"<string>\",\n \"price_per_kwh\": 123,\n \"off_peak_price_per_kwh\": 123,\n \"feed_in_price_per_kwh\": 123,\n \"dynamic_markup_per_kwh\": 123,\n \"completed\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"has_solar_panels": true,
"has_home_battery": true,
"contract_type": "<string>",
"supplier": "<string>",
"price_per_kwh": 123,
"off_peak_price_per_kwh": 123,
"feed_in_price_per_kwh": 123,
"dynamic_markup_per_kwh": 123,
"completed_at": "<string>",
"updated_at": "<string>"
}
}Saves one or more answers about the energy setup at a location. Send only the fields you want to change: fields you leave out keep their value, and
null clears a field. The first request creates the profile, so you can save each answer as soon as the user gives it.
Prices are in euro per kWh including VAT: a number from 0 to 5 with at most 5 decimals.
string
required
The UUID of the location.
boolean
Whether the location has solar panels.
boolean
Whether the location has a home battery.
string
The electricity contract. One of
fixed, variable or dynamic.string
The energy supplier. Maximum 100 characters.
number
The price per kWh. For a fixed or variable contract, the normal or single rate.
number
The off-peak (low) rate per kWh.
number
What the user gets per kWh fed back to the grid.
number
For a dynamic contract, the supplier’s markup per kWh on the day-ahead price.
boolean
Send
true when the user has finished answering. The first time, this sets completed_at to the current time; later requests keep that first time. false is not accepted.Response
Returns200 with the whole profile, also when the request created it.
object
The energy profile of the location.
Show data
Show data
boolean
Whether the location has solar panels, or
null when not answered.boolean
Whether the location has a home battery, or
null when not answered.string
The electricity contract. One of
fixed, variable or dynamic, or null when not answered.string
The energy supplier, or
null.number
The price per kWh in euro including VAT, or
null.number
The off-peak (low) rate per kWh in euro including VAT, or
null.number
What the user gets per kWh fed back to the grid, in euro including VAT, or
null.number
The supplier’s markup per kWh on the day-ahead price, in euro including VAT, or
null.string
When the user first finished answering, as an ISO 8601 UTC timestamp (for example
2026-10-08T07:12:34Z), or null.string
When an answer last changed, as an ISO 8601 UTC timestamp.
⌘I