Update Group
curl --request PUT \
--url https://app.plugchoice.com/api/v3/sites/{site}/groups/{siteGroup} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"total_amps": 123,
"net_type": "<string>",
"method": "<string>",
"meter_uuid": "<string>",
"remove_meter": true,
"solar_additional_amps": 123,
"solar_always_charge": true,
"solar_always_charge_amps": 123,
"smart_charging_charge_on_solar_export": true,
"peak_shaving_enabled": true,
"peak_shaving_threshold": 123
}
'import requests
url = "https://app.plugchoice.com/api/v3/sites/{site}/groups/{siteGroup}"
payload = {
"total_amps": 123,
"net_type": "<string>",
"method": "<string>",
"meter_uuid": "<string>",
"remove_meter": True,
"solar_additional_amps": 123,
"solar_always_charge": True,
"solar_always_charge_amps": 123,
"smart_charging_charge_on_solar_export": True,
"peak_shaving_enabled": True,
"peak_shaving_threshold": 123
}
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({
total_amps: 123,
net_type: '<string>',
method: '<string>',
meter_uuid: '<string>',
remove_meter: true,
solar_additional_amps: 123,
solar_always_charge: true,
solar_always_charge_amps: 123,
smart_charging_charge_on_solar_export: true,
peak_shaving_enabled: true,
peak_shaving_threshold: 123
})
};
fetch('https://app.plugchoice.com/api/v3/sites/{site}/groups/{siteGroup}', 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}/groups/{siteGroup}",
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([
'total_amps' => 123,
'net_type' => '<string>',
'method' => '<string>',
'meter_uuid' => '<string>',
'remove_meter' => true,
'solar_additional_amps' => 123,
'solar_always_charge' => true,
'solar_always_charge_amps' => 123,
'smart_charging_charge_on_solar_export' => true,
'peak_shaving_enabled' => true,
'peak_shaving_threshold' => 123
]),
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}/groups/{siteGroup}"
payload := strings.NewReader("{\n \"total_amps\": 123,\n \"net_type\": \"<string>\",\n \"method\": \"<string>\",\n \"meter_uuid\": \"<string>\",\n \"remove_meter\": true,\n \"solar_additional_amps\": 123,\n \"solar_always_charge\": true,\n \"solar_always_charge_amps\": 123,\n \"smart_charging_charge_on_solar_export\": true,\n \"peak_shaving_enabled\": true,\n \"peak_shaving_threshold\": 123\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}/groups/{siteGroup}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"total_amps\": 123,\n \"net_type\": \"<string>\",\n \"method\": \"<string>\",\n \"meter_uuid\": \"<string>\",\n \"remove_meter\": true,\n \"solar_additional_amps\": 123,\n \"solar_always_charge\": true,\n \"solar_always_charge_amps\": 123,\n \"smart_charging_charge_on_solar_export\": true,\n \"peak_shaving_enabled\": true,\n \"peak_shaving_threshold\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.plugchoice.com/api/v3/sites/{site}/groups/{siteGroup}")
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 \"total_amps\": 123,\n \"net_type\": \"<string>\",\n \"method\": \"<string>\",\n \"meter_uuid\": \"<string>\",\n \"remove_meter\": true,\n \"solar_additional_amps\": 123,\n \"solar_always_charge\": true,\n \"solar_always_charge_amps\": 123,\n \"smart_charging_charge_on_solar_export\": true,\n \"peak_shaving_enabled\": true,\n \"peak_shaving_threshold\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"site_id": 123,
"group_id": 123,
"meter_id": 123,
"total_amps": 123,
"net_type": "<string>",
"method": "<string>",
"solar_additional_amps": 123,
"solar_always_charge": true,
"solar_always_charge_amps": 123,
"smart_charging_charge_on_solar_export": true,
"peak_shaving_enabled": true,
"peak_shaving_threshold": 123,
"created_at": "<string>",
"updated_at": "<string>"
}Groups
Update Group
PUT
/
v3
/
sites
/
{site}
/
groups
/
{siteGroup}
Update Group
curl --request PUT \
--url https://app.plugchoice.com/api/v3/sites/{site}/groups/{siteGroup} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"total_amps": 123,
"net_type": "<string>",
"method": "<string>",
"meter_uuid": "<string>",
"remove_meter": true,
"solar_additional_amps": 123,
"solar_always_charge": true,
"solar_always_charge_amps": 123,
"smart_charging_charge_on_solar_export": true,
"peak_shaving_enabled": true,
"peak_shaving_threshold": 123
}
'import requests
url = "https://app.plugchoice.com/api/v3/sites/{site}/groups/{siteGroup}"
payload = {
"total_amps": 123,
"net_type": "<string>",
"method": "<string>",
"meter_uuid": "<string>",
"remove_meter": True,
"solar_additional_amps": 123,
"solar_always_charge": True,
"solar_always_charge_amps": 123,
"smart_charging_charge_on_solar_export": True,
"peak_shaving_enabled": True,
"peak_shaving_threshold": 123
}
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({
total_amps: 123,
net_type: '<string>',
method: '<string>',
meter_uuid: '<string>',
remove_meter: true,
solar_additional_amps: 123,
solar_always_charge: true,
solar_always_charge_amps: 123,
smart_charging_charge_on_solar_export: true,
peak_shaving_enabled: true,
peak_shaving_threshold: 123
})
};
fetch('https://app.plugchoice.com/api/v3/sites/{site}/groups/{siteGroup}', 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}/groups/{siteGroup}",
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([
'total_amps' => 123,
'net_type' => '<string>',
'method' => '<string>',
'meter_uuid' => '<string>',
'remove_meter' => true,
'solar_additional_amps' => 123,
'solar_always_charge' => true,
'solar_always_charge_amps' => 123,
'smart_charging_charge_on_solar_export' => true,
'peak_shaving_enabled' => true,
'peak_shaving_threshold' => 123
]),
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}/groups/{siteGroup}"
payload := strings.NewReader("{\n \"total_amps\": 123,\n \"net_type\": \"<string>\",\n \"method\": \"<string>\",\n \"meter_uuid\": \"<string>\",\n \"remove_meter\": true,\n \"solar_additional_amps\": 123,\n \"solar_always_charge\": true,\n \"solar_always_charge_amps\": 123,\n \"smart_charging_charge_on_solar_export\": true,\n \"peak_shaving_enabled\": true,\n \"peak_shaving_threshold\": 123\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}/groups/{siteGroup}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"total_amps\": 123,\n \"net_type\": \"<string>\",\n \"method\": \"<string>\",\n \"meter_uuid\": \"<string>\",\n \"remove_meter\": true,\n \"solar_additional_amps\": 123,\n \"solar_always_charge\": true,\n \"solar_always_charge_amps\": 123,\n \"smart_charging_charge_on_solar_export\": true,\n \"peak_shaving_enabled\": true,\n \"peak_shaving_threshold\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.plugchoice.com/api/v3/sites/{site}/groups/{siteGroup}")
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 \"total_amps\": 123,\n \"net_type\": \"<string>\",\n \"method\": \"<string>\",\n \"meter_uuid\": \"<string>\",\n \"remove_meter\": true,\n \"solar_additional_amps\": 123,\n \"solar_always_charge\": true,\n \"solar_always_charge_amps\": 123,\n \"smart_charging_charge_on_solar_export\": true,\n \"peak_shaving_enabled\": true,\n \"peak_shaving_threshold\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"site_id": 123,
"group_id": 123,
"meter_id": 123,
"total_amps": 123,
"net_type": "<string>",
"method": "<string>",
"solar_additional_amps": 123,
"solar_always_charge": true,
"solar_always_charge_amps": 123,
"smart_charging_charge_on_solar_export": true,
"peak_shaving_enabled": true,
"peak_shaving_threshold": 123,
"created_at": "<string>",
"updated_at": "<string>"
}Updates an existing load balancing group or subgroup. All fields are optional; only provided fields will be updated.
string
required
The UUID of the location.
integer
required
The ID of the group or subgroup.
integer
The total available amperage for the group. Minimum value is
1.string
The electrical network type. One of
TN, TT, or IT.string
The load balancing method. One of
boost or solar.string
The UUID of a meter to attach to the group.
boolean
Set to
true to remove the currently attached meter.integer
Additional amperage from solar. Minimum value is
0.boolean
Whether to always allow charging when solar is available.
integer
The minimum amperage to allocate when solar always charge is enabled. Minimum value is
0.boolean
Whether to enable charging when solar export is detected.
boolean
Whether peak shaving is enabled for this group.
integer
The peak shaving threshold in amps. Minimum value is
0.Response
Returns the updated group object.integer
The numeric ID of the group.
integer
The numeric ID of the location this group belongs to.
integer
The ID of the parent group, or
null if this is a root group.integer
The ID of the attached meter, or
null.integer
The total available amperage for the group.
string
The electrical network type. One of
TN, TT, or IT. May be null.string
The load balancing method. One of
boost or solar.integer
Additional amperage from solar.
boolean
Whether to always allow charging when solar is available.
integer
Minimum amperage when solar always charge is enabled.
boolean
Whether to charge on solar export.
boolean
Whether peak shaving is enabled for this group.
integer
The peak shaving threshold in amps.
string
ISO 8601 timestamp of when the group was created.
string
ISO 8601 timestamp of when the group was last updated.
⌘I