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

# Get Lien Filing Import Batch

> Gets the status and per-outcome counts of a bulk lien import.



## OpenAPI

````yaml /api-reference/openapi.json get /lien_submissions/import/batches/{batch_id}
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/{batch_id}:
    get:
      tags:
        - Lien Filing
      summary: Get Lien Filing Import Batch
      description: Gets the status and per-outcome counts of a bulk lien import.
      operationId: >-
        get_lien_filing_import_batch_lien_submissions_import_batches__batch_id__get
      parameters:
        - name: batch_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Import Batch ID
            description: The unique identifier of the bulk lien import batch.
            examples:
              - 2a5c08dc-b9c1-43e2-ab85-a90180ad8c42
          description: The unique identifier of the bulk lien import batch.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1.LienFilingImportBatchResponse'
        '404':
          description: The import batch does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
                title: ResourceNotFound
                description: Could not locate the resource for the given URI.
                examples:
                  - code: 1
                    message: Could not locate the resource for the given URI.
                    metadata: {}
        '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.
    APIError:
      properties:
        code:
          type: integer
          title: Code
        message:
          type: string
          title: Message
        uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Uri
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
      type: object
      required:
        - code
        - message
      title: APIError
      description: >-
        APIError is a Pydantic model for standardizing error responses from the
        API.


        This class is used internally by APIException for JSON serialization.

        Users should typically work with APIException directly in exception
        catalogs.
    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

````