---
title: "Get a data import record"
method: GET
path: "/data-import/{id}"
tags: ["Data Import"]
---

# Get a data import record

`GET /data-import/{id}`

## Request

- Base URL: `https://api.surense.com/api/v1`
- URL: `https://api.surense.com/api/v1/data-import/{id}`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://api.surense.com/oauth/token`

Returns a data import record of the caller's tenant: its provider, files, parameters, status (`INITIATED` → `UPLOADED` → `PROCESSING` → `PROCESSED` / `FAILED`), per-file results (counts, info/warning/error messages), failure reason and revert information. Poll this endpoint to follow the progress of an import after starting it.

**Authorization:** any authenticated user; the record must belong to the caller's tenant.

**Errors:** an unknown record id (or a record of another tenant) returns **400**, not 404.

## Path parameters

- `id` string, uuid, required

## Response `200`

The data import record

- DataImportRecordValue: A data import: one set of files imported with a provider into an agency, with its status and results.
  - `tenantId` string, uuid
  - `agencyId` string, uuid: Agency the data is imported into.
  - `createdDate` string, date-time
  - `createdBy` string, uuid
  - `creatorName` string
  - `lastModifiedDate` string, date-time
  - `lastModifiedBy` string, uuid
  - `version` integer
  - `id` string, uuid: Data import record ID.
  - `provider` string, uuid: ID of the import provider.
  - `subProvider` string, uuid: ID of the resolved sub-provider, when the provider has sub-providers.
  - `files` DataImportFile[]: The files of the import (names and sizes).
    - `fileName` string, required
    - `fileSize` integer
  - `params` object: The provider-specific parameters given at initiation (e.g. `subProvider`, `validityMonth`, `customerManager`).
  - `status` 'INITIATED' | 'UPLOADED' | 'PROCESSING' | 'PROCESSED' | 'FAILED': Import status: `INITIATED` (waiting for upload), `UPLOADED` (queued), `PROCESSING`, `PROCESSED` or `FAILED`.
  - `results` DataImportResults[]: Processing results per file group: counters in `params` (e.g. `customerCount`, `productCount`) and info/warning/error messages.
    - `files` DataImportFile[]
      - `fileName` string, required
      - `fileSize` integer
    - `params` object
    - `infos` string[]
    - `warnings` string[]
    - `errors` string[]
  - `failureReason` string: Why the import failed, when `status` is `FAILED`.
  - `revertedBy` string, uuid: ID of the user who reverted the import, if reverted.
  - `revertedAt` string, date-time: When the import was reverted, if reverted.

## Other responses

- `400`: The record does not exist in the caller's tenant

---

[API](https://skmtc.dev/surense/apis/data-import-api.md) - [All operations](https://skmtc.dev/surense/apis/data-import-api/llms.txt) - [OpenAPI document](https://skmtc.dev/surense/apis/data-import-api/revisions/cf169afb2d5b?raw)
