# Imports of the active organisation, newest first

> `GET /imports` · Scope: `import` · operationId `listImports`

Any member, or an API key with the `import` scope (ADR-026). An import staged with a key names
the key in `created_by_api_key` instead of `created_by`.

## Query-Parameter

- **limit** `integer` (Standard: 50): Maximum number of items to return.
- **cursor** `string`: Opaque cursor from a previous page's `next_cursor`.

## Antworten

### 200 (`application/json`)

One page of imports.

- **items** `Import[]` (erforderlich)
  - **approved_at** `string (date-time)`
  - **approved_by** `string (uuid)`
  - **committed_at** `string (date-time)`
  - **created_at** `string (date-time)` (erforderlich)
  - **created_by** `UserRef`
  - **created_by_api_key** `ApiKeyRef`: An organisation API key (ADR-017) that reported an event (source `api`) or staged an import (ADR-026).
  - **filename** `string` (erforderlich)
  - **format** `string` (erforderlich, einer von: `csv`, `xlsx`)
  - **headers** `string[]` (erforderlich)
  - **id** `string (uuid)` (erforderlich)
  - **mapping** `ColumnMapping[]` (erforderlich)
  - **options** `ImportOptions` (erforderlich)
  - **preset** `string`: An import preset of the ERP registry (`getErpRegistry`, ADR-026): which column header of an ERP export maps to which registry field.
  - **row_count** `integer` (erforderlich): Data rows (empty rows are left out).
  - **row_version** `integer (int64)` (erforderlich): Optimistic-concurrency version; send it back as `If-Match` when updating.
  - **sample_rows** `string[][]` (erforderlich): The first data rows of the file as read (at most 5), to show example values while mapping.
  - **sheet** `string`: The XLSX worksheet that was read.
  - **size_bytes** `integer (int64)` (erforderlich)
  - **status** `string` (erforderlich, einer von: `uploaded`, `validating`, `validated`, `committing`, `committed`, `failed`): `uploaded` (mapping can change) → `validating` → `validated` → `committing` → `committed`; `failed` when the file could not be validated (validate again). A changed mapping sends a validated import back to `uploaded`.
  - **summary** `ImportSummary`
  - **updated_at** `string (date-time)` (erforderlich)
  - **validated_at** `string (date-time)`
- **next_cursor** `string | null` (erforderlich): Cursor for the next page, or null when this is the last page.

### 400 (`application/problem+json`)

The request is malformed or failed validation (`validation_error`), or a token is invalid or expired (`invalid_token`).

### 401 (`application/problem+json`)

The API key is missing, unknown or revoked (`unauthenticated`).

### 403 (`application/problem+json`)

The API key may not perform this action (`forbidden`): it lacks the operation's scope, or the action needs more than a viewer's rights.

### default (`application/problem+json`)

Any other problem, e.g. `internal_error`.

## Beispiel

```bash title="cURL"
curl -X GET "https://passport.kabin.sh/api/v1/imports" \
  -H "Authorization: Bearer $BATTERYPASS_API_KEY"
```
