---
title: "Upload transaction file"
method: POST
path: "/v1/imports/contexts/{contextId}/sources/{sourceId}/upload"
tags: ["Ingestion"]
---

# Upload transaction file

`POST /v1/imports/contexts/{contextId}/sources/{sourceId}/upload`

Use this endpoint to upload a transaction file (CSV, JSON, or XML) for ingestion into a reconciliation context. The file is parsed, validated, and transactions are extracted for matching.

## Path parameters

- `contextId` string, required
- `sourceId` string, required

## Headers

- `X-Request-Id` string
- `X-Idempotency-Key` string

## Response `202`

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](/en/reference/retries-idempotency) for more details.

- JobResponse — Ingestion job details
  - `completedAt` string — When the job completed in RFC3339 format (if completed)
  - `contextId` string — Context ID this job belongs to
  - `createdAt` string — Creation timestamp in RFC3339 format
  - `failedRows` integer — Number of rows that failed processing
  - `fileName` string — Original file name
  - `id` string — Unique identifier for the job
  - `sourceId` string — Source ID this job ingests data into
  - `startedAt` string — When the job started in RFC3339 format (null for QUEUED jobs)
  - `status` 'QUEUED' | 'PROCESSING' | 'COMPLETED' | 'FAILED' — Current status of the job
  - `totalRows` integer — Total number of rows in the file

## Other responses

- `400` — The request contains invalid parameters or payload.
- `401` — The request lacks valid authentication credentials.
- `403` — You do not have permission to access this resource.
- `404` — The requested resource was not found.
- `409` — Idempotency conflict: request with same key in progress
- `413` — The uploaded file exceeds the maximum allowed size.
- `500` — An unexpected error occurred on the server.

---

[API](https://skmtc.net/lerian/apis/identity-plugin.md) · [All operations](https://skmtc.net/lerian/apis/identity-plugin/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lerian/identity-plugin/versions/25daba385532/schema)
