> ## Documentation Index
> Fetch the complete documentation index at: https://docs.incentives.leap.energy/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Batch Job Status

> Get detailed status and progress for a specific batch job, including item counts and timestamps.

## Overview

Retrieve job status, processed/failed counts, and optional full item details. Use `include_items=true` to include item details in the response. Poll this endpoint to track completion.


## OpenAPI

````yaml GET /batch-lookups/{job_id}
openapi: 3.0.3
info:
  title: Leap Energy API
  description: >-
    The Leap Energy API provides a unified interface for managing rebate
    incentives and applications.


    ## Incentives API

    Search for and calculate incentive amounts across multiple utility programs.
    Given a customer

    address and building type, the API identifies applicable utility programs
    and calculates potential

    incentive amounts for various device and tier combinations. When your
    organization has a webhook URL

    configured (Webhook Config API), each successful lookup triggers a POST to
    your URL with the response

    and optional custom fields (`webhook_custom_fields`).


    ## Applications API

    Manage rebate applications on behalf of customers. Applications represent a
    customer's request

    for a rebate under a specific utility program, including customer
    information, device details,

    and application metadata.
  version: 2.0.0
  contact:
    name: Leap Energy
    url: https://leap.energy
servers:
  - url: https://api.incentives.leap.energy/alpha
    description: Production API
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /batch-lookups/{job_id}:
    get:
      summary: Get Batch Job Status
      description: Get detailed status and progress for a specific batch job.
      operationId: getBatchJob
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: include_items
          in: query
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Job details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchJob'
        '401':
          description: Unauthorized
        '404':
          description: Job not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchError'
components:
  schemas:
    BatchJob:
      type: object
      properties:
        id:
          type: string
          format: uuid
        organization_id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
            - cancelled
        total_items:
          type: integer
        processed_items:
          type: integer
        failed_items:
          type: integer
        report_id:
          type: string
          format: uuid
          nullable: true
        created_at:
          type: string
          format: date-time
        started_at:
          type: string
          format: date-time
          nullable: true
        completed_at:
          type: string
          format: date-time
          nullable: true
        item_counts:
          type: object
          properties:
            pending:
              type: integer
            processing:
              type: integer
            completed:
              type: integer
            failed:
              type: integer
    BatchError:
      type: object
      properties:
        error:
          type: string
          description: Error message
        invalid_items:
          type: array
          items:
            type: object
            properties:
              index:
                type: integer
              error:
                type: string
          description: Details about invalid items (when creating batch)
        duplicates:
          type: array
          items:
            type: string
          description: Duplicate reference_ids found (when creating batch)
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >
        API key for authentication. Include your Leap API key in the `x-api-key`
        header: `x-api-key: leap_live_...`
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Clerk JWT token for portal authentication

````