E-commerce pack
Inventory CSV import API
Import per-SKU per-location inventory levels from CSV. Multilingual warehouse and stock-level hints.
curl -X POST https://api.adaptivmapr.com/v1/uploads \
-H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
-F "template=inventory_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.
inventory_v1- fields
- 6
- required
- 3
- validated
- 0
- hints
- 16
| Canonical column | Type | Required | Validators | Header hints the cascade matches |
|---|---|---|---|---|
sku | string | yes | — | matched on the column name |
location_id | string | yes | — | lagerentrepôtmagazzinoalmacénwarehouse |
on_hand | number | yes | — | bestandstockgiacenzaexistencias |
reserved | number | — | — | reserviertréservériservatoreservado |
last_counted_at | date | — | — | matched on the column name |
reorder_point | number | — | — | nachbestellpunktpoint de réapprovisionnementpunto di riordino |
Read the same definition as JSON at GET /v1/templates/inventory_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
- 0 validated
- 16 header hints, 5 languages
Why it exists
Written for the file you actually receive.
The Inventory template is the per-SKU per-location stock-level row. Each row carries a SKU (required), a location_id (required — multi-warehouse is the common case), on_hand (the physical count), an optional reserved (committed but not yet shipped), an optional last_counted_at timestamp, and an optional reorder_point. E-commerce and warehousing teams use this template for daily stock-sync jobs, for cycle-count reconciliation, and for migrations between warehouse-management systems. The composite key is (sku, location_id) — the cascade does not enforce it because primary-key constraints belong downstream, but the dry-run report flags duplicate composites so you can decide whether to sum, take the latest, or reject. The location_id field picks up Lager / entrepôt / magazzino / almacén / warehouse at zero cost.
on_hand is the only required numeric field — reserved and reorder_point are optional because not every warehouse tracks them. last_counted_at is a date, not a datetime, in most sources; the parser accepts both. The template does not derive available_to_promise (on_hand - reserved); that lives downstream so the formula can be customised per workspace.
Migration scenarios & the foreign headers they ship
Migration scenarios for the Inventory template: daily stock-sync jobs from a WMS into a storefront, cycle-count reconciliation against the source of truth, WMS-to-WMS migrations during a fulfilment-provider swap, and multi-warehouse consolidation where regional stock files need to reconcile into one cross-region view. Foreign headers we see often: "SKU / Artikelnummer / Référence / Codice / Location / Lager / Entrepôt / Magazzino / Almacén / Warehouse / Bestand / Stock / Giacenza / Existencias / Reserved / Reserviert / Réservé / Riservato / Reservado / Last Counted / Letzte Zählung / Reorder Point / Nachbestellpunkt / Point de réapprovisionnement / Punto di riordino". The composite-key dry-run report flags duplicate (sku, location_id) pairs — the most common cause of mysterious stock overcounts in homegrown sync jobs.
The cascade
Five 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/inventory_v1.
curl -X POST https://api.adaptivmapr.com/v1/uploads \
-H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
-F "template=inventory_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 up to three clamped sample rows.
// In Cursor or Claude Desktop with the AdaptivMapr MCP server installed:
adaptivmapr.match_headers({
template_id: "inventory_v1",
headers: ["sku", "location_id", "on_hand", "reserved"]
})Questions
Inventory CSV import — FAQ
Ready when you are
Map inventory in production — without shipping raw records.
Schema-only mode leaves only headers and a handful of clamped samples. Add full-data when you need row-level AI, routed in-region under a BAA.