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

# List Lien Filing Import Batches

> Lists the bulk lien import batches visible to the caller, most
recently created first.



## OpenAPI

````yaml /api-reference/openapi.json get /lien_submissions/import/batches
openapi: 3.1.0
info:
  title: baselayer-api-service
  version: 0.1.0
servers:
  - url: https://api.baselayer.com/
security: []
paths:
  /lien_submissions/import/batches:
    get:
      tags:
        - Lien Filing
      summary: List Lien Filing Import Batches
      description: |-
        Lists the bulk lien import batches visible to the caller, most
        recently created first.
      operationId: list_lien_filing_import_batches_lien_submissions_import_batches_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            description: >-
              Maximum number of records to return in a single page. Must be
              between 1 and 1000.
            default: 10
            title: Limit
          description: >-
            Maximum number of records to return in a single page. Must be
            between 1 and 1000.
        - name: offset
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 0
              - type: 'null'
            description: >-
              Number of records to skip from the beginning. Use 0 for the first
              page. Cannot be used with cursor.
            title: Offset
          description: >-
            Number of records to skip from the beginning. Use 0 for the first
            page. Cannot be used with cursor.
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Opaque pagination cursor token that identifies the position in the
              result set. Use the cursor from the previous response to get the
              next page. Cannot be used with offset.
            title: Cursor
          description: >-
            Opaque pagination cursor token that identifies the position in the
            result set. Use the cursor from the previous response to get the
            next page. Cannot be used with offset.
      responses:
        '200':
          description: List of bulk lien import batches.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/v1.LienFilingImportBatchResponse'
                title: >-
                  Response List Lien Filing Import Batches Lien Submissions
                  Import Batches Get
          headers:
            X-Total-Count:
              description: Total number of records matching the query.
              schema:
                type: integer
            X-Total-Pages:
              description: Total number of pages available based on the current limit.
              schema:
                type: integer
            X-Next-Cursor:
              description: >-
                Cursor for the next page (only present when using the keyset
                pagination and if `has_more` is true.
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    v1.LienFilingImportBatchResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Import Batch ID
          description: The batch's id, used to poll status and fetch per-row results.
        name:
          type: string
          title: Name
          description: The name of the batch, taken from the uploaded file.
          examples:
            - q3-portfolio-liens.csv
        state:
          $ref: '#/components/schemas/TaskState'
          title: State
          description: Processing state of the batch.
          examples:
            - PENDING
        total_count:
          type: integer
          title: Total Count
          description: Rows read from the uploaded CSV, excluding blank lines.
          examples:
            - 100
        imported_count:
          type: integer
          title: Imported Count
          description: >-
            Rows that resolved against the public record and produced a newly
            imported filing.
          default: 0
          examples:
            - 80
        already_imported_count:
          type: integer
          title: Already Imported Count
          description: >-
            Rows naming a lien the organization had already imported; the
            existing filing is kept.
          default: 0
          examples:
            - 15
        not_found_count:
          type: integer
          title: Not Found Count
          description: >-
            Rows whose state and filing number matched nothing in the public
            record.
          default: 0
          examples:
            - 4
        invalid_row_count:
          type: integer
          title: Invalid Row Count
          description: >-
            Rows rejected before resolution (unparseable state, blank filing
            number, and the like).
          default: 0
          examples:
            - 1
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: >-
            Why the batch last failed, as a human-readable message. Set when the
            state is FAILED; a batch that failed once and succeeded on a resume
            can still carry the message from that attempt, so read it alongside
            the state rather than as a failure signal on its own.
          examples:
            - The uploaded CSV could not be read from storage.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the batch was accepted.
        completed_count:
          type: integer
          title: Completed Count
          description: >-
            Rows processed so far, whatever their outcome — the sum of the four
            outcome counts.
          readOnly: true
          examples:
            - 0
            - 50
        progress:
          type: number
          title: Progress
          description: Fraction of the uploaded rows processed so far, in [0, 1].
          readOnly: true
          examples:
            - 0
            - 0.5
            - 1
      type: object
      required:
        - id
        - name
        - state
        - total_count
        - created_at
        - completed_count
        - progress
      title: LienFilingImportBatchResponse (v1)
      description: >-
        A bulk lien import (ENG-6884) — returned when one is accepted, by the

        polling endpoint, and as the payload of its completion/failure webhooks.


        The four outcome counts partition the rows processed so far: every
        completed

        row is exactly one of imported / already imported / not found / invalid.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TaskState:
      enum:
        - PENDING
        - EXECUTING
        - COMPLETED
        - FAILED
        - CANCELLED
      title: TaskState
      type: string
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````