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

# Retry a file import

> In-place retry: resumes an unfinished main pass from `processed_offset` and re-runs the queued row errors. No child import is created.



## OpenAPI

````yaml /openapi.json post /file_imports/{id}/retry
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}/retry:
    post:
      summary: Retry a file import
      description: >-
        In-place retry: resumes an unfinished main pass from `processed_offset`
        and re-runs the queued row errors. No child import is created.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '202':
          description: Retry accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileImport'
        '401':
          description: Unauthorized
        '404':
          description: File import not found
        '409':
          description: File import is not in a retryable status
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
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

````