HR & People pack

Departments CSV import API

Import departments and the org chart from any CSV: parent hierarchy, manager, cost centre and site. German, French and Italian headers resolved.

30-second curl
curl -X POST https://api.adaptivmapr.com/v1/uploads \
  -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
  -F "template=departments_v1" \
  -F "file=@your_data.csv"
→ 6 canonical fields · 0 validated · low 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.

departments_v1
fields
6
required
2
validated
0
hints
37
Canonical columnTypeRequiredValidatorsHeader hints the cascade matches
department_idstringyes—abteilungsnummerabteilungs-idcode départementcodice repartodepartment idcódigo de departamento
namestringyes—abteilungbezeichnungdépartementrepartodepartmentdepartamentosupervisory organization
parent_idstring——übergeordnetübergeordnete abteilungdépartement parentreparto superioreparentdepartamento padreparent department
manager_idstring——leitervorgesetzterresponsableresponsabilemanagerjefe
cost_centerstring——kostenstellecentre de coûtscentro di costocost centrecost centercentro de coste
locationstring——standortsitesedelocationubicación

Read the same definition as JSON at GET /v1/templates/departments_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.

  • 6 canonical fields
  • 2 required
  • 0 validated
  • 37 header hints, 5 languages

Why it exists

Written for the file you actually receive.

The Departments template is the canonical shape for an organisation chart: the file an HRIS org export, a finance cost-centre list or the spreadsheet a COO keeps of who reports where reduces to. Each row is one unit. A department_id and a name are required; an optional parent_id points at another row's department_id, a manager_id names the person in charge by their employee id, a cost_center ties the unit to the ledger, and a location says where it sits. The parent pointer is the reason the template exists: a flat list of names cannot answer "what rolls up into Sales", a list with parents can. People-ops teams load it first in an HRIS migration, because employee records, timesheets and reviews all refer to a department that has to exist before they do. It is `low` risk, since it describes the structure of the company rather than the people in it, so a confirmed mapping commits straight through without a review step.

department_id and name are required; everything else is optional, because a small company has no cost centres and only one site. parent_id is a plain string, not a checked reference: the template does not verify that the parent exists in the same file, so a hierarchy exported in two halves still imports, and a downstream pass can confirm the tree is closed. Top-level units leave parent_id blank. manager_id holds an employee id rather than a name, so it joins cleanly to the Employees template. cost_center is free text because every ledger numbers them its own way (KS-1100, 4100, CC_SALES_DE).

Migration scenarios & the foreign headers they ship

Teams reach for the Departments template when they change HRIS (BambooHR or Personio into Workday, or the other way) and need the structure in place before the first employee import; when HR and finance each keep a department list and want one; when an acquisition brings a second org chart that has to hang under the first; and when a headcount-planning tool needs a cost centre on every unit. Headers we see: "Department ID / Abteilungsnummer / Code département / Codice reparto / Department Name / Bezeichnung / Abteilung / Reparto / Département parent / Manager / Leiter / Responsable / Cost Center / Kostenstelle / Centre de coûts / Location / Standort / Sede". Workday's "Supervisory Organization" and an English "Parent Department" are registered hints too, so a Workday org export lands on name and parent_id directly.

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

bash
curl -X POST https://api.adaptivmapr.com/v1/uploads \
  -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
  -F "template=departments_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: "departments_v1",
  headers: ["department_id", "name", "parent_id", "manager_id"]
})
schema-only · column names and a few examples only
MCP install instructions

Questions

Departments CSV import — FAQ

Does the template check that every parent_id exists?
No. Each row is validated on its own, so a parent that lives in another file, or arrives in a later import, does not block this one. Check that the tree is closed in your own pipeline once all units have landed.
How do I represent a team that reports into two units?
The template holds one parent per row, which is the solid reporting line. A dotted line belongs in your own system, or in a custom schema in your workspace with a second parent column.
Can manager_id hold a name instead of an employee id?
It is a free string, so a name will import. An employee id is the better choice: it joins to the Employees template, and two managers can share a name.
Does a department import need an approval before commit?
No. Departments is a low-risk template, so a confirmed mapping commits straight through. The file still names managers by id, which ties rows to people, so handle it as you would any staff list.

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