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

# Validate an import

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

## Request

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

Validates the uploaded file and returns is_valid plus the refreshed import. Permission: settings.data_transfer.imports.import.

## Path parameters

- `id` string, required

## Request body

- object

## Response `200`

Validation result + refreshed import.

- AdminSettingsDataTransferImportValidateAdminSettingsDataTransferImport: POST /api/admin/settings/data-transfer/imports/{id}/validate + validateAdminSettingsDataTransferImportValidate mutation. Runs the import validator and returns { is_valid, import } (mapped onto the AdminSettingsDataTransferImport output). 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`: Invalid input
- `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/validate/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)
