Skip to content

[FEAT]: Missing Batch Endpoint for Multi-Form Filing #156

@Acuspeedster

Description

@Acuspeedster

name: 🚀 Feature Request
about: Suggest an idea or a new capability for FireForm.
title: "[FEAT]: Add batch endpoint for multi-template form filing"
labels: enhancement
assignees: ''

📝 Description

There is currently no API endpoint that accepts:

  • One transcript
  • A list of template IDs

and returns filled PDFs for all requested agencies in a single request.

Callers must:

  • Invoke POST /forms/fill N separate times
  • Handle partial failures manually
  • Aggregate responses client-side
  • Reconcile inconsistencies across requests

This leaks orchestration complexity to the client and prevents treating multi-agency filing as a single logical operation.


💡 Rationale

Multi-agency filing is not an edge case — it is the primary operational use case.

The system should:

  • Provide atomic orchestration
  • Preserve partial successes
  • Expose unified batch state
  • Avoid redundant extraction (see Issue 1)

A naive batch endpoint that simply loops over the current fill implementation would multiply inefficiencies.


🛠️ Proposed Solution

Introduce:

  • POST /forms/fill/batch

Request:

  • input_text
  • template_ids: list[str]

Response:

  • Per-template output paths
  • Per-template success/failure
  • batch_id for status lookup

Add:

  • GET /forms/batches/{id}

Requirements:

  • Partial success allowed
  • Batch never aborts fully due to one template failure
  • Batch state persisted

✅ Acceptance Criteria

  • Single transcript accepted
  • Multiple templates processed
  • Partial failures preserved
  • Batch status persisted
  • No redundant transcript extraction

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions