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.
curl -X POST https://api.adaptivmapr.com/v1/uploads \
-H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
-F "template=expenses_v1" \
-F "file=@your_data.csv"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 column | Type | Required | Validators | Header hints the cascade matches |
|---|---|---|---|---|
expense_id | string | yes | — | spesennummerbeleg-nrnuméro de note de fraisnumero nota speseexpense idnúmero de gasto |
employee_id | string | yes | — | personalnummermitarbeitermatriculematricolaemployeeempleado |
expense_date | date | yes | — | belegdatumdatumdate de la dépensedata spesaexpense datefecha del gasto |
category | enumtravelmealslodgingmileagesuppliesother | — | — | kategoriespesenartcatégoriecategoriacategorycategoría |
amount | number | yes | — | betragmontantimportoamountimporte |
currency | string | yes | — | währungdevisevalutacurrencymoneda |
merchant | string | — | — | händlerlieferantcommerçantesercentevendorcomercio |
status | enumsubmittedapprovedrejectedreimbursed | — | — | 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.
- 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}.
- L2Heuristicno LLM
Normalises accents, punctuation and whitespace, then compares against the column name, the label, and every registered hint (DE / FR / IT / EN / ES).
- L3Fuzzyno LLM
Token-set ratio plus Levenshtein over the normalised strings. Auto-accepts at 0.80 — it absorbs typos and reordered words.
- L4Semanticcheap, cached
Embedding cosine between the header and the field’s label + hints. Catches the long tail of paraphrases.
- 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.
curl -X POST https://api.adaptivmapr.com/v1/uploads \
-H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
-F "template=expenses_v1" \
-F "file=@your_data.csv"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.
// 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"]
})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.
Questions








