---
title: "getErpImportPreview"
method: GET
path: "/v2/erp/imports/{importId}/preview"
tags: ["erp-imports"]
---

# getErpImportPreview

`GET /v2/erp/imports/{importId}/preview`

## Request

- Base URL: `https://integration-toolkit.sls.epilot.io`
- URL: `https://integration-toolkit.sls.epilot.io/v2/erp/imports/{importId}/preview`
- Auth: HTTP bearer

The file preview of an existing import: its columns and first data rows, the same sample `createErpImport` returns with `include_preview`. Lets a client that opens a job later show its file, and is independent of GET /v2/erp/imports/{importId}, so the two can be fetched in parallel.
Read fresh from the import's file on every call. CSV only — an xlsx import returns 400.

## Path parameters

- `importId` string, required

## Response `200`

The file preview

- ErpImportFilePreview: Sample of the file's first rows, using the same parser as `:validate`. Registration refuses a file it cannot read, so a created job always includes this.
  - `columns` string[], required: Effective column names (trimmed, duplicates collapsed).
  - `rows` array[], required: Up to the first 3 data rows, aligned to `columns`.
    - string[]

## Other responses

- `400`: Bad request. `message` says what is wrong. A request refused by the request validation, before any handler ran, also carries `status: 400` and the raw validation errors under `error`.
- `403`: Forbidden: the token lacks a permission the operation requires, or it is invalid or expired — the API gateway refuses those with `{"message": "Forbidden"}` before the request reaches the API.
- `404`: The import does not exist, or its file is no longer available.
- `500`: Internal Server Error

## Changes

- **2026-09-30** `e779b3b3c6b4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/epilot/apis/integration-toolkit-api/changes/v2/erp/imports/:importId/preview/get.md)

---

[API](https://skmtc.dev/epilot/apis/integration-toolkit-api.md) - [All operations](https://skmtc.dev/epilot/apis/integration-toolkit-api/llms.txt) - [OpenAPI document](https://skmtc.dev/epilot/apis/integration-toolkit-api/revisions/7d07c4eb8d37?raw)
