Update Smart Charging
curl --request PUT \
--url https://app.plugchoice.com/api/v3/sites/{site}/smart-charging \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"timezone": "<string>",
"smart_charging": "<string>",
"day_ahead_pricing_strategy": "<string>",
"day_ahead_pricing_threshold": 123,
"off_peak_start": "<string>",
"off_peak_end": "<string>",
"tariff_zone": "<string>"
}
'import requests
url = "https://app.plugchoice.com/api/v3/sites/{site}/smart-charging"
payload = {
"timezone": "<string>",
"smart_charging": "<string>",
"day_ahead_pricing_strategy": "<string>",
"day_ahead_pricing_threshold": 123,
"off_peak_start": "<string>",
"off_peak_end": "<string>",
"tariff_zone": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
timezone: '<string>',
smart_charging: '<string>',
day_ahead_pricing_strategy: '<string>',
day_ahead_pricing_threshold: 123,
off_peak_start: '<string>',
off_peak_end: '<string>',
tariff_zone: '<string>'
})
};
fetch('https://app.plugchoice.com/api/v3/sites/{site}/smart-charging', 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://app.plugchoice.com/api/v3/sites/{site}/smart-charging",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'timezone' => '<string>',
'smart_charging' => '<string>',
'day_ahead_pricing_strategy' => '<string>',
'day_ahead_pricing_threshold' => 123,
'off_peak_start' => '<string>',
'off_peak_end' => '<string>',
'tariff_zone' => '<string>'
]),
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://app.plugchoice.com/api/v3/sites/{site}/smart-charging"
payload := strings.NewReader("{\n \"timezone\": \"<string>\",\n \"smart_charging\": \"<string>\",\n \"day_ahead_pricing_strategy\": \"<string>\",\n \"day_ahead_pricing_threshold\": 123,\n \"off_peak_start\": \"<string>\",\n \"off_peak_end\": \"<string>\",\n \"tariff_zone\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.plugchoice.com/api/v3/sites/{site}/smart-charging")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"timezone\": \"<string>\",\n \"smart_charging\": \"<string>\",\n \"day_ahead_pricing_strategy\": \"<string>\",\n \"day_ahead_pricing_threshold\": 123,\n \"off_peak_start\": \"<string>\",\n \"off_peak_end\": \"<string>\",\n \"tariff_zone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.plugchoice.com/api/v3/sites/{site}/smart-charging")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"timezone\": \"<string>\",\n \"smart_charging\": \"<string>\",\n \"day_ahead_pricing_strategy\": \"<string>\",\n \"day_ahead_pricing_threshold\": 123,\n \"off_peak_start\": \"<string>\",\n \"off_peak_end\": \"<string>\",\n \"tariff_zone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"timezone": "<string>",
"smart_charging": "<string>",
"day_ahead_pricing_strategy": "<string>",
"day_ahead_pricing_threshold": 123,
"day_ahead_pricing_smart_mode_price": 123,
"off_peak_start": "<string>",
"off_peak_end": "<string>",
"tariff_zone": "<string>",
"tariff_zone_options": [
{
"value": "<string>",
"label": "<string>"
}
]
}
}Power Management
Update Smart Charging
PUT
/
v3
/
sites
/
{site}
/
smart-charging
Update Smart Charging
curl --request PUT \
--url https://app.plugchoice.com/api/v3/sites/{site}/smart-charging \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"timezone": "<string>",
"smart_charging": "<string>",
"day_ahead_pricing_strategy": "<string>",
"day_ahead_pricing_threshold": 123,
"off_peak_start": "<string>",
"off_peak_end": "<string>",
"tariff_zone": "<string>"
}
'import requests
url = "https://app.plugchoice.com/api/v3/sites/{site}/smart-charging"
payload = {
"timezone": "<string>",
"smart_charging": "<string>",
"day_ahead_pricing_strategy": "<string>",
"day_ahead_pricing_threshold": 123,
"off_peak_start": "<string>",
"off_peak_end": "<string>",
"tariff_zone": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
timezone: '<string>',
smart_charging: '<string>',
day_ahead_pricing_strategy: '<string>',
day_ahead_pricing_threshold: 123,
off_peak_start: '<string>',
off_peak_end: '<string>',
tariff_zone: '<string>'
})
};
fetch('https://app.plugchoice.com/api/v3/sites/{site}/smart-charging', 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://app.plugchoice.com/api/v3/sites/{site}/smart-charging",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'timezone' => '<string>',
'smart_charging' => '<string>',
'day_ahead_pricing_strategy' => '<string>',
'day_ahead_pricing_threshold' => 123,
'off_peak_start' => '<string>',
'off_peak_end' => '<string>',
'tariff_zone' => '<string>'
]),
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://app.plugchoice.com/api/v3/sites/{site}/smart-charging"
payload := strings.NewReader("{\n \"timezone\": \"<string>\",\n \"smart_charging\": \"<string>\",\n \"day_ahead_pricing_strategy\": \"<string>\",\n \"day_ahead_pricing_threshold\": 123,\n \"off_peak_start\": \"<string>\",\n \"off_peak_end\": \"<string>\",\n \"tariff_zone\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.plugchoice.com/api/v3/sites/{site}/smart-charging")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"timezone\": \"<string>\",\n \"smart_charging\": \"<string>\",\n \"day_ahead_pricing_strategy\": \"<string>\",\n \"day_ahead_pricing_threshold\": 123,\n \"off_peak_start\": \"<string>\",\n \"off_peak_end\": \"<string>\",\n \"tariff_zone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.plugchoice.com/api/v3/sites/{site}/smart-charging")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"timezone\": \"<string>\",\n \"smart_charging\": \"<string>\",\n \"day_ahead_pricing_strategy\": \"<string>\",\n \"day_ahead_pricing_threshold\": 123,\n \"off_peak_start\": \"<string>\",\n \"off_peak_end\": \"<string>\",\n \"tariff_zone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"timezone": "<string>",
"smart_charging": "<string>",
"day_ahead_pricing_strategy": "<string>",
"day_ahead_pricing_threshold": 123,
"day_ahead_pricing_smart_mode_price": 123,
"off_peak_start": "<string>",
"off_peak_end": "<string>",
"tariff_zone": "<string>",
"tariff_zone_options": [
{
"value": "<string>",
"label": "<string>"
}
]
}
}Updates the smart charging settings for the specified location.
The UUID of the location.
A valid timezone identifier (e.g.,
Europe/Amsterdam).The smart charging mode. One of
disabled, off_peak, or day_ahead_pricing.The day-ahead pricing strategy. One of
automatic or manual.The day-ahead pricing threshold. Required when
day_ahead_pricing_strategy is manual and no threshold has been previously set.The off-peak start time in
HH:mm format.The off-peak end time in
HH:mm format.The tariff zone key for zonal day-ahead-pricing markets (e.g.,
GB_C). Must be a valid zone for the location’s country, or null.Response
The updated smart charging configuration.
Show data
Show data
The location’s configured timezone.
The smart charging mode. One of
disabled, off_peak, or day_ahead_pricing.The day-ahead pricing strategy. One of
automatic or manual.The day-ahead pricing threshold.
The calculated smart mode price for day-ahead pricing.
The off-peak start time in
HH:mm format.The off-peak end time in
HH:mm format.The selected tariff zone key for zonal day-ahead-pricing markets, or
null.⌘I