curl --request PUT \
--url https://api.leap.energy/beta/incentives/devices/saved/{device_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>"
}
'import requests
url = "https://api.leap.energy/beta/incentives/devices/saved/{device_id}"
payload = { "label": "<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({label: '<string>'})
};
fetch('https://api.leap.energy/beta/incentives/devices/saved/{device_id}', 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.leap.energy/beta/incentives/devices/saved/{device_id}",
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([
'label' => '<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://api.leap.energy/beta/incentives/devices/saved/{device_id}"
payload := strings.NewReader("{\n \"label\": \"<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://api.leap.energy/beta/incentives/devices/saved/{device_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leap.energy/beta/incentives/devices/saved/{device_id}")
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 \"label\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"device": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"device_category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"device_category": "<string>",
"manufacturer": "<string>",
"model_number": "<string>",
"model_name": "<string>",
"description": "<string>",
"subcategory": "<string>",
"is_active": true,
"date_available": "2023-12-25",
"date_discontinued": "2023-12-25",
"manufacture_year": 123,
"charger_level": "<string>",
"charging_power_kw": 123,
"connector_types": [
"<string>"
],
"seer2_rating": 123,
"eer2_rating": 123,
"hspf2_rating": 123,
"ceer_rating": 123,
"capacity_tons": 123,
"capacity_btu": 123,
"capacity_kw": 123,
"msrp": 123,
"is_energy_star_certified": true,
"is_ul_listed": true,
"is_networked": true,
"is_ocpp_compliant": true,
"battery_capacity_kwh": 123,
"battery_chemistry": "<string>",
"is_mobile_plugin_charger": true
},
"label": "<string>"
}{
"error": {
"message": "<string>",
"details": [
{
"error_code": "<string>",
"reason": "<string>"
}
]
}
}{
"error": {
"message": "<string>",
"details": [
{
"error_code": "<string>",
"reason": "<string>"
}
]
}
}{
"error": {
"message": "<string>",
"details": [
{
"error_code": "<string>",
"reason": "<string>"
}
]
}
}{
"error": {
"message": "<string>",
"details": [
{
"error_code": "<string>",
"reason": "<string>"
}
]
}
}{
"error": {
"message": "<string>",
"details": [
{
"error_code": "<string>",
"reason": "<string>"
}
]
}
}{
"error": {
"message": "<string>",
"details": [
{
"error_code": "<string>",
"reason": "<string>"
}
]
}
}Save a device
Add a catalog device to your saved list, or relabel one you already saved. Repeating the call updates the existing entry instead of adding a second one. A catalog device Leap has retired returns 404.
curl --request PUT \
--url https://api.leap.energy/beta/incentives/devices/saved/{device_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>"
}
'import requests
url = "https://api.leap.energy/beta/incentives/devices/saved/{device_id}"
payload = { "label": "<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({label: '<string>'})
};
fetch('https://api.leap.energy/beta/incentives/devices/saved/{device_id}', 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.leap.energy/beta/incentives/devices/saved/{device_id}",
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([
'label' => '<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://api.leap.energy/beta/incentives/devices/saved/{device_id}"
payload := strings.NewReader("{\n \"label\": \"<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://api.leap.energy/beta/incentives/devices/saved/{device_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leap.energy/beta/incentives/devices/saved/{device_id}")
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 \"label\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"device": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"device_category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"device_category": "<string>",
"manufacturer": "<string>",
"model_number": "<string>",
"model_name": "<string>",
"description": "<string>",
"subcategory": "<string>",
"is_active": true,
"date_available": "2023-12-25",
"date_discontinued": "2023-12-25",
"manufacture_year": 123,
"charger_level": "<string>",
"charging_power_kw": 123,
"connector_types": [
"<string>"
],
"seer2_rating": 123,
"eer2_rating": 123,
"hspf2_rating": 123,
"ceer_rating": 123,
"capacity_tons": 123,
"capacity_btu": 123,
"capacity_kw": 123,
"msrp": 123,
"is_energy_star_certified": true,
"is_ul_listed": true,
"is_networked": true,
"is_ocpp_compliant": true,
"battery_capacity_kwh": 123,
"battery_chemistry": "<string>",
"is_mobile_plugin_charger": true
},
"label": "<string>"
}{
"error": {
"message": "<string>",
"details": [
{
"error_code": "<string>",
"reason": "<string>"
}
]
}
}{
"error": {
"message": "<string>",
"details": [
{
"error_code": "<string>",
"reason": "<string>"
}
]
}
}{
"error": {
"message": "<string>",
"details": [
{
"error_code": "<string>",
"reason": "<string>"
}
]
}
}{
"error": {
"message": "<string>",
"details": [
{
"error_code": "<string>",
"reason": "<string>"
}
]
}
}{
"error": {
"message": "<string>",
"details": [
{
"error_code": "<string>",
"reason": "<string>"
}
]
}
}{
"error": {
"message": "<string>",
"details": [
{
"error_code": "<string>",
"reason": "<string>"
}
]
}
}Authorizations
Your Leap API key as a Bearer token. Send it in the Authorization header: Authorization: Bearer <api-key>.
Path Parameters
Catalog device UUID (as returned by the device search).
Body
Your own name for the device, to help you find it later. Omit the key to keep the current label, send null or a blank string to clear it, send text to set it. Maximum 256 characters.
256Response
The saved device after the upsert.
Catalog device UUID. This is the device_id you send on a lookup.
When you first saved this device.
One device in Leap's catalog. Send its id as the device_id on a lookup. Specification fields such as capacity_kw or seer2_rating are populated where Leap holds data for that device type, and are null otherwise.
Show child attributes
Show child attributes
Your own name for the device, when you set one. Null otherwise.
Was this page helpful?