Pular para o conteúdo principal
POST
/
v1
/
imports
/
contexts
/
{contextId}
/
sources
/
{sourceId}
/
upload
Upload transaction file
curl --request POST \
  --url https://matcher.sandbox.lerian.net/v1/imports/contexts/{contextId}/sources/{sourceId}/upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form format=csv
{
  "completedAt": "2025-01-15T10:35:00.000Z",
  "contextId": "019c96a0-10a0-72d2-9fb0-2b7de8093182",
  "createdAt": "2025-01-15T10:30:00.000Z",
  "failedRows": 5,
  "fileName": "transactions_2024.csv",
  "id": "019c96a0-10ce-75fc-a273-dc799079a99c",
  "sourceId": "019c96a0-108c-7a74-8e31-3789daffe1ed",
  "startedAt": "2025-01-15T10:30:00.000Z",
  "status": "PROCESSING",
  "totalRows": 1000
}

Autorizações

Authorization
string
header
obrigatório

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

Cabeçalhos

X-Request-Id
string

A unique identifier for tracing the request across services.

X-Idempotency-Key
string

Optional idempotency key for safe retries. Also accepts Idempotency-Key as an alternative header name. If the same key is sent again and the original request was already processed, the cached response is returned with X-Idempotency-Replayed: true.

See Retries and idempotency for details.

Parâmetros de caminho

contextId
string
obrigatório

The unique identifier of the reconciliation context.

sourceId
string
obrigatório

The unique identifier of the reconciliation source.

Corpo

multipart/form-data
file
file
obrigatório

Transaction file (CSV, JSON, or XML)

format
enum<string>
obrigatório

File format

Opções disponíveis:
csv,
json,
xml

Resposta

Indicates that the request was accepted for processing.

The response includes the X-Idempotency-Replayed header.

If the value is false, the request was just processed. If the value is true, the response is a replay of a previously processed request.

See Retries and idempotency for more details.

Ingestion job details

completedAt
string

When the job completed in RFC3339 format (if completed)

Exemplo:

"2025-01-15T10:35:00.000Z"

contextId
string

Context ID this job belongs to

Exemplo:

"019c96a0-10a0-72d2-9fb0-2b7de8093182"

createdAt
string

Creation timestamp in RFC3339 format

Exemplo:

"2025-01-15T10:30:00.000Z"

failedRows
integer

Number of rows that failed processing

Intervalo obrigatório: x >= 0
Exemplo:

5

fileName
string

Original file name

Exemplo:

"transactions_2024.csv"

id
string

Unique identifier for the job

Exemplo:

"019c96a0-10ce-75fc-a273-dc799079a99c"

sourceId
string

Source ID this job ingests data into

Exemplo:

"019c96a0-108c-7a74-8e31-3789daffe1ed"

startedAt
string

When the job started in RFC3339 format (null for QUEUED jobs)

Exemplo:

"2025-01-15T10:30:00.000Z"

status
enum<string>

Current status of the job

Opções disponíveis:
QUEUED,
PROCESSING,
COMPLETED,
FAILED
Exemplo:

"PROCESSING"

totalRows
integer

Total number of rows in the file

Intervalo obrigatório: x >= 0
Exemplo:

1000