Finance & Payments pack

Expenses CSV import API

Map employee expense claims from any expense tool or spreadsheet: who, when, category, amount, merchant and approval status.

30-second curl
curl -X POST https://api.adaptivmapr.com/v1/uploads \
  -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
  -F "template=expenses_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.

expenses_v1
fields
8
required
5
validated
0
hints
44
Canonical columnTypeRequiredValidatorsHeader hints the cascade matches
expense_idstringyes—spesennummerbeleg-nrnuméro de note de fraisnumero nota speseexpense idnúmero de gasto
employee_idstringyes—personalnummermitarbeitermatriculematricolaemployeeempleado
expense_datedateyes—belegdatumdatumdate de la dépensedata spesaexpense datefecha del gasto
categoryenumtravelmealslodgingmileagesuppliesother——kategoriespesenartcatégoriecategoriacategorycategoría
amountnumberyes—betragmontantimportoamountimporte
currencystringyes—währungdevisevalutacurrencymoneda
merchantstring——händlerlieferantcommerçantesercentevendorcomercio
statusenumsubmittedapprovedrejectedreimbursed——statusstatutstatoestado

Read the same definition as JSON at GET /v1/templates/expenses_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
  • 5 required
  • 0 validated
  • 44 header hints, 5 languages

Why it exists

Written for the file you actually receive.

The Expenses template is the canonical shape for employee expense claims — the file an expense tool exports for the accounting run, or the spreadsheet a team still fills by hand. Each row carries an expense_id, the employee_id who claimed it, the expense_date, a category bounded to travel / meals / lodging / mileage / supplies / other, the amount and currency, the merchant and a status that walks the claim from submitted through approved or rejected to reimbursed. Finance-operations teams reach for it when switching expense tools, when pulling a year of claims into a warehouse for a travel-policy review, and when feeding approved claims into payroll or accounts payable. It is `medium` risk because each row ties a named employee to where they were and what they spent; in production its commit is refused until a workspace member approves that exact mapping in the dashboard.

expense_id, employee_id, expense_date, amount and currency are required — a claim without a person, a date or an amount cannot be reimbursed. category and status are enums, so "Bewirtung" or "en attente" are reported in the dry-run instead of landing as stray labels. merchant is free text because receipts are. Hints cover DE / FR / IT / ES / EN, including Spesennummer, matricule, matricola, note de frais and nota spese.

Migration scenarios & the foreign headers they ship

Migration scenarios for the Expenses template: moving from SAP Concur or Expensify to a newer tool without losing last year's history, consolidating spreadsheet expense reports from a Swiss, French and Italian office into one policy review, loading approved claims into Abacus or Bexio for reimbursement, and building a travel-spend dashboard across subsidiaries. Headers that arrive: "Spesennummer / Beleg-Nr / Numéro de note de frais / Numero nota spese / Expense ID / Personalnummer / Mitarbeiter / Matricule / Matricola / Employee / Belegdatum / Datum / Date de la dépense / Kategorie / Spesenart / Catégorie / Betrag / Montant / Importo / Händler / Commerçant / Esercente / Vendor / Status / Statut". Expensify's "Merchant" and "Category" columns resolve on the column names themselves.

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/expenses_v1.

bash
curl -X POST https://api.adaptivmapr.com/v1/uploads \
  -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
  -F "template=expenses_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: "expenses_v1",
  headers: ["expense_id", "employee_id", "expense_date", "category"]
})
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

Expenses CSV import — FAQ

Our categories are more detailed than six. Can I keep them?
The canonical set is deliberately coarse so claims from different tools compare. If you need your own list, save an edited copy of the template as a workspace schema with your categories as the enum values.
Are receipt images imported?
No — the template maps the claim rows. Receipts stay in your expense tool or document store; a receipt URL or id can travel in an extra column of your own schema.
Why does an expense import need approval?
Expense rows place a named employee at a merchant on a date, which is personal data with an obvious misuse. The template is medium risk, so in production the commit waits until a workspace member approves that exact mapping in the dashboard.

Map expenses 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.