> ## 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.

# Cancel Batch Job

> Cancel a pending or processing batch job. Only pending or processing jobs can be cancelled.

## Overview

Cancel a batch job to stop processing. Pending items are marked as failed with "Job cancelled"; items already in progress are allowed to complete. Cancelled jobs cannot be resumed.


## OpenAPI

````yaml POST /batch-lookups/{job_id}/cancel
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}/cancel:
    post:
      summary: Cancel Batch Job
      description: Cancel a pending or processing batch job.
      operationId: cancelBatchJob
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Job cancelled successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelJobResponse'
        '400':
          description: Cannot cancel job
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchError'
        '401':
          description: Unauthorized
        '404':
          description: Job not found
components:
  schemas:
    CancelJobResponse:
      type: object
      properties:
        message:
          type: string
          example: Job cancelled successfully
        job_id:
          type: string
          format: uuid
    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

````