get HVAC estimated savings (monthly or annual)
curl --request POST \
--url https://api.example.com/v1/homes/{id}/hvac/estimate_savings \
--header 'Content-Type: application/json' \
--header 'x-ws-api-key: <api-key>' \
--data '
{
"type": "monthly",
"targetTemp": 72,
"targetCoolSetpoint": 73,
"targetHeatSetpoint": 71,
"minTemp": 70,
"maxTemp": 74,
"mode": "AUTO",
"start": {
"month": 7
},
"days": 1
}
'import requests
url = "https://api.example.com/v1/homes/{id}/hvac/estimate_savings"
payload = {
"type": "monthly",
"targetTemp": 72,
"targetCoolSetpoint": 73,
"targetHeatSetpoint": 71,
"minTemp": 70,
"maxTemp": 74,
"mode": "AUTO",
"start": { "month": 7 },
"days": 1
}
headers = {
"x-ws-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-ws-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'monthly',
targetTemp: 72,
targetCoolSetpoint: 73,
targetHeatSetpoint: 71,
minTemp: 70,
maxTemp: 74,
mode: 'AUTO',
start: {month: 7},
days: 1
})
};
fetch('https://api.example.com/v1/homes/{id}/hvac/estimate_savings', 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.example.com/v1/homes/{id}/hvac/estimate_savings",
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([
'type' => 'monthly',
'targetTemp' => 72,
'targetCoolSetpoint' => 73,
'targetHeatSetpoint' => 71,
'minTemp' => 70,
'maxTemp' => 74,
'mode' => 'AUTO',
'start' => [
'month' => 7
],
'days' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-ws-api-key: <api-key>"
],
]);
$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.example.com/v1/homes/{id}/hvac/estimate_savings"
payload := strings.NewReader("{\n \"type\": \"monthly\",\n \"targetTemp\": 72,\n \"targetCoolSetpoint\": 73,\n \"targetHeatSetpoint\": 71,\n \"minTemp\": 70,\n \"maxTemp\": 74,\n \"mode\": \"AUTO\",\n \"start\": {\n \"month\": 7\n },\n \"days\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-ws-api-key", "<api-key>")
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://api.example.com/v1/homes/{id}/hvac/estimate_savings")
.header("x-ws-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"monthly\",\n \"targetTemp\": 72,\n \"targetCoolSetpoint\": 73,\n \"targetHeatSetpoint\": 71,\n \"minTemp\": 70,\n \"maxTemp\": 74,\n \"mode\": \"AUTO\",\n \"start\": {\n \"month\": 7\n },\n \"days\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/homes/{id}/hvac/estimate_savings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-ws-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"monthly\",\n \"targetTemp\": 72,\n \"targetCoolSetpoint\": 73,\n \"targetHeatSetpoint\": 71,\n \"minTemp\": 70,\n \"maxTemp\": 74,\n \"mode\": \"AUTO\",\n \"start\": {\n \"month\": 7\n },\n \"days\": 1\n}"
response = http.request(request)
puts response.read_bodyhomes
get HVAC estimated savings (monthly or annual)
POST
/
v1
/
homes
/
{id}
/
hvac
/
estimate_savings
get HVAC estimated savings (monthly or annual)
curl --request POST \
--url https://api.example.com/v1/homes/{id}/hvac/estimate_savings \
--header 'Content-Type: application/json' \
--header 'x-ws-api-key: <api-key>' \
--data '
{
"type": "monthly",
"targetTemp": 72,
"targetCoolSetpoint": 73,
"targetHeatSetpoint": 71,
"minTemp": 70,
"maxTemp": 74,
"mode": "AUTO",
"start": {
"month": 7
},
"days": 1
}
'import requests
url = "https://api.example.com/v1/homes/{id}/hvac/estimate_savings"
payload = {
"type": "monthly",
"targetTemp": 72,
"targetCoolSetpoint": 73,
"targetHeatSetpoint": 71,
"minTemp": 70,
"maxTemp": 74,
"mode": "AUTO",
"start": { "month": 7 },
"days": 1
}
headers = {
"x-ws-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-ws-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'monthly',
targetTemp: 72,
targetCoolSetpoint: 73,
targetHeatSetpoint: 71,
minTemp: 70,
maxTemp: 74,
mode: 'AUTO',
start: {month: 7},
days: 1
})
};
fetch('https://api.example.com/v1/homes/{id}/hvac/estimate_savings', 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.example.com/v1/homes/{id}/hvac/estimate_savings",
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([
'type' => 'monthly',
'targetTemp' => 72,
'targetCoolSetpoint' => 73,
'targetHeatSetpoint' => 71,
'minTemp' => 70,
'maxTemp' => 74,
'mode' => 'AUTO',
'start' => [
'month' => 7
],
'days' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-ws-api-key: <api-key>"
],
]);
$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.example.com/v1/homes/{id}/hvac/estimate_savings"
payload := strings.NewReader("{\n \"type\": \"monthly\",\n \"targetTemp\": 72,\n \"targetCoolSetpoint\": 73,\n \"targetHeatSetpoint\": 71,\n \"minTemp\": 70,\n \"maxTemp\": 74,\n \"mode\": \"AUTO\",\n \"start\": {\n \"month\": 7\n },\n \"days\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-ws-api-key", "<api-key>")
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://api.example.com/v1/homes/{id}/hvac/estimate_savings")
.header("x-ws-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"monthly\",\n \"targetTemp\": 72,\n \"targetCoolSetpoint\": 73,\n \"targetHeatSetpoint\": 71,\n \"minTemp\": 70,\n \"maxTemp\": 74,\n \"mode\": \"AUTO\",\n \"start\": {\n \"month\": 7\n },\n \"days\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/homes/{id}/hvac/estimate_savings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-ws-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"monthly\",\n \"targetTemp\": 72,\n \"targetCoolSetpoint\": 73,\n \"targetHeatSetpoint\": 71,\n \"minTemp\": 70,\n \"maxTemp\": 74,\n \"mode\": \"AUTO\",\n \"start\": {\n \"month\": 7\n },\n \"days\": 1\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
x-ws-api-keyx-ws-api-key
WattShift API key
Headers
WattShift API Key
Path Parameters
Body
application/json
Available options:
monthly, annual Show child attributes
Show child attributes
- Option 1
- Option 2
Show child attributes
Show child attributes
Available options:
OFF, HEAT, COOL, AUTO Show child attributes
Show child attributes
Optional calendar months to include, using 1-12 month numbers. Omit or pass null for all months.
Calendar month number, 1-12 where 1 = January and 12 = December.
Required range:
1 < x < 12Response
200
Returns monthly or annual estimated savings based on type parameter
⌘I
