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

# List import batches

> Returns a paginated list of import batches for a data stream.



## OpenAPI

````yaml /openapi.json get /data_streams/{key}/import_batches
openapi: 3.1.0
info:
  title: End Close API
  description: REST API is used to interact with the End Close platform.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.endclose.com/v1
security:
  - ApiKeyAuth: []
paths:
  /data_streams/{key}/import_batches:
    get:
      summary: List import batches
      description: Returns a paginated list of import batches for a data stream.
      parameters:
        - in: path
          name: key
          required: true
          schema:
            type: string
          description: The immutable data stream key
        - in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 100
        - in: query
          name: offset
          schema:
            type: integer
            default: 0
          description: Pagination offset
      responses:
        '200':
          description: Paginated list of import batches
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ImportBatch'
                  has_more:
                    type: boolean
                  offset:
                    type: number
        '401':
          description: Unauthorized
        '404':
          description: Data stream not found
components:
  schemas:
    ImportBatch:
      type: object
      properties:
        id:
          type: integer
        data_stream_key:
          type: string
          description: Key of the data stream this import batch belongs to
        source:
          type: string
          enum:
            - csv_upload
            - nacha_upload
            - bulk_api
          description: How the records were imported
        filename:
          type: string
          nullable: true
          description: Original filename for CSV uploads
        record_count:
          type: integer
          description: Number of records in this batch
        total_credits:
          type: integer
          description: Sum of credit amounts in cents
        total_debits:
          type: integer
          description: Sum of debit amounts in cents
        net_amount:
          type: integer
          description: Net amount in cents (credits minus debits)
        decimal_places:
          type: integer
          description: Number of decimal places (2 for USD)
          default: 2
        date_range_start:
          type: string
          format: date
          nullable: true
          description: Earliest record date in the batch
        date_range_end:
          type: string
          format: date
          nullable: true
          description: Latest record date in the batch
        created_at:
          type: string
          format: date-time
        records_url:
          type: string
          description: URL to fetch records belonging to this batch
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````