Import Invoices & Migrate from Another ERP
Switch to Frihet in minutes — even mid-quarter — with zero numbering gaps, zero duplicated taxes on Modelo 303 / 130 / 420, and full VeriFactu hash-chain integrity.
Interactive Migration & Series Continuity Planner
Select your previous billing system, your tax territory (Mainland Spain & Balearics IVA, Canary Islands IGIC, or Basque Country TicketBAI), and your last issued invoice number to generate your exact migration checklist and a ready-to-copy CSV template:
Local validation boundary (
L1–L3vs.L4): the validator on this page runs L1–L3 pre-validation locally in your browser (L1CSV syntax and headers,L2±€0.01arithmetic and dates, andL3Spanish NIF/NIE/CIF or VIES syntax and per-series continuity), with zero network transmission. Layer L4 backend importability (pending_erp_dry_run) is checked inside Frihet when you upload the file, where rows enter as drafts for review and already-issued historical invoices remain in your previous software.
Plan your ERP switch and validate your ledger before importing
Ways to Import into Frihet
| Method | When to use it | How it works |
|---|---|---|
| 1. AI import (PDF / image / CSV) | You want to bring individual invoices into Frihet and review them before issuing. | In Sales → Invoices → Import you upload the files (PDF, JPG, PNG or CSV). AI extracts client, tax ID, dates, line items and taxes and shows a review that flags possible duplicates and incomplete data. Invoices are created as drafts: they are not closed historical records and follow normal issuing. |
| 2. CSV import | You are bringing data over from your previous software (ContaPlus, A3, Xero, QuickBooks, Quipu, Billin…). | In Settings → Import & migrate you upload the CSV and map columns. Invoices come in as drafts for review: do not issue the ones you already issued in your previous software. Frihet does not import already-issued invoices keeping their source status and numbering. |
| 3. REST API and MCP | You automate the migration with a script or your AI agent. | REST API (POST /v1/invoices, POST /v1/expenses) and @frihet/mcp-server (create_client, create_invoice, create_expense). POST /v1/invoices creates the invoice as a draft by default; it is not the attested historical route. |
Switching ERPs Mid-Quarter: Numbering Series vs. SIF Hash Chain
When switching ERPs, it is essential not to conflate two distinct legal concepts: invoice numbering series (Art. 6.1.a RD 1619/2012) and billing-system record hash-chaining (RD 1007/2023 & Orden HAC/1177/2024):
- SIF record hash-chaining (
Art. 29.2.j LGT,RD 1007/2023&Orden HAC/1177/2024): a single billing system (Sistema Informático de Facturación, SIF — identified byIDEmisorFactura+IdSistemaInformatico+NumeroInstalacion) chains all its registration records into one SHA-256 sequence across all invoice series. When you move from another software to Frihet, Frihet starts an independent record chain because Frihet is a distinct SIF (its first record carriesPrimerRegistro = S), not because you change your invoice series prefix. - Keeping your history (
Art. 29.2.e LGTandArt. 19 RD 1619/2012): never re-issue invoices already issued in your previous software as new invoices. Preserve the exported records and files from your previous system for the statutory limitation period. Frihet does not import those invoices keeping their status and numbering, so their amounts do not flow into Frihet's tax-form drafts: for the Modelo 303, 130, or 420 of the quarter you switch, add them up with your advisor. Imports from Sales → Invoices → Import (AI) and Settings → Import & migrate (CSV) create drafts that would be issued as new invoices. - Configuring your series for new invoices in Frihet (
Art. 6.1.a RD 1619/2012):- Option A — Correlative continuation in your existing series (standard recommended default): keep your current series (
F2026) and set the starting counter tolast number + 1under Settings → Billing (Invoice Series section) so numbering continues with zero gaps or duplicates. Frihet still starts its own SIF chain withPrimerRegistro = S. - Option B — Separate series (optional when justified,
Art. 6.1.a RD 1619/2012): create a dedicated series (e.g.,F2026-FRI-0001) when objectively justified (distinct billing channels/points of issue, separate business lines, or organizational separation).
- Option A — Correlative continuation in your existing series (standard recommended default): keep your current series (
Step-by-Step: AI Import (Upload → Review → Confirm)
- Go to Sales → Invoices and click Import.
- Upload: drag and drop your PDFs, images (JPG, PNG) or CSV files exported from your previous system.
- Review: check and edit the detected data. Frihet flags invoices without a client or number, line items with invalid data, and possible duplicates.
- Confirm: invoices are created as drafts. Review them before issuing.
Invoices you already issued in your previous software are not imported for issuing: keep them in that system (see point 2 in the previous section).
Automation via REST API and MCP Server
If you prefer to run a migration script or delegate the migration to your AI agent (Claude Code, Cursor), use the official REST endpoints and verified tools in @frihet/mcp-server:
# Create an invoice (draft by default) via REST API v1
curl -X POST "https://api.frihet.io/v1/invoices" \
-H "X-API-Key: fri_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"clientName": "Acme Studio SL",
"clientTaxId": "B12345674",
"issueDate": "2026-10-05",
"dueDate": "2026-11-04",
"items": [{ "description": "Q4 Technical Consulting", "quantity": 1, "unitPrice": 1500 }],
"taxRate": 21
}'
Reference
- REST API:
POST /v1/invoices(invoices),POST /v1/expenses(expenses),POST /v1/clients(clients) — see API reference - MCP tools (
@frihet/mcp-server):create_client,create_invoice,create_expense,create_vendor,list_invoices— see MCP reference - Related guides:
- App path: Sales → Invoices → Import (AI, creates drafts) · Settings → Import & migrate (CSV, creates drafts)