CRM pack
Campaigns CSV import API
Import marketing campaign reports from any CSV: channel, dates, budget, spend, currency and leads. Channel enum-bounded, multilingual headers.
curl -X POST https://api.adaptivmapr.com/v1/uploads \
-H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
-F "template=campaigns_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.
campaigns_v1- fields
- 9
- required
- 2
- validated
- 0
- hints
- 50
| Canonical column | Type | Required | Validators | Header hints the cascade matches |
|---|---|---|---|---|
id | string | yes | — | kampagnen-idkampagnennummerid campagneid campagnacampaign idid de campaña |
name | string | yes | — | kampagnecampagnecampagnacampaigncampaña |
channel | enumemailpaid_searchpaid_socialdisplayeventcontentother | — | — | kanalcanalcanalechannelmedium |
start_date | date | — | — | startdatumbeginndate de débutdata iniziostart datefecha de inicioreporting starts |
end_date | date | — | — | enddatumendedate de findata fineend datefecha de fin |
budget | number | — | — | budgetpresupuestobilancio |
spend | number | — | — | ausgabenkostendépensesspesaspendcostgastoamount spent |
currency | string | — | — | währungdevisevalutacurrencymoneda |
leads | number | — | — | leadsanfragenprospectscontatticlientes potenciales |
Read the same definition as JSON at GET /v1/templates/campaigns_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
- 2 required
- 0 validated
- 50 header hints, 5 languages
Why it exists
Written for the file you actually receive.
The Campaigns template is one marketing campaign per row: an id and a name (both required), the channel, start and end dates, the budget, the actual spend, the currency and the number of leads the campaign brought in. It is the shape that an ad platform's campaign report, a marketing-automation export and the planning sheet a marketing lead keeps all reduce to. Marketing operations teams use it to put paid search, paid social, events and email in one table, to compute cost per lead across channels that each report it differently, and to compare planned budget with what finance actually paid. Keeping budget and spend as two columns is what makes the variance visible. It is `low` risk, campaign economics with no personal data, so a confirmed mapping commits straight through. The leads themselves are people and belong in the Leads template; this one only counts them.
id and name are required. channel is an enum (email, paid_search, paid_social, display, event, content, other), so a platform's own vocabulary such as "Search", "Performance Max" or "Sponsored Content" needs mapping into it before import; unknown values are reported, not guessed. budget and spend are numbers in the row's currency, which is a free string, and leads is a plain count. start_date and end_date auto-detect formats, and an always-on campaign can leave end_date blank. There are no impressions, clicks or conversions: each platform defines them differently, and a cross-channel table that mixes them misleads.
Migration scenarios & the foreign headers they ship
Common moves: pulling a quarter of Google Ads, Microsoft Ads, Meta and LinkedIn campaign reports into one table for a channel-mix review; loading HubSpot or Marketo campaign exports into a warehouse beside pipeline data; reconciling an events budget kept in a spreadsheet against invoices; and carrying campaign history across a change of marketing-automation tool. Headers we see: "Kampagnen-ID / Campaign ID / Kampagne / Campaign / Campagne / Kanal / Canal / Channel / Medium / Startdatum / Start date / Date de début / Enddatum / End date / Budget / Ausgaben / Kosten / Cost / Spesa / Währung / Currency code / Leads / Anfragen". A Google Ads report's "Campaign", "Budget" and "Cost" resolve directly; so do Meta's "Amount spent (EUR)" and "Reporting starts", which land on spend and start_date.
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/campaigns_v1.
curl -X POST https://api.adaptivmapr.com/v1/uploads \
-H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
-F "template=campaigns_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: "campaigns_v1",
headers: ["id", "name", "channel", "start_date"]
})Questions








