---
title: "Index an import batch"
method: POST
path: "/settings/data-transfer/imports/{id}/index"
tags: ["Admin Settings: Data Transfer"]
---

# Index an import batch

`POST /settings/data-transfer/imports/{id}/index`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/settings/data-transfer/imports/{id}/index`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/settings/data-transfer/imports/:id/index/post.ts> (a function with typed inputs; its response is checked against the schema)

Indexes the next linked batch and returns stats + the refreshed import. Permission: settings.data_transfer.imports.import.

## Path parameters

- `id` string, required

## Request body

- object

## Response `200`

Batch indexed; stats + refreshed import.

- AdminSettingsDataTransferImportIndexAdminSettingsDataTransferImport: POST /api/admin/settings/data-transfer/imports/{id}/index + indexAdminSettingsDataTransferImportIndex mutation. Indexes one linked batch and returns { stats, import }. Permission: settings.data_transfer.imports.import.
  - `id` integer, nullable
  - `code` string, nullable
  - `action` string, nullable
  - `state` string, nullable
  - `processInQueue` boolean, nullable
  - `validationStrategy` string, nullable
  - `allowedErrors` integer, nullable
  - `processedRowsCount` integer, nullable
  - `invalidRowsCount` integer, nullable
  - `errorsCount` integer, nullable
  - `errors` unknown[], nullable
    - unknown
  - `fieldSeparator` string, nullable
  - `filePath` string, nullable
  - `imagesDirectoryPath` string, nullable
  - `imageSource` string, nullable: Where a product import reads its images from: url, upload or directory.
  - `imagesArchiveName` string, nullable: Name of the images archive uploaded for this import, when its images came from an upload.
  - `errorFilePath` string, nullable
  - `summary` object, nullable
  - `startedAt` string, nullable
  - `completedAt` string, nullable
  - `createdAt` string, nullable
  - `updatedAt` string, nullable
  - `success` boolean, nullable
  - `isValid` boolean, nullable
  - `stats` object, nullable
  - `message` string, nullable

## Other responses

- `400`: Nothing to import / not valid.
- `401`: Missing or invalid admin token.
- `403`: Admin role lacks settings.data_transfer.imports.import.
- `404`: Import not found.
- `422`: Validation Error

## Changes

- **2026-08-27** `3c859f92343f`: 4 info
  - added the optional property `imageSource` to the response with the `200` status (media type: application/json)
  - added the optional property `imageSource` to the response with the `200` status (media type: text/html)
  - added the optional property `imagesArchiveName` to the response with the `200` status (media type: application/json)
  - added the optional property `imagesArchiveName` to the response with the `200` status (media type: text/html)

[Operation history](https://skmtc.dev/bagisto/apis/bagisto-admin-api/changes/settings/data-transfer/imports/:id/index/post.md)

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
