HR & People pack

Timesheets CSV import API

Import timesheets from any CSV: hours per person and day, project codes and overtime, bounded 0 to 24. Medium risk, approved by a person before commit.

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

timesheets_v1
fields
6
required
3
validated
2
hints
32
Canonical columnTypeRequiredValidatorsHeader hints the cascade matches
employee_idstringyes—personalnummermatriculematricolaemployee idnúmero de empleado
work_datedateyes—datumarbeitstagdatedatawork datefecha
hoursnumberyesnumber_rangestundenarbeitszeitheuresorehourshoras
project_codestring——projektprojektnummerprojetprogettoprojectproyecto
overtime_hoursnumber—number_rangeüberstundenheures supplémentairesstraordinariovertimehoras extra
statusenumdraftsubmittedapprovedrejected——statusstatutstatoestado

Read the same definition as JSON at GET /v1/templates/timesheets_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
  • 3 required
  • 2 validated
  • 32 header hints, 5 languages

Why it exists

Written for the file you actually receive.

The Timesheets template is the canonical row for worked time: one person, one day, a number of hours. It is what a time-tracking export, a project-accounting dump or a site's weekly spreadsheet reduces to. Each row carries an employee_id, a work_date and hours (all three required), an optional project_code for billing or cost allocation, optional overtime_hours, and a status that follows the approval walk from draft through submitted to approved or rejected. Payroll, project-controlling and operations teams use it to move time data between tools, to feed overtime into a pay run, and to bill client projects from hours that were actually approved. It is `medium` risk: hours per named person per day feed pay and say a good deal about someone's working pattern. In production a medium-risk mapping does not commit until a member of your workspace has approved that exact mapping in the dashboard.

hours and overtime_hours are both bounded to 0–24 by a range validator, so a duration typed in minutes (450 instead of 7.5) or a weekly total lands as a row error rather than as a 450-hour day. Hours are decimal numbers: 7.5, not 7:30. Convert clock-style durations before import. work_date auto-detects ISO, US and European formats. The template does not add overtime into hours or check one against the other; whether a source reports overtime inside the total or on top of it is your convention, and the row keeps both numbers as given.

Migration scenarios & the foreign headers they ship

Teams use Timesheets when they switch time-tracking tools (Clockify, Harvest or Toggl into Personio attendance, or out of it); when a monthly export from the time system has to feed the overtime line in payroll; when project controllers rebuild a quarter of billable hours after a tool change; and when a site that records time in spreadsheets joins a group that does not. Headers we see: "Personalnummer / Matricule / Employee ID / Datum / Date / Fecha / Stunden / Arbeitszeit / Heures / Ore / Hours Worked / Projekt / Projet / Progetto / Project / Überstunden / Heures supplémentaires / Straordinari / Overtime / Status / Statut / Approval Status". Exports that split a day into Start, End and Break columns carry no hours column at all. Those need the duration computed before import; the cascade maps columns, it does not invent one.

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

bash
curl -X POST https://api.adaptivmapr.com/v1/uploads \
  -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
  -F "template=timesheets_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: "timesheets_v1",
  headers: ["employee_id", "work_date", "hours", "project_code"]
})
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

Timesheets CSV import — FAQ

What happens to a row that says 25 hours?
It fails the 0–24 range check and is reported as a row error in the validation step, with the field and the value. Nothing is clipped or rescaled.
Can I import hours written as 7:30?
Not as they stand. hours is a number field, so convert hh:mm to decimal hours (7.5) first, or export decimals from the time tool if it offers them.
Why does a timesheet import need an approval?
Timesheets is a medium-risk template. In production the commit is refused with 428 hitl_approval_required until a workspace member approves the mapping in the dashboard. The approval covers that exact mapping; change the mapping afterwards and it needs approving again.
Can one row hold a whole week?
No. The row is one person on one day, and a weekly total above 24 hours fails validation. Split weekly sheets into daily rows, or keep the weekly figure in a custom schema of your own.

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