Skip to main content
POST
/
v1
/
imports
/
contexts
/
{contextId}
/
sources
/
{sourceId}
/
preview
Preview a transaction file
curl --request POST \
  --url https://matcher.sandbox.lerian.net/v1/imports/contexts/{contextId}/sources/{sourceId}/preview \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form format=csv \
  --form max_rows=5
{
  "columns": [
    "date",
    "amount",
    "reference",
    "description"
  ],
  "sampleRows": [
    [
      "<string>"
    ]
  ],
  "rowCount": 5,
  "format": "csv"
}

Authorizations

Authorization
string
header
required

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

Headers

X-Request-Id
string

A unique identifier for tracing the request across services.

Path Parameters

contextId
string
required

The unique identifier of the reconciliation context.

sourceId
string
required

The unique identifier of the reconciliation source.

Body

multipart/form-data
file
file
required

Transaction file to preview (CSV, JSON, or XML)

format
enum<string>

File format (auto-detected from filename if omitted)

Available options:
csv,
json,
xml
max_rows
integer
default:5

Maximum number of sample rows to return

Required range: 1 <= x <= 20

Response

File preview with detected columns and sample rows

Preview of a transaction file showing detected columns and sample data

columns
string[]

Detected column names

Example:
[
"date",
"amount",
"reference",
"description"
]
sampleRows
string[][]

Sample data rows

rowCount
integer

Number of sample rows returned

Example:

5

format
string

Detected file format

Example:

"csv"