Saltar al contenido 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
}

Autorizaciones

Authorization
string
header
requerido

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

Encabezados

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 ruta

contextId
string
requerido

The unique identifier of the reconciliation context.

sourceId
string
requerido

The unique identifier of the reconciliation source.

Cuerpo

multipart/form-data
file
file
requerido

Transaction file (CSV, JSON, or XML)

format
enum<string>
requerido

File format

Opciones disponibles:
csv,
json,
xml

Respuesta

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)

Ejemplo:

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

contextId
string

Context ID this job belongs to

Ejemplo:

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

createdAt
string

Creation timestamp in RFC3339 format

Ejemplo:

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

failedRows
integer

Number of rows that failed processing

Rango requerido: x >= 0
Ejemplo:

5

fileName
string

Original file name

Ejemplo:

"transactions_2024.csv"

id
string

Unique identifier for the job

Ejemplo:

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

sourceId
string

Source ID this job ingests data into

Ejemplo:

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

startedAt
string

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

Ejemplo:

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

status
enum<string>

Current status of the job

Opciones disponibles:
QUEUED,
PROCESSING,
COMPLETED,
FAILED
Ejemplo:

"PROCESSING"

totalRows
integer

Total number of rows in the file

Rango requerido: x >= 0
Ejemplo:

1000