Skip to main content
GET
/
batch-lookups
/
{job_id}
/
items
Get Batch Job Items
curl --request GET \
  --url https://api.incentives.leap.energy/alpha/batch-lookups/{job_id}/items \
  --header 'x-api-key: <api-key>'
import requests

url = "https://api.incentives.leap.energy/alpha/batch-lookups/{job_id}/items"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://api.incentives.leap.energy/alpha/batch-lookups/{job_id}/items', 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/{job_id}/items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)

func main() {

url := "https://api.incentives.leap.energy/alpha/batch-lookups/{job_id}/items"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.incentives.leap.energy/alpha/batch-lookups/{job_id}/items")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.incentives.leap.energy/alpha/batch-lookups/{job_id}/items")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "items": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "reference_id": "<string>",
      "address": {
        "street_1": "123 Main Street",
        "city": "San Francisco",
        "state_or_province_code": "CA",
        "postal_code": "94102",
        "country_code": "US",
        "street_2": "Apt 4B"
      },
      "device_ids": [
        123
      ],
      "result": {},
      "error_message": "<string>",
      "retry_count": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "processed_at": "2023-11-07T05:31:56Z"
    }
  ],
  "total": 123,
  "limit": 123,
  "offset": 123
}

Overview

List items (lookups) for a batch job. Filter by status (pending, processing, completed, failed) and use limit/offset for pagination. Completed items include the full incentive result; failed items include error_message and retry_count.

Authorizations

x-api-key
string
header
required

API key for authentication. Include your Leap API key in the x-api-key header: x-api-key: leap_live_...

Path Parameters

job_id
string<uuid>
required

Query Parameters

status
enum<string>
Available options:
pending,
processing,
completed,
failed
limit
integer
default:50
Required range: 1 <= x <= 500
offset
integer
default:0
Required range: x >= 0

Response

List of queue items

items
object[]
total
integer
limit
integer
offset
integer