E-commerce pack

Orders CSV import API

Import Shopify/Magento/WooCommerce-style orders from CSV. Status-bounded, currency-required, tax and discount parsed.

low riskorders_v1
30-second curl
curl -X POST https://api.adaptivmapr.com/v1/uploads \
  -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
  -F "template=orders_v1" \
  -F "file=@your_data.csv"
→ 9 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.

orders_v1
fields
9
required
3
validated
0
hints
30
Canonical columnTypeRequiredValidatorsHeader hints the cascade matches
idstringyesbestellnummernuméro de commandenumero ordinenúmero de pedidoorder id
customer_idstringkundeclientcliente
totalnumberyesgesamtbetragtotaltotale
currencystringyeswährungdevisevalutamoneda
statusenumpendingpaidshippeddeliveredcancelledrefundedstatusstatutstatoestado
placed_atdatebestelldatumdate de commandefecha del pedido
shipping_address_idstringmatched on the column name
taxnumbermwsttvaivatax
discountnumberrabattremisescontodescuento

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

  • 9 canonical fields
  • 3 required
  • 0 validated
  • 30 header hints, 5 languages

Why it exists

Written for the file you actually receive.

The Orders template is the canonical schema for a storefront's purchase orders — the row a Shopify export, a Magento dump, a WooCommerce backup, or a homegrown order log all reduce to. Each row carries an id, a customer_id foreign key, a total amount, a required currency, a status enum (pending / paid / shipped / delivered / cancelled / refunded), a placed_at timestamp, an optional shipping_address_id, tax, and discount. E-commerce teams use this template when migrating between platforms (Shopify → BigCommerce, WooCommerce → Shopify), when consolidating multi-region storefronts into one warehouse, and when feeding a customer-facing "download my order history" feature. The cascade picks up "Bestellnummer", "numéro de commande", "numero ordine", "número de pedido" without an LLM call — international storefronts are the typical case, not the edge case.

Tax and discount are number-typed and locale-tolerant. The status enum is shipping-shaped (it tracks the order through the fulfilment chain, not just payment) so reports about delivery success work without joining a separate fulfilment table. Currency is required because cross-currency stores are common and per-row currency is the only safe modelling choice.

Migration scenarios & the foreign headers they ship

Migration scenarios for the Orders template: full platform migrations (Shopify → BigCommerce, Magento → Shopify, WooCommerce → Centra), consolidating multi-region storefronts into one warehouse for analytics, feeding a customer-facing "download my order history" feature, and backfilling a fresh ERP with two years of order history. Foreign headers we see weekly: "Bestellnummer / Numéro de commande / Numero ordine / Número de pedido / Order ID / Customer / Kunde / Client / Cliente / Total / Gesamtbetrag / Totale / Currency / Währung / Devise / Status / Statut / Stato / Estado / Placed / Bestelldatum / Date de commande / MwSt / TVA / IVA / Tax / Rabatt / Remise / Sconto / Descuento". The cross-platform header coverage is exhaustive — most e-commerce migrations land cleanly without any LLM escalation.

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.

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

bash
curl -X POST https://api.adaptivmapr.com/v1/uploads \
  -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
  -F "template=orders_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 up to three clamped sample rows.

mcp
// In Cursor or Claude Desktop with the AdaptivMapr MCP server installed:
adaptivmapr.match_headers({
  template_id: "orders_v1",
  headers: ["id", "customer_id", "total", "currency"]
})
schema-only · headers and ≤3 rows, 80 chars each
MCP install instructions

Questions

Orders CSV import — FAQ

Line items belong in a separate template (one row per item). The canonical Orders row is the header; line items link by order_id.
Apply them as discount on the canonical row, or fork to add an explicit `payment_method` field. The shape stays narrow on purpose.
Yes — customer_id is optional. Guest orders carry null in that column. Downstream upserts should not blow up on null.
Both are valid — the order status reflects the latest state, and the Returns table is the audit log. Use the Returns template alongside Orders to keep the lineage; do not collapse them.

Ready when you are

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

No free tier · $10 prepaid wallet to start · every map draws a small flat fee, deterministic ones included