Finance & Payments pack

General ledger CSV import API

Map general ledger and journal-entry exports from any accounting system into one shape: account, debit, credit, posting date, cost centre.

30-second curl
curl -X POST https://api.adaptivmapr.com/v1/uploads \
  -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
  -F "template=general_ledger_v1" \
  -F "file=@your_data.csv"
→ 8 canonical fields · 0 validated · medium risk

Canonical columns

The whole schema, printed as it ships.

Every canonical column, the type each row carries, whether it is required, the field-level validators that fire on commit, and the multilingual header hints the cascade resolves against. This is the shipped definition, not a summary of it.

general_ledger_v1
fields
8
required
4
validated
0
hints
49
Canonical columnTypeRequiredValidatorsHeader hints the cascade matches
entry_idstringyes—buchungsnummerbelegbelegnummernuméro d'écriturenumero registrazionejournal entryentry noasiento
posting_datedateyes—buchungsdatumdate comptabledate d'écrituredata registrazioneposting datefecha contable
account_codestringyes—kontokontonummersachkontocomptecontogl accountaccountcuenta
debitnumber——solldébitdaredebitdebe
creditnumber——habencréditaverecredithaber
currencystringyes—währungdevisevalutacurrencymoneda
descriptionstring——buchungstexttextlibellédescrizionememoconcepto
cost_centerstring——kostenstellecentre de coûtscentro di costocost centrecost centercentro de coste

Read the same definition as JSON at GET /v1/templates/general_ledger_v1. A hint match resolves on layer 2 — no LLM call, no token spend, just the flat per-map fee. Hover a validator id to see what it checks.

  • 8 canonical fields
  • 4 required
  • 0 validated
  • 49 header hints, 5 languages

Why it exists

Written for the file you actually receive.

The General ledger template is the canonical shape for journal entries — the file a year-end export, an auditor request or an ERP cut-over reduces to. Each line carries an entry_id that groups the lines of one booking, a posting_date, the account_code it hits, a debit or a credit amount, a currency, the posting text and an optional cost centre. Controllers and finance-systems teams reach for it when moving the books between accounting packages, when loading historical journals into a warehouse for variance analysis, and when assembling an audit sample from several subsidiaries that each run a different system. It is `medium` risk: a ledger exposes margins, salaries hidden in expense accounts and counterparties in the posting text. In production a medium template does not commit on its own — the commit is refused until a workspace member approves that exact mapping in the dashboard, and a mapping edited afterwards needs a fresh approval.

entry_id, posting_date, account_code and currency are required; debit and credit are separate optional numbers, so a line carries one or the other and the empty side stays empty. The template does not check that an entry balances — that is a ledger rule your target system enforces, and keeping it out of the mapping step means a deliberately partial extract still imports. account_code is a string, not a number, so leading zeros and dotted codes survive. Hints cover Soll / Haben, débit / crédit, dare / avere and debe / haber.

Migration scenarios & the foreign headers they ship

Migration scenarios for the General ledger template: a Swiss SME moving from Abacus or Banana to Bexio at fiscal year-end, a German subsidiary handing its DATEV Buchungsstapel to a group consolidation, an SAP FBL3N line-item extract feeding a data warehouse, and an auditor collecting journals from Sage, QuickBooks and Xero in one go. The headers that arrive: "Belegnummer / Beleg / Buchungsdatum / Date comptable / Data registrazione / Sachkonto / Konto / Compte / Soll / Haben / Débit / Crédit / Währung / Buchungstext / Libellé / Kostenstelle / Centre de coûts". One honest caveat: DATEV and some Abacus exports ship a single amount plus a debit/credit indicator rather than two columns. That is a structural difference, not a naming one — it needs a reshape that splits the amount, not just a header mapping.

The cascade

Six layers, and the cheapest one wins.

Layers run in order and stop the moment a column resolves. That is the single biggest cost lever in the system: a column caught on layer 2 never reaches the metered layer 5.

  1. L1Statisticsno LLM

    Auto-accepts a header that past confirmations already resolved the same way, at {minN:100, minRatio:0.95} or {minN:20, minRatio:1.00}.

  2. L2Heuristicno LLM

    Normalises accents, punctuation and whitespace, then compares against the column name, the label, and every registered hint (DE / FR / IT / EN / ES).

  3. L3Fuzzyno LLM

    Token-set ratio plus Levenshtein over the normalised strings. Auto-accepts at 0.80 — it absorbs typos and reordered words.

  4. L4Semanticcheap, cached

    Embedding cosine between the header and the field’s label + hints. Catches the long tail of paraphrases.

  5. L5LLMmetered

    Everything still unresolved goes up in ONE batched, collision-aware call, constrained to this template’s column set so it cannot invent a field.

Try it

One template id, two ways in.

REST for your import pipeline, MCP for your editor. Both run the same cascade and both honour the same schema-only clamp.

REST · POST /v1/uploads

Name the template; the cascade picks up the rest. The canonical definition is read-only at GET /v1/templates/general_ledger_v1.

bash
curl -X POST https://api.adaptivmapr.com/v1/uploads \
  -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
  -F "template=general_ledger_v1" \
  -F "file=@your_data.csv"
→ upload created · mappings ready · confirm before commit

MCP · Cursor / Claude Desktop

Drop AdaptivMapr into your editor and call the same cascade as a tool. Schema-only calls leave only column names and a few example values.

mcp
// In Cursor or Claude Desktop with the AdaptivMapr MCP server installed:
adaptivmapr.match_headers({
  template_id: "general_ledger_v1",
  headers: ["entry_id", "posting_date", "account_code", "debit"]
})
schema-only · column names and a few examples only
MCP install instructions
medium-risk template

The mappings response comes back flagged. PATCH /uploads/:id/mappings returns requires_hitl: true and hitl_status: "pending_review" and on the hosted API a commit waits until a workspace member records an approval. Schema-only mode (column names and a few example values, never the full file) is a data-minimization mode enforced at the HTTP edge. Full-data mode routes the metered layer-5 call to phi-cloud in-region under a BAA, costs 20% more on the whole map charge, and stays locked until the workspace accepts the BAA/NDA in Settings → Security & Data.

How the wallet is charged

Questions

General ledger CSV import — FAQ

Does the template check that debits equal credits?
No. Balancing is a ledger rule, and a partial extract (one cost centre, one account range) is legitimately unbalanced. The template guarantees each line lands in the right columns with parseable numbers and dates; the balance check belongs in your accounting system or a downstream query.
My export has one amount column and an S/H flag. Can I still use this?
Yes, but it is a reshape rather than a straight mapping: the amount has to be split into debit or credit by the flag. The reshape path handles that kind of structural change; a plain header mapping cannot.
Why is the general ledger medium risk?
Journal lines reveal margins, payroll costs and named counterparties in the posting text. In production the commit is refused until a workspace member approves that exact mapping in the dashboard; approving once does not cover a mapping that is changed afterwards.
What happens to account codes with leading zeros?
They survive. account_code is typed as a string, so "0400" stays "0400" and dotted or alphanumeric codes pass through untouched.

Map general ledger in production — without shipping raw records.

Minimal data mode sends only column names and a few example values — never the full file. Add full-data when you need row-level AI, routed in-region under a BAA.