Skip to main content
POST
/
v1
/
imports
/
contexts
/
{contextId}
/
sources
/
{sourceId}
/
mapping-proposal
Propose a config-only field-map/dialect mapping for a source sample
curl --request POST \
  --url https://matcher.sandbox.lerian.net/v1/imports/contexts/{contextId}/sources/{sourceId}/mapping-proposal \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sample": "<string>",
  "hints": {}
}
'
{
  "fields": [
    {
      "canonicalKey": "<string>",
      "confidence": 0.5,
      "rationale": "<string>",
      "sourceColumn": "<string>"
    }
  ],
  "dialect": {
    "dateStyle": "<string>",
    "decimalStyle": "<string>",
    "delimiter": "<string>",
    "encoding": "<string>"
  },
  "mapping": {}
}

Authorizations

Authorization
string
header
required

Bearer token authentication (format: "Bearer {token}")

Path Parameters

contextId
string<uuid>
required

Context ID

sourceId
string<uuid>
required

Source ID

Body

application/json
sample
string
required

Representative source-file sample

Minimum string length: 1
Example:

"id;value;ccy;posted_at\nA1;10,50;BRL;2025-06-01\n"

format
enum<string>

Declared file format hint

Available options:
csv,
json,
xml,
camt053
Example:

"csv"

hints
object

Optional non-secret operator nudges (e.g. locale=pt-BR, has_header=true)

Response

OK

fields
object[] | null
required

Per-field breakdown backing the proposed mapping

dialect
object

Proposed source dialect; null when the advisor has no dialect suggestion

mapping
object

Proposed canonical field map (canonical key -> source column); null when the advisor could not propose a mapping