Skip to main content

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–L3 vs. L4): the validator on this page runs L1–L3 pre-validation locally in your browser (L1 CSV syntax and headers, L2 ±€0.01 arithmetic and dates, and L3 Spanish 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.

MIGRATION STUDIO V1 · SERIES CONTINUITY & PRE-FLIGHT CSV VALIDATOR

Plan your ERP switch and validate your ledger before importing

IVA (AEAT)
Series numbering (RD 1619/2012) vs. SIF record hash-chaining (RD 1007/2023)
Critical regulatory distinction (RD 1619/2012 vs RD 1007/2023 & Order HAC/1177/2024): a single billing system (SIF) chains all its registration records across all series into one SHA-256 chain. When switching from another ERP to Frihet, Frihet starts a new hash chain because Frihet is a distinct SIF (its first record carries PrimerRegistro = S), NOT because you change your invoice series. Therefore, you can continue correlatively in your current series (Option A, standard practice) or open a separate series when justified (Option B, Art. 6.1.a RD 1619/2012).
OPTION A · CORRELATIVE CONTINUATION (STANDARD DEFAULT)
F2026-0143
Set initial counter to 143 in Settings → Billing → Invoice Series so the same series continues correlatively without gaps. Frihet starts its own SIF hash chain (PrimerRegistro = S) automatically because it is a distinct SIF.
OPTION B · SEPARATE SERIES (ART. 6.1.a RD 1619/2012)
F2026-FRI-0001
Optional when objectively justified (e.g., separate billing channels, business lines, or organizational separation). Keep F2026-0001..0142 in your previous system; do not re-issue them.
1. Numbering continuity (Art. 6.1.a RD 1619/2012)
Within each series, numbering must be correlative (F2026-0143). Separate series are permitted when objectively justified (distinct billing channels or points of issue).
2. Keeping your history (Art. 29.2.e LGT · Art. 19 RD 1619/2012)
Export and preserve original records, XML/PDFs, and ledgers from your previous system for the statutory 4-year audit window. Never re-issue historical invoices as new.
3. SIF identity (RD 1007/2023)
Each billing software is identified by IDEmisorFactura + IdSistemaInformatico + NumeroInstalacion. Frihet is a distinct SIF from your previous ERP.
4. SIF hash-chaining (Order HAC/1177/2024)
A single SIF chains all its records into one hash chain across all series. Starting in Frihet initializes a new chain with PrimerRegistro = S because it is a new SIF.
5. Quarterly tax reconciliation (303 / 130 / 420)
Invoices already issued are not re-issued. Frihet does not import already-issued invoices keeping their status and numbering: for the tax form of the quarter you switch, add up with your advisor the amounts from your previous software and from Frihet. Imports from Invoices → Import (AI) and Settings → Import & migrate (CSV) create drafts.
Interactive migration checklist1 of 5 completed
Live Pre-Flight CSV & Schema Validator (4-layer syntax, arithmetic, NIF/CIF checksum & per-series check)
Privacy contract (100% local in-browser validation): Your CSV rows are parsed exclusively in local browser memory. Zero rows or tax IDs are sent over the network, and Docs telemetry runs with PostHog autocapture: false and session recording disabled.
L1 · Schema & CSV SyntaxPASS
Delimiter ",", RFC-4180 quotes & required columns.
L2 · Arithmetic & DatesPASS
Strict numeric parsing (no NaN), real calendar dates & row math.
L3 · Tax IDs & SeriesPASS
AEAT NIF/NIE/CIF check-digit & per-series correlativity (1 series).
L4 · Import into FrihetCHECKED IN THE APP
This in-browser pre-check (L1–L3) certifies nothing beyond those checks. The actual import (as drafts) is validated in app.frihet.io: confirm the result there.
✓ Client pre-validation L1–L3 passed (2/2 rows valid across 1 series; confirm L4 import in app.frihet.io) · Base: €2500.00 · Tax: €525.00 · Total: €3025.00

Ways to Import into Frihet​

MethodWhen to use itHow 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 importYou 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 MCPYou 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):

  1. 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 by IDEmisorFactura + 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 carries PrimerRegistro = S), not because you change your invoice series prefix.
  2. Keeping your history (Art. 29.2.e LGT and Art. 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.
  3. 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 to last number + 1 under Settings → Billing (Invoice Series section) so numbering continues with zero gaps or duplicates. Frihet still starts its own SIF chain with PrimerRegistro = 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).

Step-by-Step: AI Import (Upload → Review → Confirm)​

  1. Go to Sales → Invoices and click Import.
  2. Upload: drag and drop your PDFs, images (JPG, PNG) or CSV files exported from your previous system.
  3. Review: check and edit the detected data. Frihet flags invoices without a client or number, line items with invalid data, and possible duplicates.
  4. 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​