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

# Retrieve a file import

> Retrieve a single file import by its unique ID.



## OpenAPI

````yaml /openapi.json get /file_imports/{id}
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:
  /file_imports/{id}:
    get:
      summary: Retrieve a file import
      description: Retrieve a single file import by its unique ID.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: outcome
          schema:
            type: string
          description: Filter the embedded row errors by outcome
        - in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 50
          description: Page size for the embedded row errors
        - in: query
          name: offset
          schema:
            type: integer
            default: 0
          description: Offset for the embedded row errors
      responses:
        '200':
          description: >-
            The file import, plus an offset-paginated page of its row errors.
            Successful rows are not listed here — they are real records.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/FileImport'
                  - type: object
                    properties:
                      errors:
                        type: object
                        properties:
                          data:
                            type: array
                            items:
                              type: object
                          has_more:
                            type: boolean
                          offset:
                            type: integer
        '401':
          description: Unauthorized
        '404':
          description: File import not found
components:
  schemas:
    FileImport:
      type: object
      description: >-
        A file import (CSV/NACHA upload or bulk API submission) and its
        ingestion lifecycle. Aggregate fields (record_count, total_credits,
        total_debits, net_amount, date_range_start, date_range_end, currency)
        are merged in only on the stream-scoped index GET
        /data_streams/{key}/file_imports, and are trustworthy once status is
        `completed`.
      properties:
        id:
          type: integer
        status:
          type: string
          enum:
            - pending
            - processing
            - replicating
            - completed
            - failed
            - cancelled
        source:
          type: string
          nullable: true
          description: Origin of the import (e.g. `csv`, `nacha`, `bulk_api`)
        filename:
          type: string
          nullable: true
        total_items:
          type: integer
        processed_items:
          type: integer
        successful_items:
          type: integer
        failed_items:
          type: integer
        skipped_items:
          type: integer
          description: >-
            Records skipped due to `on_conflict: skip` matching an existing
            `external_id`
        expected_records_count:
          type: integer
          nullable: true
        progress:
          type: integer
          description: processed_items / total_items as a percentage (0-100)
        parsing:
          type: boolean
          description: True until rows start landing; file totals are unknown while parsing
        decimal_places:
          type: integer
          description: Number of decimal places (2 for USD)
        stuck:
          type: boolean
          description: Currently processing with no heartbeat for >5 minutes
        on_conflict:
          type: string
          nullable: true
        error_message:
          type: string
          nullable: true
        error_details:
          type: object
          nullable: true
        data_stream_ids:
          type: array
          items:
            type: integer
        created_at:
          type: string
          format: date-time
        started_at:
          type: string
          format: date-time
          nullable: true
        records_written_at:
          type: string
          format: date-time
          nullable: true
        completed_at:
          type: string
          format: date-time
          nullable: true
        last_progress_at:
          type: string
          format: date-time
          nullable: true
        cancellation_requested_at:
          type: string
          format: date-time
          nullable: true
        url:
          type: string
          description: e.g. /v1/file_imports/123
        records_url:
          type: string
          description: e.g. /v1/file_imports/123/records
        record_count:
          type: integer
          description: Aggregate; stream-scoped index only
        total_credits:
          type: integer
          description: Aggregate, in cents; stream-scoped index only
        total_debits:
          type: integer
          description: Aggregate, in cents; stream-scoped index only
        net_amount:
          type: integer
          description: 'Aggregate: credits minus debits, in cents; stream-scoped index only'
        date_range_start:
          type: string
          format: date
          nullable: true
          description: Aggregate; stream-scoped index only
        date_range_end:
          type: string
          format: date
          nullable: true
          description: Aggregate; stream-scoped index only
        currency:
          type: string
          nullable: true
          description: Aggregate; stream-scoped index only
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````