Integration Examples
This page shows practical ways to use the converter in real workflows.
Table of Contents
Web App Upload Flow
Use enpara-api behind your frontend.
High-level flow:
- User uploads PDF in browser.
- Frontend sends multipart request to your backend.
- Backend forwards to enpara-api /api/v1/convert.
- Converted file is returned to user or stored.
Example Node backend route:
app.post("/convert", upload.single("file"), async (req, res) => {
const form = new FormData();
form.append("file", new Blob([req.file.buffer]), req.file.originalname);
form.append("format", req.body.format || "json");
form.append("type", req.body.type || "auto");
const apiRes = await fetch("http://localhost:8080/api/v1/convert", {
method: "POST",
body: form,
});
if (!apiRes.ok) {
return res.status(422).json({error: "Conversion failed"});
}
const fileBuffer = Buffer.from(await apiRes.arrayBuffer());
res.setHeader("Content-Type", apiRes.headers.get("content-type") || "application/octet-stream");
res.send(fileBuffer);
});
Accounting Workflow
Common simple flow:
- Convert monthly PDF to OFX.
- Import OFX into accounting tool.
- Reconcile transactions.
./enpara-cli "March-2026.pdf" --format ofx --output "March-2026.ofx"
Batch Automation Script
If you export statements monthly, automate conversion in a folder.
#!/usr/bin/env bash
set -euo pipefail
INPUT_DIR="./statements"
OUTPUT_DIR="./converted"
mkdir -p "$OUTPUT_DIR"
for pdf in "$INPUT_DIR"/*.pdf; do
name="$(basename "$pdf" .pdf)"
./enpara-cli "$pdf" --format csv --type auto --output "$OUTPUT_DIR/$name.csv"
done
Backend Service Pattern
For production integration:
- Keep conversion API internal (not public internet if possible)
- Add request size limits
- Add retries for transient failures
- Log conversion errors with request IDs
tip
For long-term integrations, use JSON output as your canonical data exchange format.
Next Steps
- Endpoint details: API Usage
- Data format decisions: Output Formats