Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl -X POST "https://api.incentives.leap.energy/alpha/batch-lookups" -H "x-api-key: leap_live_..." -H "Content-Type: application/json" -d '{"items":[{"reference_id":"deal-001","address":{"street_1":"123 Main St","city":"San Francisco","state_or_province_code":"CA","postal_code":"94102","country_code":"US"},"building_type":"RESIDENTIAL","device_ids":[1]}]}'import requests
url = "https://api.incentives.leap.energy/alpha/batch-lookups"
payload = { "items": [
{
"reference_id": "deal-12345",
"address": {
"street_1": "123 Main Street",
"city": "San Francisco",
"state_or_province_code": "CA",
"postal_code": "94102",
"country_code": "US",
"street_2": "Apt 4B"
},
"building_type": "RESIDENTIAL",
"device_ids": [1, 2],
"create_application": False,
"webhook_custom_fields": {}
}
] }
headers = {
"x-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-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{
reference_id: 'deal-12345',
address: {
street_1: '123 Main Street',
city: 'San Francisco',
state_or_province_code: 'CA',
postal_code: '94102',
country_code: 'US',
street_2: 'Apt 4B'
},
building_type: 'RESIDENTIAL',
device_ids: [1, 2],
create_application: false,
webhook_custom_fields: {}
}
]
})
};
fetch('https://api.incentives.leap.energy/alpha/batch-lookups', 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.incentives.leap.energy/alpha/batch-lookups",
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([
'items' => [
[
'reference_id' => 'deal-12345',
'address' => [
'street_1' => '123 Main Street',
'city' => 'San Francisco',
'state_or_province_code' => 'CA',
'postal_code' => '94102',
'country_code' => 'US',
'street_2' => 'Apt 4B'
],
'building_type' => 'RESIDENTIAL',
'device_ids' => [
1,
2
],
'create_application' => false,
'webhook_custom_fields' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-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.incentives.leap.energy/alpha/batch-lookups"
payload := strings.NewReader("{\n \"items\": [\n {\n \"reference_id\": \"deal-12345\",\n \"address\": {\n \"street_1\": \"123 Main Street\",\n \"city\": \"San Francisco\",\n \"state_or_province_code\": \"CA\",\n \"postal_code\": \"94102\",\n \"country_code\": \"US\",\n \"street_2\": \"Apt 4B\"\n },\n \"building_type\": \"RESIDENTIAL\",\n \"device_ids\": [\n 1,\n 2\n ],\n \"create_application\": false,\n \"webhook_custom_fields\": {}\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-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.incentives.leap.energy/alpha/batch-lookups")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"reference_id\": \"deal-12345\",\n \"address\": {\n \"street_1\": \"123 Main Street\",\n \"city\": \"San Francisco\",\n \"state_or_province_code\": \"CA\",\n \"postal_code\": \"94102\",\n \"country_code\": \"US\",\n \"street_2\": \"Apt 4B\"\n },\n \"building_type\": \"RESIDENTIAL\",\n \"device_ids\": [\n 1,\n 2\n ],\n \"create_application\": false,\n \"webhook_custom_fields\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.incentives.leap.energy/alpha/batch-lookups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"reference_id\": \"deal-12345\",\n \"address\": {\n \"street_1\": \"123 Main Street\",\n \"city\": \"San Francisco\",\n \"state_or_province_code\": \"CA\",\n \"postal_code\": \"94102\",\n \"country_code\": \"US\",\n \"street_2\": \"Apt 4B\"\n },\n \"building_type\": \"RESIDENTIAL\",\n \"device_ids\": [\n 1,\n 2\n ],\n \"create_application\": false,\n \"webhook_custom_fields\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"total_items": 123,
"created_at": "2023-11-07T05:31:56Z",
"report": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "processing",
"report_type": "bulk_lookup",
"total_sites": 123,
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
},
"message": "<string>"
}{
"error": "<string>",
"invalid_items": [
{
"index": 123,
"error": "<string>"
}
],
"duplicates": [
"<string>"
]
}Create a new batch job with multiple incentive lookup items. Items are queued and processed asynchronously by a background worker.
curl -X POST "https://api.incentives.leap.energy/alpha/batch-lookups" -H "x-api-key: leap_live_..." -H "Content-Type: application/json" -d '{"items":[{"reference_id":"deal-001","address":{"street_1":"123 Main St","city":"San Francisco","state_or_province_code":"CA","postal_code":"94102","country_code":"US"},"building_type":"RESIDENTIAL","device_ids":[1]}]}'import requests
url = "https://api.incentives.leap.energy/alpha/batch-lookups"
payload = { "items": [
{
"reference_id": "deal-12345",
"address": {
"street_1": "123 Main Street",
"city": "San Francisco",
"state_or_province_code": "CA",
"postal_code": "94102",
"country_code": "US",
"street_2": "Apt 4B"
},
"building_type": "RESIDENTIAL",
"device_ids": [1, 2],
"create_application": False,
"webhook_custom_fields": {}
}
] }
headers = {
"x-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-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{
reference_id: 'deal-12345',
address: {
street_1: '123 Main Street',
city: 'San Francisco',
state_or_province_code: 'CA',
postal_code: '94102',
country_code: 'US',
street_2: 'Apt 4B'
},
building_type: 'RESIDENTIAL',
device_ids: [1, 2],
create_application: false,
webhook_custom_fields: {}
}
]
})
};
fetch('https://api.incentives.leap.energy/alpha/batch-lookups', 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.incentives.leap.energy/alpha/batch-lookups",
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([
'items' => [
[
'reference_id' => 'deal-12345',
'address' => [
'street_1' => '123 Main Street',
'city' => 'San Francisco',
'state_or_province_code' => 'CA',
'postal_code' => '94102',
'country_code' => 'US',
'street_2' => 'Apt 4B'
],
'building_type' => 'RESIDENTIAL',
'device_ids' => [
1,
2
],
'create_application' => false,
'webhook_custom_fields' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-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.incentives.leap.energy/alpha/batch-lookups"
payload := strings.NewReader("{\n \"items\": [\n {\n \"reference_id\": \"deal-12345\",\n \"address\": {\n \"street_1\": \"123 Main Street\",\n \"city\": \"San Francisco\",\n \"state_or_province_code\": \"CA\",\n \"postal_code\": \"94102\",\n \"country_code\": \"US\",\n \"street_2\": \"Apt 4B\"\n },\n \"building_type\": \"RESIDENTIAL\",\n \"device_ids\": [\n 1,\n 2\n ],\n \"create_application\": false,\n \"webhook_custom_fields\": {}\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-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.incentives.leap.energy/alpha/batch-lookups")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"reference_id\": \"deal-12345\",\n \"address\": {\n \"street_1\": \"123 Main Street\",\n \"city\": \"San Francisco\",\n \"state_or_province_code\": \"CA\",\n \"postal_code\": \"94102\",\n \"country_code\": \"US\",\n \"street_2\": \"Apt 4B\"\n },\n \"building_type\": \"RESIDENTIAL\",\n \"device_ids\": [\n 1,\n 2\n ],\n \"create_application\": false,\n \"webhook_custom_fields\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.incentives.leap.energy/alpha/batch-lookups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"reference_id\": \"deal-12345\",\n \"address\": {\n \"street_1\": \"123 Main Street\",\n \"city\": \"San Francisco\",\n \"state_or_province_code\": \"CA\",\n \"postal_code\": \"94102\",\n \"country_code\": \"US\",\n \"street_2\": \"Apt 4B\"\n },\n \"building_type\": \"RESIDENTIAL\",\n \"device_ids\": [\n 1,\n 2\n ],\n \"create_application\": false,\n \"webhook_custom_fields\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"total_items": 123,
"created_at": "2023-11-07T05:31:56Z",
"report": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "processing",
"report_type": "bulk_lookup",
"total_sites": 123,
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
},
"message": "<string>"
}{
"error": "<string>",
"invalid_items": [
{
"index": 123,
"error": "<string>"
}
],
"duplicates": [
"<string>"
]
}result field has the same shape as a single POST /incentives response — including the processing_summary and per-program processing_enabled fields.
webhook_custom_fields on each item when your organization has a webhook URL configured; the backend merges them into the webhook payload for each completed lookup.GET /batch-lookups/{job_id} for job status and use GET /batch-lookups/{job_id}/items to retrieve results.API key for authentication. Include your Leap API key in the x-api-key header: x-api-key: leap_live_...
1 - 10000 elementsShow child attributes
Was this page helpful?