Merged in feature/support-more-types (pull request #219)

support new types for import

* tests pass

* missing file

* bug fixes
This commit is contained in:
Jay Brown
2026-03-31 17:40:42 +00:00
parent 8e9889accc
commit b71a28d3c0
144 changed files with 28352 additions and 91 deletions
@@ -6,7 +6,7 @@ For API reference details, see [API Documentation - Batch Document Operations](.
## 1. Upload a Batch
Submit a ZIP archive containing PDF documents for batch processing.
Submit a ZIP archive containing documents for batch processing. Accepted file types: PDF, TIFF, JPEG, PNG, BMP, DOCX, XLSX, PPTX, TXT, EML.
```
POST /client/AAA/document/batch
@@ -86,7 +86,7 @@ Once ZIP extraction finishes, `status` changes to `completed` and all files appe
"document_id": "...0003"
},
{
"filename": "spreadsheet.xlsx",
"filename": "macro_report.xlsm",
"outcome": "invalid_type",
"document_id": null
}
@@ -126,7 +126,7 @@ When all documents have reached a terminal outcome, the batch is fully processed
"clean_fail_reason": "invalid PDF structure: missing xref table"
},
{
"filename": "spreadsheet.xlsx",
"filename": "macro_report.xlsm",
"outcome": "invalid_type",
"document_id": null
}
@@ -142,9 +142,9 @@ Each terminal outcome indicates a specific action for the caller:
- **`duplicate`** -- The file hash matches a document already in the system for this client. Use the returned `document_id` to reference the existing document. No resubmission needed.
- **`clean_failed`** -- The PDF was corrupt or failed validation. Check `clean_fail_reason` for the specific failure detail. Fix the source file and resubmit.
- **`clean_failed`** -- The document was corrupt or failed validation. Check `clean_fail_reason` for the specific failure detail. Possible reasons include `invalid_mimetype`, `password_protected`, `contains_macros`, `empty_content`, `binary_content`, `unsupported_encoding`, `contains_attachments`, dimension/DPI issues, and more. Fix the source file and resubmit.
- **`invalid_type`** -- The file is not a PDF. Only PDF files are accepted.
- **`invalid_type`** -- The file extension is not in the accepted list. Accepted extensions: `.pdf`, `.tiff`, `.tif`, `.jpeg`, `.jpg`, `.png`, `.bmp`, `.docx`, `.xlsx`, `.pptx`, `.txt`, `.eml`. Macro-enabled formats (`.docm`, `.xlsm`, `.pptm`) are not accepted.
- **`failed_open`** / **`failed_read`** -- The file inside the ZIP was damaged or unreadable. Re-create the ZIP archive and resubmit.
@@ -161,7 +161,7 @@ Each file in a batch starts at extraction and progresses through the document pr
```
ZIP extracted
|
+-- invalid_type (not PDF) .............. TERMINAL
+-- invalid_type (unsupported ext) ....... TERMINAL
+-- failed_open / failed_read ........... TERMINAL
+-- failed_s3_upload / failed_upload .... TERMINAL
+-- duplicate (hash match) .............. TERMINAL