E-commerce pack
Shipments CSV import API
Import shipment and tracking files from any CSV: order, carrier, tracking number, ship and delivery dates, delivery status. Multilingual headers.
curl -X POST https://api.adaptivmapr.com/v1/uploads \
-H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
-F "template=shipments_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.
shipments_v1- fields
- 8
- required
- 2
- validated
- 0
- hints
- 48
| Canonical column | Type | Required | Validators | Header hints the cascade matches |
|---|---|---|---|---|
id | string | yes | — | sendungsnummerversand-idnuméro d'envoiid spedizioneshipment idid de envío |
order_id | string | yes | — | bestellnummerauftragsnummernuméro de commandenumero ordineorderpedido |
carrier | string | — | — | versanddienstspediteurtransporteurcorrierecarriertransportista |
tracking_number | string | — | — | trackingnummersendungsverfolgungnuméro de suivinumero di tracciamentotrackingnúmero de seguimiento |
shipped_at | date | — | — | versanddatumversendet amdate d'expéditiondata di spedizioneshippedfecha de envíoship dateshipping date |
delivered_at | date | — | — | zustelldatumzugestellt amdate de livraisondata di consegnadeliveredfecha de entrega |
status | enumlabel_createdin_transitout_for_deliverydeliveredreturnedlost | — | — | statusstatutstatoestado |
destination_country | string | — | — | ziellandlandpays de destinationpaese di destinazionecountrypaís de destino |
Read the same definition as JSON at GET /v1/templates/shipments_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
- 2 required
- 0 validated
- 48 header hints, 5 languages
Why it exists
Written for the file you actually receive.
The Shipments template is one parcel per row: its own id and the order_id it fulfils (both required), the carrier, the tracking_number, when it shipped and when it was delivered, a status from label_created to delivered (or returned, or lost), and the destination_country. It is what a shipping platform's export, a 3PL's daily dispatch report or a carrier manifest reduces to. E-commerce operations teams use it to answer "where is my order" tickets from one table instead of four carrier portals, to measure delivery times by carrier and country, and to reconcile what a 3PL says it shipped against what the shop believes it sold. Keeping shipments apart from orders matters, because one order often leaves in two parcels. It is `low` risk, logistics data with no address lines or recipient names, so a confirmed mapping commits straight through.
id and order_id are required; everything else may be blank, because a label is created before a parcel moves. tracking_number is a free string: formats differ by carrier and the template does not check them. shipped_at and delivered_at are separate dates, auto-detected across ISO, US and European formats, so transit time is a subtraction downstream. status is an enum of six states; carrier scan events such as "arrived at sorting centre" do not fit and should be collapsed into in_transit. destination_country is free text, so "CH" and "Switzerland" both pass and can be normalised later.
Migration scenarios & the foreign headers they ship
Typical moves: pulling a month of shipments out of ShipStation, Sendcloud or Shippo for a carrier-performance review; ingesting a 3PL's dispatch file every morning to update order status in the shop; merging DHL, Swiss Post and La Poste manifests into one table before a carrier negotiation; and backfilling tracking history after an order-management migration. Headers we see: "Sendungsnummer / Shipment ID / Bestellnummer / Order Number / Numéro de commande / Versanddienst / Transporteur / Corriere / Carrier / Trackingnummer / Numéro de suivi / Tracking Number / Versanddatum / Data di spedizione / Zustelldatum / Date de livraison / Delivery Date / Status / Zielland / Ship To Country". An English "Ship Date" is a registered hint too, so a US-style export resolves the same way.
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/shipments_v1.
curl -X POST https://api.adaptivmapr.com/v1/uploads \
-H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
-F "template=shipments_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: "shipments_v1",
headers: ["id", "order_id", "carrier", "tracking_number"]
})Questions








